ADB MySQL

v1.0.0Databasesstable

A universal interface that enables AI Agents to seamlessly communicate with Adb MySQL databases, allowing them to retrieve database metadata and execute SQL operations.

adb-mysql-mcp-servermcpai-integration
Share:
31
Stars
0
Downloads
0
Weekly
0/5

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

Enable AI agents to communicate with Adb MySQL databases seamlessly.
Retrieve database metadata and execute SQL operations through natural language.
aliyun

Maintainer

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

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx adb-mysql-mcp-server

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 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
1

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-server
2

Install dependencies with uv

Use the uv package manager to create a virtual environment and install all Python dependencies.

uv sync
3

Set 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_secret
4

Set 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_database
5

Configure your MCP client

Add the server to your MCP client configuration using the uv run command with your project path and credentials.

6

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.

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.

Quick Config Preview

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

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

Read the full setup guide →

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.

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