Alibaba ADB MySQL

v1.0.0Cloud Servicesstable

AnalyticDB for MySQL MCP Server

alibabacloud-adb-mysqlmcpai-integration
Share:
31
Stars
0
Downloads
0
Weekly
0/5

What is Alibaba ADB MySQL?

Alibaba ADB MySQL is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to analyticdb for mysql mcp server

AnalyticDB for MySQL MCP Server

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • AnalyticDB for MySQL MCP Server

Use Cases

Integrate with Alibaba Cloud's AnalyticDB for MySQL through Model Context Protocol.
Query cloud-based analytical databases via AI assistant interface.
aliyun

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedApr 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx alibabacloud-adb-mysql

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Alibaba ADB MySQL

The Alibaba Cloud AnalyticDB for MySQL MCP Server provides AI assistants with two categories of access to Alibaba Cloud's managed analytical database service: SQL tools for direct database connections to execute queries, view execution plans, and browse schema metadata; and OpenAPI tools for managing clusters, whitelists, accounts, networking, monitoring, diagnostics, and audit logs via the Alibaba Cloud OpenAPI. Read-only tools are annotated with readOnlyHint for client-side safety enforcement. This server is built in Python and requires Python 3.13+ with the uv package manager.

Prerequisites

  • Python 3.13 or higher installed
  • uv package manager installed (see docs.astral.sh/uv for installation)
  • An Alibaba Cloud account with an AccessKey ID and AccessKey Secret (for OpenAPI/cluster management tools)
  • AnalyticDB for MySQL cluster credentials: host, port, username, password, database name (for SQL/direct-connection tools)
  • An MCP client such as Claude Desktop, Claude Code, or Cherry Studio
1

Clone the repository

Clone the official Alibaba Cloud ADB MySQL MCP Server repository and sync dependencies with uv.

git clone https://github.com/aliyun/alibabacloud-adb-mysql-mcp-server.git
cd alibabacloud-adb-mysql-mcp-server
uv sync
2

Gather your credentials

For SQL tools, you need your ADB MySQL host, port, username, password, and database. For OpenAPI tools (cluster management), you need your Alibaba Cloud AccessKey ID and Secret from the RAM console.

3

Configure for SQL tools only

To use only direct SQL access, configure with database connection environment variables. OpenAPI tools are automatically disabled when AccessKey credentials are absent.

{
  "mcpServers": {
    "adb-mysql-mcp-server": {
      "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"
      }
    }
  }
}
4

Configure for full access (SQL + OpenAPI)

To enable both SQL tools and OpenAPI cluster management tools, combine all environment variables in a single configuration block.

{
  "mcpServers": {
    "adb-mysql-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/alibabacloud-adb-mysql-mcp-server",
        "run",
        "adb-mysql-mcp-server"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "your_access_key_id",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your_access_key_secret",
        "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"
      }
    }
  }
}
5

Restart your MCP client and test

Restart Claude Desktop or your chosen MCP client. Verify the connection by asking the assistant to list tables or describe the database schema.

Alibaba ADB MySQL Examples

Client configuration

Claude Desktop configuration combining SQL tools and OpenAPI management tools for full access to ADB MySQL.

{
  "mcpServers": {
    "adb-mysql-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/alibabacloud-adb-mysql-mcp-server",
        "run",
        "adb-mysql-mcp-server"
      ],
      "env": {
        "ALIBABA_CLOUD_ACCESS_KEY_ID": "your_access_key_id",
        "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your_access_key_secret",
        "ADB_MYSQL_HOST": "adb-xxxx.mysql.rds.aliyuncs.com",
        "ADB_MYSQL_PORT": "3306",
        "ADB_MYSQL_USER": "your_username",
        "ADB_MYSQL_PASSWORD": "your_password",
        "ADB_MYSQL_DATABASE": "your_database"
      }
    }
  }
}

Prompts to try

Example prompts for querying and managing your AnalyticDB for MySQL cluster.

- "Show me all tables in the current database and their row counts"
- "Run this query and explain the execution plan: SELECT * FROM orders WHERE created_at > '2024-01-01'"
- "List all AnalyticDB MySQL clusters in my Alibaba Cloud account"
- "Show me the slow query logs for my ADB cluster from the past hour"
- "What are the current whitelist IP rules for my cluster?"
- "Describe the schema of the 'sales_data' table"

Troubleshooting Alibaba ADB MySQL

Python version error: requires Python 3.13+

Install Python 3.13 or higher. With uv, you can manage Python versions with 'uv python install 3.13'. The uv package manager will automatically use the correct version when running the server.

OpenAPI tools are not available even with AccessKey credentials

Verify ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. The AccessKey must belong to a RAM user or account with permissions for ADB MySQL OpenAPI actions. Also check that ALIBABA_CLOUD_SECURITY_TOKEN is set if using temporary STS credentials.

SQL connection fails with 'Access denied' or 'Connection refused'

Confirm ADB_MYSQL_HOST is the correct endpoint for your cluster (visible in the Alibaba Cloud ADB MySQL console). Ensure the connecting IP address is in the cluster's whitelist. Default port is 3306 — verify this matches your cluster configuration.

Frequently Asked Questions about Alibaba ADB MySQL

What is Alibaba ADB MySQL?

Alibaba ADB MySQL is a Model Context Protocol (MCP) server that analyticdb for mysql mcp server It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Alibaba ADB MySQL?

Follow the installation instructions on the Alibaba ADB MySQL GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Alibaba ADB MySQL?

Alibaba ADB MySQL works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Alibaba ADB MySQL free to use?

Yes, Alibaba ADB MySQL is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "alibabacloud-adb-mysql": { "command": "npx", "args": ["-y", "alibabacloud-adb-mysql"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Alibaba ADB MySQL?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides