home / mcp / alibabacloud dms mcp server
A universal multi-cloud data MCP Server supporting over 40 types of data source connections, providing secure, unified data access in a single platform.β¨Supports full range of Alibaba Cloud services and Mainstream databases/data warehouses.
Configuration
View docs{
"mcpServers": {
"aliyun-alibabacloud-dms-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/alibabacloud-dms-mcp-server/src/alibabacloud_dms_mcp_server",
"run",
"server.py"
],
"env": {
"CONNECTION_STRING": "dbName@host:port",
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key"
}
}
}
}You can run and configure the AlibabaCloud DMS MCP Server to securely access and query multiple databases from a single control plane. It supports secure access, fine-grained permissions, high-risk SQL blocking, and NL2SQL-based data inquiries across dozens of data sources. This guide walks you through practical usage and concrete setup steps to get you querying quickly.
You interact with the MCP server through an MCP client. You can run the MCP server locally in two modes: multi-instance mode to manage multiple database instances, or single database mode to focus on a specific database. In practice, you will register your database instances, then use natural language queries or SQL scripts to retrieve results, inspect schemas, and perform data analysis across supported data sources.
Prerequisites you need before starting:
- uv or uvx runtime installed
- Python 3.10 or newer (for source-based setup)
- Access credentials for Alibaba Cloud DMS (AK/SK or STS token) with appropriate permissions
- Optional: CONNECTION_STRING for single-database operationsStep-by-step installation and run options are provided below. Choose the approach that matches how you want to run the MCP server.
1) Run from source code (multi-instance mode or single database mode) and 2) Run via PyPI package (multi-instance mode or single database mode). The config blocks below show the exact commands you need to start the MCP server in each scenario.
Option 1: Run from Source Code
Multi-instance Mode
python environment assumed; replace /path/to/... with your actual path
uv --directory /path/to/alibabacloud-dms-mcp-server/src/alibabacloud_dms_mcp_server run server.pyConfigure your MCP client to point to the MCP server using one of the supported modes. For multi-instance mode, you can manage multiple database instances across development, testing, and production environments. For single database mode, you target a specific database by providing a CONNECTION_STRING in the MCP client configuration.
Adds an instance to DMS. Only Aliyun instances are supported.
Search for instances from DMS.
Retrieves detailed information about an instance based on host and port.
Searches databases based on schemaName.
Retrieves detailed information about a specific database.
Lists tables under a specified database.
Retrieves detailed information about a specific table.
Executes an SQL script and returns the result.
Creates a data change order in DMS.
Retrieves order information from DMS.
Submits the order for approval in DMS.
Approves or rejects an order in DMS.
Converts natural language questions into SQL queries.
Natural language querying of a database (NL2SQL + execute SQL).
Analyzes and fixes SQL errors.
Answers SQL syntax-related questions.
Analyzes and optimizes SQL performance.