Alibabacloud Adb Mysql MCP Server

AnalyticDB for MySQL MCP Server is a universal interface between AI Agents and [AnalyticDB MySQL](https://www.alibabacloud.com/zh/product/analyticdb-f

Local serverstdioPython

What is the Alibabacloud Adb Mysql MCP server?

If you already use Alibabacloud Adb Mysql, the alibabacloud adb mysql mcp server is the piece that lets your assistant work with it directly. AnalyticDB for MySQL MCP Server is a universal interface between AI Agents and AnalyticDB MySQL. It provides two tool groups:.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • describe_db_clusters — List ADB MySQL clusters in a region
  • describe_db_cluster_attribute — Get detailed cluster attributes
  • describe_cluster_access_whitelist — Get cluster IP whitelist
  • modify_cluster_access_whitelist — Modify cluster IP whitelist
  • describe_accounts — List database accounts in a cluster
  • describe_cluster_net_info — Get cluster network connection info
  • get_current_time — Get current server time
  • describe_db_cluster_performance — Query cluster performance metrics (CPU, memory, QPS, etc.)
  • describe_db_cluster_health_status — Query cluster health status
  • describe_diagnosis_records — Query SQL diagnosis summary records
  • describe_diagnosis_sql_info — Get SQL execution details (plan, runtime info)
  • describe_bad_sql_detection — Detect bad SQL impacting cluster stability

Credentials and setup notes

Configuration is passed through the environment: ADB_MYSQL_HOST, ADB_MYSQL_PORT, ADB_MYSQL_USER, ADB_MYSQL_PASSWORD, ADB_MYSQL_DATABASE, MCP_TOOLSETS, ALIBABA_CLOUD_ACCESS_KEY_ID, ALIBABA_CLOUD_ACCESS_KEY_SECRET. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Where it fits

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Alibabacloud Adb Mysql's toolset — describe_db_clusters, describe_db_cluster_attribute, describe_cluster_access_whitelist and 11 more — is a fair guide to whether it matches your workflow. It is maintained by aliyun; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Alibabacloud Adb Mysql's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Alibabacloud Adb Mysql.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
describe_db_clustersList ADB MySQL clusters in a region
describe_db_cluster_attributeGet detailed cluster attributes
describe_cluster_access_whitelistGet cluster IP whitelist
modify_cluster_access_whitelistModify cluster IP whitelist
describe_accountsList database accounts in a cluster
describe_cluster_net_infoGet cluster network connection info
get_current_timeGet current server time
describe_db_cluster_performanceQuery cluster performance metrics (CPU, memory, QPS, etc.)
describe_db_cluster_health_statusQuery cluster health status
describe_diagnosis_recordsQuery SQL diagnosis summary records
describe_diagnosis_sql_infoGet SQL execution details (plan, runtime info)
describe_bad_sql_detectionDetect bad SQL impacting cluster stability
describe_sql_patternsQuery SQL pattern list
describe_table_statisticsQuery table-level statistics

How to install the Alibabacloud Adb Mysql MCP server

{
  "mcpServers": {
    "adb-mysql-mcp-server": {
      "name": "adb-mysql-mcp-server",
      "type": "stdio",
      "isActive": true,
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/alibabacloud-adb-mysql-mcp-server",
        "run",
        "adb-mysql-mcp-server"
      ],
      "env": {
        "ADB_MYSQL_HOST": "your_adb_mysql_host",
        "ADB_MYSQL_PORT": "3306",
        "ADB_MYSQL_USER": "your_username",
        "ADB_MYSQL_PASSWORD": "your_password",
        "ADB_MYSQL_DATABASE": "your_database",
        "MCP_TOOLSETS": "sql"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
ADB_MYSQL_HOSTEndpoint or connection string the server talks to.Optional
ADB_MYSQL_PORTConfiguration value read at startup.Optional
ADB_MYSQL_USERConfiguration value read at startup.Optional
ADB_MYSQL_PASSWORDConfiguration value read at startup.Optional
ADB_MYSQL_DATABASEConfiguration value read at startup.Optional
MCP_TOOLSETSConfiguration value read at startup.Optional
ALIBABA_CLOUD_ACCESS_KEY_IDCredential the server authenticates with.Yes
ALIBABA_CLOUD_ACCESS_KEY_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • Use Alibabacloud Adb Mysql to describe db clusters.
  • Use Alibabacloud Adb Mysql to describe db cluster attribute.
  • Use Alibabacloud Adb Mysql to describe cluster access whitelist.

Frequently asked questions

It connects Alibabacloud Adb Mysql to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (describe_db_clusters, describe_db_cluster_attribute, describe_cluster_access_whitelist, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Alibabacloud Adb Mysql directly.