- Home
- MCP servers
- AlibabaCloud DMS
AlibabaCloud DMS
- python
29
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
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 operations
Step-by-step installation and run options are provided below. Choose the approach that matches how you want to run the MCP server.
- 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.py
Additional setup and usage notes
Configure 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.
Available tools
addInstance
Adds an instance to DMS. Only Aliyun instances are supported.
listInstances
Search for instances from DMS.
getInstance
Retrieves detailed information about an instance based on host and port.
searchDatabase
Searches databases based on schemaName.
getDatabase
Retrieves detailed information about a specific database.
listTables
Lists tables under a specified database.
getTableDetailInfo
Retrieves detailed information about a specific table.
executeScript
Executes an SQL script and returns the result.
createDataChangeOrder
Creates a data change order in DMS.
getOrderInfo
Retrieves order information from DMS.
submitOrderApproval
Submits the order for approval in DMS.
approveOrder
Approves or rejects an order in DMS.
generateSql
Converts natural language questions into SQL queries.
askDatabase
Natural language querying of a database (NL2SQL + execute SQL).
fixSql
Analyzes and fixes SQL errors.
answerSqlSyntax
Answers SQL syntax-related questions.
optimizeSql
Analyzes and optimizes SQL performance.