Hologres MCP Server provides a universal interface between AI Agents and Alibaba Cloud's Hologres databases, enabling seamless communication for metadata retrieval and SQL execution. Developed by TimothyDing, it supports executing SQL (including DDL, DML, and queries), collecting statistics with ANALYZE commands, and retrieving database metadata such as schemas, tables, and table statistics. The server requires Python 3.13+ and can be installed via pip or run directly from the repository, making it easy to integrate with MCP clients through simple configuration. This implementation is particularly valuable for data analysis workflows that need to interact with Hologres databases without switching contexts.
暂无评论. 成为第一个评论的人!
登录以参与讨论
Execute a SELECT SQL query in Hologres database.
Execute a SELECT SQL query in Hologres database with serverless computing.
Execute a DML (INSERT, UPDATE, DELETE) SQL query in Hologres database.
Execute a DDL (CREATE, ALTER, DROP, COMMENT ON) SQL query in Hologres database.
Collect table statistics in Hologres database. Parameters: schema_name (string), table (string)
Get query plan in Hologres database.
Get execution plan in Hologres database.
Invoke a procedure in Hologres database.
Create MaxCompute foreign tables in Hologres database.
Lists all schemas in the current Hologres database, excluding system schemas.
Lists all tables in a specific schema, including their types (table, view, external table, partitioned table). Parameters: schema_name (string)
Show the DDL script of a table, view, or external table in the Hologres database. Parameters: schema_name (string), table (string)
Execute a SELECT SQL query and generate a chart (bar, line, scatter, pie, histogram, area). Returns query results and a base64-encoded PNG image. Parameters: query (string), chart_type (string, default 'bar'), x_column (string), y_column (string), title (string)
Analyze a specific query's performance profile by its query_id from hg_query_log. Returns detailed metrics including duration, memory, CPU time, read/write stats. Parameters: query_id (string)
Get slow queries from hg_query_log ordered by duration. Parameters: min_duration_ms (int, default 1000), limit (int, default 20)
List all Dynamic Tables with their status, freshness settings, and last refresh info. Parameters: schema_name (string, optional)
Get refresh history for a specific Dynamic Table, including duration, status, and latency. Parameters: schema_name (string), table_name (string), limit (int, default 10)
List all tables in the Hologres recycle bin (dropped tables that can be restored).
Restore a dropped table from the Hologres recycle bin. Parameters: table_name (string), schema_name (string, default 'public')
List all computing groups (warehouses) with their CPU, memory, cluster count, and status.
Switch the current session's computing resource to a specified warehouse. Parameters: warehouse_name (string)
Get storage size details of a table, including total, data, index, and metadata breakdown. Parameters: schema_name (string), table (string)
Cancel or terminate a running query by its process ID. Parameters: pid (int), terminate (bool, default false)
List currently active queries and connections from pg_stat_activity. Parameters: state (string: 'active', 'idle', or 'all', default 'active')
List all Query Queues and their classifiers (concurrency limits, routing rules). Requires V3.0+.
Get table properties including distribution_key, clustering_key, segment_key, bitmap_columns, binlog settings, etc. Parameters: schema_name (string), table (string)
Get table's Table Group and shard count info for diagnosing data skew. Parameters: schema_name (string), table (string)
List all External Databases and Foreign Servers for Lakehouse acceleration. Requires V3.0+.
Diagnose lock contention by showing blocking and waiting queries.
Get table storage trend from hg_table_info, showing daily storage size, file count, and row count changes. Parameters: schema_name (string), table (string), days (int, default 7)
Create, drop, or clear a Query Queue. Requires V3.0+ and superuser privileges. Parameters: action (string: 'create', 'drop', 'clear'), queue_name (string), max_concurrency (int, for create), max_queue_size (int, for create)
Create or drop a classifier for a Query Queue. Requires V3.0+. Parameters: action (string: 'create', 'drop'), queue_name (string), classifier_name (string), priority (int, for create)
Set or remove properties on a Query Queue or classifier. Requires V3.0+. Parameters: target (string: 'queue', 'classifier'), queue_name (string), property_key (string), property_value (string), classifier_name (string, for classifier), action (string: 'set', 'remove')
Manage a computing group: suspend, resume, restart, rename, or resize. Requires superuser. Parameters: action (string: 'suspend', 'resume', 'restart', 'rename', 'resize'), warehouse_name (string), cu (int, for resize), new_name (string, for rename)
Get detailed running status and scaling progress of a computing group. Parameters: warehouse_name (string)
Trigger shard rebalancing for a computing group to eliminate data skew. Parameters: warehouse_name (string)
List all data masking rules configured via hg_anon extension (column-level and user-level).
Query files directly from OSS using EXTERNAL_FILES function without creating foreign tables. Requires V4.1+. Parameters: path (string), format (string: 'csv', 'parquet', 'orc'), columns (string, optional), oss_endpoint (string, optional), role_arn (string, optional)
Get the current value of a GUC (Grand Unified Configuration) parameter. Parameters: guc_name (string)