
Hologres MCP Server
Universal interface between AI agents and Alibaba Cloud Hologres — query metadata, run SQL, diagnose performance.
Add to your client
Copy the config for your MCP client and paste it into its config file.
pip install hologres-mcp-serverPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"hologres-mcp-server": {
"command": "uvx",
"args": [
"hologres-mcp-server"
],
"env": {
"HOLOGRES_HOST": "host",
"HOLOGRES_PORT": "port",
"HOLOGRES_USER": "access_id",
"HOLOGRES_PASSWORD": "access_key",
"HOLOGRES_DATABASE": "database"
}
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- An Alibaba Cloud Hologres instance with host, port, and database
- Alibaba Cloud AccessKey ID and Secret (used as HOLOGRES_USER / HOLOGRES_PASSWORD)
- Python with uv/uvx (or pip) to install and run the server
About Hologres MCP Server
Official Alibaba Cloud MCP server for Hologres, a cloud-native real-time data warehouse. It exposes Hologres metadata and SQL execution to AI agents alongside a broad set of operational and diagnostic tools (query plans, slow-query and lock analysis, storage trends, warehouse and query-queue management, dynamic tables, recycle bin, MaxCompute foreign tables, and OSS file queries). Supports stdio, SSE, and Streamable HTTP transports.
Tools & capabilities (39)
execute_hg_select_sqlExecute a SELECT SQL query in the Hologres database.
execute_hg_select_sql_with_serverlessExecute a SELECT SQL query using Hologres serverless computing.
execute_hg_dml_sqlExecute a DML (INSERT, UPDATE, DELETE) SQL query.
execute_hg_ddl_sqlExecute a DDL (CREATE, ALTER, DROP, COMMENT ON) SQL query.
gather_hg_table_statisticsCollect table statistics for a given schema and table.
get_hg_query_planGet the query plan for a SQL statement.
get_hg_execution_planGet the execution plan for a SQL statement.
call_hg_procedureInvoke a stored procedure in the Hologres database.
create_hg_maxcompute_foreign_tableCreate MaxCompute foreign tables in the Hologres database.
list_hg_schemasList all schemas in the current database, excluding system schemas.
list_hg_tables_in_a_schemaList all tables in a schema with their types (table, view, external, partitioned).
show_hg_table_ddlShow the DDL script of a table, view, or external table.
query_and_plotly_chartRun a SELECT query and generate a chart (bar/line/scatter/pie/histogram/area), returning results and a base64 PNG.
analyze_hg_query_by_idAnalyze a query's performance profile by query_id from hg_query_log (duration, memory, CPU, I/O).
get_hg_slow_queriesGet slow queries from hg_query_log ordered by duration.
list_hg_dynamic_tablesList all Dynamic Tables with status, freshness settings, and last-refresh info.
get_hg_dynamic_table_refresh_historyGet refresh history for a Dynamic Table (duration, status, latency).
list_hg_recyclebinList all dropped tables in the recycle bin that can be restored.
restore_hg_table_from_recyclebinRestore a dropped table from the recycle bin.
list_hg_warehousesList all computing groups (warehouses) with CPU, memory, cluster count, and status.
switch_hg_warehouseSwitch the current session's computing resource to a specified warehouse.
get_hg_table_storage_sizeGet storage size breakdown of a table (total, data, index, metadata).
cancel_hg_queryCancel or terminate a running query by its process ID.
list_hg_active_queriesList active queries and connections from pg_stat_activity.
list_hg_query_queuesList Query Queues and their classifiers (concurrency limits, routing). Requires V3.0+.
get_hg_table_propertiesGet table properties: distribution_key, clustering_key, segment_key, bitmap_columns, binlog settings, etc.
get_hg_table_shard_infoGet a table's Table Group and shard count for diagnosing data skew.
list_hg_external_databasesList External Databases and Foreign Servers for Lakehouse acceleration. Requires V3.0+.
get_hg_lock_diagnosticsDiagnose lock contention by showing blocking and waiting queries.
get_hg_table_info_trendGet table storage trend from hg_table_info (daily size, file count, row count changes).
manage_hg_query_queueCreate, drop, or clear a Query Queue. Requires V3.0+ and superuser.
manage_hg_classifierCreate or drop a classifier for a Query Queue. Requires V3.0+.
set_hg_query_queue_propertySet or remove properties on a Query Queue or classifier. Requires V3.0+.
manage_hg_warehouseManage a computing group: suspend, resume, restart, rename, or resize. Requires superuser.
get_hg_warehouse_statusGet detailed running status and scaling progress of a computing group.
rebalance_hg_warehouseTrigger shard rebalancing for a computing group to eliminate data skew.
list_hg_data_masking_rulesList data masking rules configured via the hg_anon extension (column- and user-level).
query_hg_external_filesQuery files directly from OSS via EXTERNAL_FILES without creating foreign tables. Requires V4.1+.
get_hg_guc_configGet the current value of a GUC (Grand Unified Configuration) parameter.
What this server can do
Hologres MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Let an AI agent explore Hologres schemas, tables, and DDL, then run ad-hoc SELECT/DML/DDL queries
- Diagnose performance: inspect query/execution plans, analyze slow queries, detect lock contention and data skew
- Operate the warehouse: list, switch, suspend/resume/resize computing groups and rebalance shards
- Manage query queues and classifiers for concurrency control and request routing
- Track storage usage and trends, restore dropped tables from the recycle bin, and query OSS files or MaxCompute foreign tables
Security notes
Authentication uses Alibaba Cloud AccessKey credentials (HOLOGRES_USER = access_id, HOLOGRES_PASSWORD = access_key) supplied via environment variables. The server can execute DML and DDL (INSERT/UPDATE/DELETE, CREATE/ALTER/DROP) and warehouse/queue management operations, several of which require superuser privileges — grant a least-privilege Hologres account scoped to the intended database. When using the Streamable HTTP transport bound to 0.0.0.0, restrict network access since the /mcp endpoint exposes full database operations.
Hologres MCP Server FAQ
How do I provide Hologres credentials?
Set the HOLOGRES_HOST, HOLOGRES_PORT, HOLOGRES_USER (access_id), HOLOGRES_PASSWORD (access_key), and HOLOGRES_DATABASE environment variables in your MCP client config or shell before launching the server.
What installation modes are supported?
Three: running from a local clone via uv --directory, installing the hologres-mcp-server package with pip/uvx (stdio), or running Streamable HTTP transport for remote deployment where stdio is unavailable.
Does it support remote/HTTP deployment?
Yes. Start it with --transport streamable-http --host 0.0.0.0 --port 8000 and point the client at http://<host>:<port>/mcp. SSE transport is also available via --transport sse.
Can the server modify data and infrastructure?
Yes — it can run DML/DDL and manage warehouses and query queues (some operations require superuser). Use a least-privilege Hologres account and restrict network access for HTTP deployments.
Alternatives to Hologres MCP Server
Compare all alternatives →Google's official MCP server with prebuilt BigQuery tools, querying datasets via Application Default Credentials.
Create, manage, and query your InstantDB apps, schemas, permissions, and data from your AI editor.
Compare Hologres MCP Server with: