ali-cloud-adb-mysql-integration-service
A specialized mechanism designed to broker secure, real-time exchanges between sophisticated Artificial Intelligence entities and AnalyticDB for MySQL instances. This service exposes capabilities for querying database structure schemas and executing arbitrary Structured Query Language commands, thereby amplifying AI-driven data retrieval efficacy against Alibaba Cloud's Analytical Database infrastructure.
Author

aliyun
Quick Info
Actions
Tags
AnalyticDB for MySQL Interface Gateway
This gateway component establishes a universal conduit connecting autonomous AI agents with provisioned AnalyticDB for MySQL data stores. Its primary function is to facilitate the introspection of database schema details and the submission of procedural SQL instructions, thereby empowering AI systems with direct, controlled access to critical data assets.
1. Deployment via MCP Client Setup
Configuration Path A: Local Repository Checkout
-
Source Code Acquisition
shell git clone https://github.com/aliyun/alibabacloud-adb-mysql-mcp-server
-
MCP Client Configuration Insertion
Integrate the subsequent object into your primary MCP configuration manifesto:
{ "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": "host", "ADB_MYSQL_PORT": "port", "ADB_MYSQL_USER": "database_user", "ADB_MYSQL_PASSWORD": "database_password", "ADB_MYSQL_DATABASE": "database" } } } }
Configuration Path B: Utilizing Python Package Index (PIP)
-
Installation Procedure
Leverage the package installer to deploy the server module:
bash pip install adb-mysql-mcp-server
-
MCP Client Integration Manifest
Amend your client configuration file with this mapping:
{ "mcpServers": { "adb-mysql-mcp-server": { "command": "uv", "args": [ "run", "--with", "adb-mysql-mcp-server", "adb-mysql-mcp-server" ], "env": { "ADB_MYSQL_HOST": "host", "ADB_MYSQL_PORT": "port", "ADB_MYSQL_USER": "database_user", "ADB_MYSQL_PASSWORD": "database_password", "ADB_MYSQL_DATABASE": "database" } } } }
2. Custom AnalyticDB for MySQL Server Development
To initiate development of a bespoke AnalyticDB for MySQL MCP Server instance, adhere to the subsequent prerequisites and installation steps:
- Retrieve the source repository contents from GitHub.
- Install the dependency resolver package, uv.
- Ensure the presence of Node.js, which supplies the
npxutility for package execution. - In the project's root directory, finalize dependency resolution using:
shell uv pip install -r pyproject.toml
- For local verification and debugging, invoke the MCP Inspector utility with the following command structure:
shell npx @modelcontextprotocol/inspector \ -e ADB_MYSQL_HOST=your_host \ -e ADB_MYSQL_PORT=your_port \ -e ADB_MYSQL_USER=your_username \ -e ADB_MYSQL_PASSWORD=your_password \ -e ADB_MYSQL_DATABASE=your_database \ uv --directory /path/to/alibabacloud-adb-mysql-mcp-server run adb-mysql-mcp-server
3. Functional Components of the AnalyticDB for MySQL MCP Server
-
Operational Tools (Methods)
-
execute_sql: Facilitates the submission and execution of arbitrary SQL queries against the AnalyticDB for MySQL cluster. -
get_query_plan: Retrieves the theoretical execution blueprint for a specified SQL statement. -
get_execution_plan: Yields the concrete execution plan, inclusive of observed runtime performance metrics, for a given SQL query.
-
-
Data Access Pathways (Resources)
-
Intrinsic Resources
adbmysql:///databases: Enumerates all accessible database schemas within the AnalyticDB instance.
-
Templated Resource Endpoints
-
adbmysql:///{schema}/tables: Lists all constituent tables belonging to a designated database schema. -
adbmysql:///{database}/{table}/ddl: Generates the Data Definition Language (DDL) script required to recreate a specified table structure. -
adbmysql:///{config}/{key}/value: Fetches the associated parameter value for a specific configuration setting within the cluster environment.
-
-
-
Agent Directives (Prompts)
No standardized directive sets are currently cataloged.
