# alibabacloud-hologres-mcp-server

> MCP Server

The Hologres MCP Server provides a universal interface for AI Agents to interact with Hologres databases, enabling metadata retrieval and SQL operation execution. It supports local file and PIP installation modes.

## Overview

- **Category:** Database
- **Language:** Python
- **Stars:** 34
- **Forks:** 1
- **Owner:** aliyun
- **GitHub:** https://github.com/aliyun/alibabacloud-hologres-mcp-server
- **Created:** 2025-03-20T03:30:27+00:00
- **Updated:** 2025-03-27T02:05:23+00:00
- **Source:** https://model-context-protocol.com/servers/hologres-ai-agent-database-interaction-server

## Setup

## Setup

**Mode 1: Using Local File**

1.  Download from Github:

    ```shell
    git clone https://github.com/aliyun/alibabacloud-hologres-mcp-server.git
    ```

2.  MCP Integration: Add the following configuration to the MCP client configuration file:

    ```json
    "mcpServers": {
      "hologres-mcp-server": {
        "command": "uv",
        "args": [
          "--directory",
          "/path/to/alibabacloud-hologres-mcp-server",
          "run",
          "hologres-mcp-server"
        ],
        "env": {
          "HOLOGRES_HOST": "host",
          "HOLOGRES_PORT": "port",
          "HOLOGRES_USER": "access_id",
          "HOLOGRES_PASSWORD": "access_key",
          "HOLOGRES_DATABASE": "database"
        }
      }
    }
    ```

**Mode 2: Using PIP Mode**

1.  Installation: Install MCP Server using the following package:

    ```bash
    pip install hologres-mcp-server
    ```

2.  MCP Integration: Add the following configuration to the MCP client configuration file:

    ```json
      "mcpServers": {
        "hologres-mcp-server": {
          "command": "uv",
          "args": [
            "run",
            "--with",
            "hologres-mcp-server",
            "hologres-mcp-server"
          ],
          "env": {
            "HOLOGRES_HOST": "host",
            "HOLOGRES_PORT": "port",
            "HOLOGRES_USER": "access_id",
            "HOLOGRES_PASSWORD": "access_key",
            "HOLOGRES_DATABASE": "database"
          }
        }
      }
    ```

## Tools

## Available Tools

1.  `execute_sql` (Execute queries in Hologres)
2.  `analyze_table` (Collect table statistics)
3.  `get_query_plan` (Get query plan)
4.  `get_execution_plan` (Get execution plan)

