ADB MySQL
A universal interface that enables AI Agents to seamlessly communicate with Adb MySQL databases, allowing them to retrieve database metadata and execute SQL operations.
What is ADB MySQL?
ADB MySQL is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to universal interface that enables ai agents to seamlessly communicate with adb mysql databases, allowing them to retrieve database metadata and execute sql operations.
A universal interface that enables AI Agents to seamlessly communicate with Adb MySQL databases, allowing them to retrieve database metadata and execute SQL operations.
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A universal interface that enables AI Agents to seamlessly c
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx adb-mysql-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use ADB MySQL
AnalyticDB for MySQL MCP Server is an Alibaba Cloud open-source server that gives AI agents a universal interface to AnalyticDB for MySQL (ADB MySQL) clusters, covering both cluster management via the Alibaba Cloud OpenAPI and direct SQL execution against the database. It exposes tools for listing clusters, diagnosing performance, detecting bad SQL, viewing execution plans with EXPLAIN and EXPLAIN ANALYZE, browsing database metadata, and managing whitelists and accounts — all accessible through natural language. Teams using Alibaba Cloud's analytical database platform can use it to accelerate query tuning, health monitoring, and database administration without context-switching to the console.
Prerequisites
- Python 3.10 or higher and uv package manager installed
- Alibaba Cloud account with an ADB MySQL cluster and Access Key ID / Access Key Secret
- An MCP-compatible client such as Claude Desktop or Claude Code
- Optional: direct database credentials (ADB_MYSQL_HOST, user, password) for SQL tool access
Clone the repository
Download the server source code from Alibaba Cloud's GitHub organization.
git clone https://github.com/aliyun/alibabacloud-adb-mysql-mcp-server
cd alibabacloud-adb-mysql-mcp-serverInstall dependencies with uv
Use the uv package manager to create a virtual environment and install all Python dependencies.
uv syncSet Alibaba Cloud credentials
Export your Alibaba Cloud Access Key credentials. These are required for the OpenAPI cluster management tools.
export ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key_id
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_key_secretSet optional database connection variables
To enable direct SQL execution, also set the database host, port, user, password, and database name.
export ADB_MYSQL_HOST=your-cluster.ads.aliyuncs.com
export ADB_MYSQL_PORT=3306
export ADB_MYSQL_USER=your_user
export ADB_MYSQL_PASSWORD=your_password
export ADB_MYSQL_DATABASE=your_databaseConfigure your MCP client
Add the server to your MCP client configuration using the uv run command with your project path and credentials.
Test the connection
Ask your assistant to list ADB MySQL clusters in your region. A successful response confirms OpenAPI authentication is working.
ADB MySQL Examples
Client configuration
Add the ADB MySQL MCP server to claude_desktop_config.json using uv run with all required environment variables.
{
"mcpServers": {
"adb-mysql": {
"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-cluster.ads.aliyuncs.com",
"ADB_MYSQL_PORT": "3306",
"ADB_MYSQL_USER": "your_user",
"ADB_MYSQL_PASSWORD": "your_password",
"ADB_MYSQL_DATABASE": "your_database"
}
}
}
}Prompts to try
Use these prompts to manage and diagnose your ADB MySQL clusters through natural language.
- "List all ADB MySQL clusters in my region"
- "Show me the performance metrics for my cluster adb-abc123"
- "Execute this SQL query and show me the execution plan: SELECT * FROM orders WHERE status = 'pending'"
- "Detect any bad SQL queries impacting cluster stability"
- "Get table statistics for the orders table in my database"Troubleshooting ADB MySQL
OpenAPI calls fail with authentication errors
Verify ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are correct and that the RAM user or role has ADB MySQL permissions (AliyunADBFullAccess or a custom policy). STS tokens require also setting ALIBABA_CLOUD_SECURITY_TOKEN.
SQL tools fail to connect even though OpenAPI tools work
SQL tools require separate database credentials (ADB_MYSQL_HOST, ADB_MYSQL_USER, ADB_MYSQL_PASSWORD, ADB_MYSQL_DATABASE). Ensure these are set and that your IP is whitelisted in the cluster's security whitelist.
Connection times out when reaching the ADB MySQL host
The default connect timeout is 2 seconds (ADB_MYSQL_CONNECT_TIMEOUT). Increase it for slow networks: export ADB_MYSQL_CONNECT_TIMEOUT=10. Also verify the cluster endpoint is publicly accessible or that you are on the correct VPC/VPN.
Frequently Asked Questions about ADB MySQL
What is ADB MySQL?
ADB MySQL is a Model Context Protocol (MCP) server that universal interface that enables ai agents to seamlessly communicate with adb mysql databases, allowing them to retrieve database metadata and execute sql operations. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install ADB MySQL?
Follow the installation instructions on the ADB MySQL GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with ADB MySQL?
ADB MySQL works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is ADB MySQL free to use?
Yes, ADB MySQL is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
ADB MySQL Alternatives — Similar Databases Servers
Looking for alternatives to ADB MySQL? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up ADB MySQL in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use 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.