Alibaba Cloud AnalyticDB for MySQL

Alibaba Cloud AnalyticDB for MySQL

Universal MCP server interface for AI agents to access metadata and execute SQL on AnalyticDB for MySQL.

18
Stars
13
Forks
0
Releases

Overview

AnalyticDB for MySQL MCP Server serves as a universal interface between AI Agents and AnalyticDB for MySQL databases. It enables seamless communication that allows AI Agents to discover database metadata and perform SQL operations against AnalyticDB for MySQL clusters. The server exposes core tools such as execute_sql to run SQL queries, get_query_plan to retrieve the query plan, and get_execution_plan to obtain the actual execution plan with runtime statistics. It also provides resource endpoints to access metadata: a built-in resource adbmysql:///databases to list all databases and resource templates like adbmysql:///{schema}/tables, adbmysql:///{database}/{table}/ddl, and adbmysql:///{config}/{key}/value to fetch tables, DDL scripts, and cluster configuration values. Deployment options include local file mode and Python PIP mode for MCP client integration, with environment variables for connecting to the AnalyticDB for MySQL cluster. The README also describes how to develop your own MCP server, including using uv, installing node and Python dependencies, and debugging with the MCP Inspector.

Details

Owner
aliyun
Language
Python
License
Apache License 2.0
Updated
2025-12-07

Features

execute_sql

Execute SQL queries against AnalyticDB for MySQL cluster.

get_query_plan

Retrieve the query plan for a SQL query.

get_execution_plan

Fetch the actual execution plan with runtime statistics for a SQL query.

Built-in Resources

adbmysql:///databases: Retrieve all databases in the AnalyticDB for MySQL cluster.

Resource Template: Tables

adbmysql:///{schema}/tables: List all tables in a specific database.

Resource Template: DDL

adbmysql:///{database}/{table}/ddl: Get the DDL script for a table.

Resource Template: Config Values

adbmysql:///{config}/{key}/value: Get a config value for the cluster.

Deployment Modes

Supports Local File mode and PIP mode MCP client integration for configuration.

Audience

AI AgentsInterface for AI agents to access metadata and execute SQL on AnalyticDB for MySQL.
MCP IntegratorsConfigure and deploy MCP client connections to AnalyticDB for MySQL MCP Server.

Tags

AnalyticDB for MySQLMCP ServerAI AgentsSQLDatabase MetadataQuery PlanExecution PlanResourcesADB MySQL