describe_db_clustersLABSCO SUMMARY
Two independent switches, and neither one is the other's shortcut.
MCP_TOOLSETS decides which families of tools exist; ENABLE_SQL_WRITE_TOOLS decides whether execute_sql may do more than read. Enabling the SQL group does not grant writes, and enabling writes does not pull in the administration tools — which means the read-only query setup most people want is the default rather than something to configure. The OpenAPI group includes account creation, whitelist changes and query termination, so turn it on deliberately.
What it is
Alibaba Cloud's MCP server for AnalyticDB for MySQL, split into two tool groups you enable independently. The sql group connects to a cluster and runs read-only queries, EXPLAIN and EXPLAIN ANALYZE, and exposes database metadata as resources. The openapi group manages clusters, whitelists, accounts and networking and pulls performance, health, diagnostics and audit data through Alibaba Cloud OpenAPI. Read-only tools are annotated so a client can tell them apart from mutating ones.
What you get
- SQL executed against a cluster — read-only by default — with EXPLAIN and EXPLAIN ANALYZE for a single SELECT or read-only CTE —
execute_sql,get_query_plan,get_execution_plan - Database metadata as read-only resources —
adbmysql:///databasesandadbmysql:///{database}/tables - Cluster inventory and networking: clusters in a region, cluster attributes, IP whitelist read and modify, accounts, network connection info and server time —
describe_db_clusters,describe_db_cluster_attribute,describe_cluster_access_whitelist,modify_cluster_access_whitelist,describe_accounts,describe_cluster_net_info,get_current_time - Diagnostics and monitoring: performance metrics, health status, SQL diagnosis records and execution details, bad-SQL detection, SQL patterns and table statistics —
describe_db_cluster_performance,describe_db_cluster_health_status,describe_diagnosis_records,describe_diagnosis_sql_info,describe_bad_sql_detection,describe_sql_patterns,describe_table_statistics - Administration and audit: create an account, change the cluster description, storage space summary and SQL audit log records —
create_account,modify_db_cluster_description,describe_db_cluster_space_summary,describe_audit_log_records - Deeper diagnostics: compute, storage and access node detection, optimisation advice, process termination, resource groups, and schema problems such as excessive primary keys, oversized non-partitioned tables, partitioning issues and data skew —
describe_executor_detection,describe_worker_detection,describe_controller_detection,describe_available_advices,kill_process,describe_db_resource_group,describe_excessive_primary_keys,describe_oversize_non_partition_table_infos,describe_table_partition_diagnose,describe_inclined_tables
Requirements
Python >= 3.13 and uv. An Alibaba Cloud AccessKey is required for the OpenAPI tools; the SQL tools additionally want a direct connection — ADB_MYSQL_HOST, ADB_MYSQL_PORT (3306 in the example), ADB_MYSQL_USER, ADB_MYSQL_PASSWORD and optionally ADB_MYSQL_DATABASE. If those user credentials are absent but an AccessKey is present, the server creates a temporary database account through OpenAPI, and SQL calls must then carry region_id and db_cluster_id. MCP_TOOLSETS picks the groups — sql, openapi, or both. Full SQL execution is not a tool group: execute_sql is read-only until ENABLE_SQL_WRITE_TOOLS=true is set explicitly, which the documentation says to do only for trusted users and clients, with a least-privilege database account. For remote SSE or Streamable HTTP where SERVER_HOST is not a loopback address, set API_KEY on the server and send Authorization: Bearer <YOUR_API_KEY> from the client.
Setup effort
Build from source — git clone https://github.com/aliyun/alibabacloud-adb-mysql-mcp-server
USE CASES
Answering a question from the warehouse safely
Enable only the SQL group and leave writes off; the assistant can query and read metadata but cannot modify anything.
Working out why a query is slow
Read the plan, then the actual execution plan, and check the cluster's bad-SQL detection and diagnosis records for the same statement.
Triaging a cluster that is struggling
Pull performance metrics and health status, run the node detections, read the available advice, and kill the offending process if one is dominating.
Finding schema problems before they cost you
Check for excessive primary keys, oversized non-partitioned tables, partitioning issues and skewed tables in one pass.
31 tools
Listed in project docs. Your client may show a different list.
describe_db_cluster_attributedescribe_cluster_access_whitelistmodify_cluster_access_whitelistdescribe_accountsdescribe_cluster_net_infoget_current_timedescribe_db_cluster_performancedescribe_db_cluster_health_statusdescribe_diagnosis_recordsdescribe_diagnosis_sql_infodescribe_bad_sql_detectiondescribe_sql_patternsdescribe_table_statisticscreate_accountmodify_db_cluster_descriptiondescribe_db_cluster_space_summarydescribe_audit_log_recordsdescribe_executor_detectiondescribe_worker_detectiondescribe_controller_detectiondescribe_available_adviceskill_processdescribe_db_resource_groupdescribe_excessive_primary_keysdescribe_oversize_non_partition_table_infosdescribe_table_partition_diagnosedescribe_inclined_tablesexecute_sqlget_query_planget_execution_planBEFORE YOU INSTALL
What to know first
Tools you get
31 tools named in the project's documentation.
Requires
- uv on PATH
- Python >= 3.13
- ADB_MYSQL_PASSWORD in your environment
- ADB_MYSQL_USER in your environment
Optional
- ALIBABA_CLOUD_ACCESS_KEY_ID in your environment
- ALIBABA_CLOUD_ACCESS_KEY_SECRET in your environment
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/aliyun/alibabacloud-adb-mysql-mcp-server
cd alibabacloud-adb-mysql-mcp-server
uv syncMCP Clients
Cherry Studio
{
"mcpServers": {
"adb-mysql-mcp-server": {
"name": "adb-mysql-mcp-server",
"type": "stdio",
"isActive": true,
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_ALIBABACLOUD_ADB_MYSQL_MCP>",
"run",
"adb-mysql-mcp-server"
],
"env": {
"ADB_MYSQL_HOST": "<YOUR_ADB_MYSQL_HOST>",
"ADB_MYSQL_PORT": "3306",
"ADB_MYSQL_USER": "<YOUR_ADB_MYSQL_USER>",
"ADB_MYSQL_PASSWORD": "<YOUR_ADB_MYSQL_PASSWORD>",
"ADB_MYSQL_DATABASE": "<YOUR_ADB_MYSQL_DATABASE>",
"MCP_TOOLSETS": "sql"
}
}
}
}<YOUR_PATH_TO_ALIBABACLOUD_ADB_MYSQL_MCP> is the absolute path of the folder you cloned.
ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are only for the OpenAPI cluster-management tools. To use those, add both to the server's env and set MCP_TOOLSETS to openapi,sql. The SQL tools need only the ADB_MYSQL_* connection settings.
Claude Code
{
"mcpServers": {
"adb-mysql-mcp-server": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_ALIBABACLOUD_ADB_MYSQL_MCP>",
"run",
"adb-mysql-mcp-server"
],
"env": {
"MCP_TOOLSETS": "sql",
"ADB_MYSQL_HOST": "<YOUR_ADB_MYSQL_HOST>",
"ADB_MYSQL_PORT": "3306",
"ADB_MYSQL_USER": "<YOUR_ADB_MYSQL_USER>",
"ADB_MYSQL_PASSWORD": "<YOUR_ADB_MYSQL_PASSWORD>",
"ADB_MYSQL_DATABASE": "<YOUR_ADB_MYSQL_DATABASE>"
}
}
}
}<YOUR_PATH_TO_ALIBABACLOUD_ADB_MYSQL_MCP> is the absolute path of the folder you cloned.
ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are only for the OpenAPI cluster-management tools. To use those, add both to the server's env and set MCP_TOOLSETS to openapi,sql. The SQL tools need only the ADB_MYSQL_* connection settings.
Cline
This connects to a server you start yourself with SSE transport. In the cloned folder, export the same ADB_MYSQL_* values the other tabs set, plus MCP_TOOLSETS=sql, SERVER_TRANSPORT=sse, SERVER_HOST=127.0.0.1 and SERVER_PORT=8000, then run:
uv --directory <YOUR_PATH_TO_ALIBABACLOUD_ADB_MYSQL_MCP> run adb-mysql-mcp-serverLeave it running and add this entry to Cline:
{
"mcpServers": {
"adb-mysql-mcp-server": {
"type": "sse",
"url": "http://127.0.0.1:8000/sse"
}
}
}ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are only for the OpenAPI cluster-management tools. To use those, add both to the server's env and set MCP_TOOLSETS to openapi,sql. The SQL tools need only the ADB_MYSQL_* connection settings.