Alibaba Cloud AnalyticDB for MySQL logo

Alibaba Cloud AnalyticDB for MySQL

Free

阿里云 AnalyticDB for MySQL 官方集成,连接 AnalyticDB for MySQL 集群进行数据库元数据查询和数据分析。

FreeFree tier
Type
Open Source
Company
Alibaba Cloud

About Alibaba Cloud AnalyticDB for MySQL

AnalyticDB for MySQL MCP Server is a universal interface between AI Agents and AnalyticDB MySQL, providing two tool groups: SQL Tools for direct database connections to execute SQL, view execution plans, and browse metadata, and OpenAPI Tools for managing clusters, whitelists, accounts, networking, monitoring, diagnostics, and audit logs via Alibaba Cloud OpenAPI. The SQL group runs in read-only mode by default; full SQL execution requires the explicit setting ENABLE_SQL_WRITE_TOOLS=true. It supports temporary account creation when database credentials are not provided but an AccessKey is available. The server can be used with remote SSE/Streamable HTTP and API key authentication.

Key Features

Execute SQL queries on AnalyticDB MySQL clusters in read-only mode by default
View execution plans (EXPLAIN) and browse database metadata
Manage clusters, whitelists, accounts, networking, monitoring, diagnostics, and audit logs via Alibaba Cloud OpenAPI
Full SQL execution support (INSERT/UPDATE/DELETE/DDL) with explicit enable flag
Temporary database account creation using Alibaba Cloud AccessKey
Remote SSE/Streamable HTTP support with API key authentication
Supports direct database connection or OpenAPI-based temporary account mode

Pros & Cons

Pros
  • Provides a universal interface for AI agents to interact with AnalyticDB MySQL
  • Offers both SQL and OpenAPI tool groups for comprehensive functionality
  • Default read-only mode enhances security for query operations
  • Supports temporary account generation, reducing need for permanent credentials
  • Well-documented with multiple configuration scenarios and quick start guide
  • Open-source and free to use
Cons
  • Requires Python 3.13 and uv package manager for setup
  • Full SQL execution requires explicit enable flag, which may be overlooked by new users
  • OpenAPI tools require Alibaba Cloud AccessKey credentials
  • Limited to AnalyticDB MySQL; not applicable to other databases

Best For

Read-only SQL querying and troubleshooting of AnalyticDB MySQL databasesDatabase metadata browsing and execution plan analysisCluster administration including account and whitelist managementMonitoring, diagnostics, and audit log retrieval for AnalyticDB MySQLFull SQL execution for data manipulation and DDL operations in trusted environmentsIntegration with AI agents for automated database management and analysis

FAQ

What is the default mode of the SQL tool group?
The SQL tool group runs in read-only mode by default, allowing SELECT, EXPLAIN, and metadata browsing. Full SQL execution requires setting ENABLE_SQL_WRITE_TOOLS=true.
How do I enable full SQL execution?
Set the environment variable ENABLE_SQL_WRITE_TOOLS=true when running the MCP server. This enables INSERT, UPDATE, DELETE, DDL, and multi-statement SQL execution.
Can I use this server without direct database credentials?
Yes, if you have an Alibaba Cloud AccessKey, the server can create a temporary database account via OpenAPI. You must then provide region_id and db_cluster_id in SQL tool calls.
How do I configure remote access to this MCP server?
When SERVER_HOST is not a loopback address, you must configure API_KEY on the server and include Authorization: Bearer API_KEY on the client.
What are the prerequisites for using this MCP server?
You need Python 3.13, the uv package manager, and optionally an Alibaba Cloud AccessKey for OpenAPI tools and ADB MySQL connection credentials for SQL tools.