home / mcp / hologres mcp server

Hologres MCP Server

Provides a universal interface between AI Agents and Hologres databases to retrieve metadata and run SQL operations.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aliyun-alibabacloud-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_DATABASE": "database",
        "HOLOGRES_PASSWORD": "access_key"
      }
    }
  }
}

Hologres MCP Server provides a universal interface between AI Agents and Hologres databases. It lets AI Agents discover Hologres metadata and execute SQL operations through a straightforward MCP connection.

How to use

Connect your MCP client to the Hologres MCP Server to enable seamless communication with Hologres databases. You can run the server locally (Mode 1) or install it via Python (Mode 2) and then point your MCP client at the running instance. The server exposes a set of tools for querying metadata, executing SQL, and performing maintenance tasks against Hologres.

How to install

Prerequisites: you need a runtime for the chosen mode (see Mode 1 and Mode 2). Ensure you have access to a Hologres instance and the required environment variables when configuring the MCP client.

Configuration and usage notes

Mode 1: Using Local File installs the MCP server code locally and runs it from a directory you specify. Use this when you want to host the MCP server on your own machine and reference a local copy of the server code.

Mode 2: Using PIP Mode installs the MCP server as a Python package and runs it via different runtimes. Use this when you prefer Python packaging and runtime flexibility.

Mode 2a uses uv mode to run the server with the hologres-mcp-server entry. Mode 2b uses uvx mode to run the same server component directly by name. In both cases, you provide the HOLOGRES_HOST, HOLOGRES_PORT, HOLOGRES_USER, HOLOGRES_PASSWORD, and HOLOGRES_DATABASE environment variables to connect to your Hologres instance.

Available tools

execute_hg_select_sql

Run a SELECT query against the Hologres database to fetch data.

execute_hg_select_sql_with_serverless

Run a SELECT query using serverless computing resources for scalable results.

execute_hg_dml_sql

Execute DML statements (INSERT, UPDATE, DELETE) in Hologres.

execute_hg_ddl_sql

Execute DDL statements (CREATE, ALTER, DROP, COMMENT ON) in Hologres.

gather_hg_table_statistics

Collect and return statistics for tables in Hologres to aid optimization.

get_hg_query_plan

Retrieve the query plan for a SQL statement in Hologres.

get_hg_execution_plan

Retrieve the execution plan for a SQL statement in Hologres.

call_hg_procedure

Invoke a stored procedure in Hologres.

create_hg_maxcompute_foreign_table

Create MaxCompute foreign tables in the Hologres database.

list_hg_schemas

List all non-system schemas in the current Hologres database.

list_hg_tables_in_a_schema

List all tables in a specified schema, including types like table, view, external table, or partitioned table.

show_hg_table_ddl

Show the DDL script for a table, view, or external table in Hologres.