Alibaba Cloud DMS MCP Server
Official阿里云DMS MCP服务器
AI赋能的统一数据管理网关,支持连接30+数据源,作为多云通用数据MCP服务器,一站式解决跨源数据安全访问。
支持阿里云全系列:RDS、PolarDB、ADB系列、Lindorm系列、TableStore系列、MaxCompute系列。
支持主流数据库/仓库:MySQL、MariaDB、PostgreSQL、Oracle、SQLServer、Redis、MongoDB、StarRocks、Clickhouse、SelectDB、DB2、OceanBase、Gauss、BigQuery 等。
核心功能
为AI提供统一的数据访问层和元数据访问层,通过标准化接口解决:
数据源碎片化导致的维护成本
异构协议之间的兼容性问题
不受控制的账户权限和不可审计的操作带来的安全风险
MCP 的主要功能包括:
NL2SQL :通过自然语言执行SQL,获取数据结果
代码生成:通过此服务检索模式信息以生成 DAO 代码或执行结构分析
数据检索:自动将 SQL 路由到准确的数据源以支持业务
安全性:细粒度的访问控制和可审计性
Related MCP server: MCP TapData Server
工具清单
元数据相关
addInstance:向DMS添加实例,如果实例已存在,则返回现有实例信息。
db_user (字符串,必需):用于连接数据库的用户名。
db_password (字符串,必需):连接数据库的密码。
instance_resource_id (字符串,可选):实例的资源 ID,通常由云服务提供商分配。
host (字符串,可选):实例的连接地址。
port (字符串,可选):实例的连接端口号。
region (字符串,可选):实例所在的区域(例如,“cn-hangzhou”)。
getInstance:根据主机和端口信息从 DMS 检索实例详细信息。
host (字符串,必需):实例的连接地址。
port (字符串,必需):实例的连接端口号。
sid (字符串,可选):类似 Oracle 的数据库必需,默认为无。
searchDatabase:根据 schemaName 在 DMS 中搜索数据库。
search_key (字符串,必需):schemaName。
page_number (整数,可选):要检索的页码(从 1 开始),默认为 1。
page_size (整数,可选):每页结果数(最多 1000 条),默认为 200。
getDatabase:从 DMS 检索有关特定数据库的详细信息。
host (字符串,必需):实例的连接地址。
port (字符串,必需):实例的连接端口号。
schema_name (字符串,必需):数据库名称。
sid (字符串,可选):类似 Oracle 的数据库必需,默认为无。
listTable:根据databaseId和tableName查找DMS中的数据表。
database_id (字符串,必需):用于限制搜索范围的数据库 ID(通过 getDatabase 获取)。
search_name (字符串,必需):非空字符串作为搜索关键字来匹配表名。
page_number (整数,可选):分页页码(默认值:1)。
page_size (整数,可选):每页的结果数(默认值:200,最大值:200)。
getTableDetailInfo:检索特定数据表的详细元数据信息,包括字段和索引详细信息。
table_guid (字符串,必需):表的唯一标识符(格式:dmsTableId.schemaName.tableName),通过searchTable或listTable获取。
SQL执行相关
executeScript:通过DMS执行SQL脚本并返回结果。
database_id (字符串,必需):DMS 数据库 ID(通过 getDatabase 获取)。
脚本(字符串,必需):要执行的 SQL 脚本内容。
NL2SQL相关
nl2sql:将自然语言问题转换为可执行的 SQL 查询。
问题(字符串,必需):要转换为 SQL 的自然语言问题。
database_id (整数,必需):DMS 数据库 ID(通过 getDatabase 获取)。
知识(字符串,可选):协助 SQL 生成的附加上下文或数据库知识。
支持的数据源
数据源/工具 | NL2SQL nlsql | 执行脚本 executeScript | 显示架构 getTableDetailInfo | 访问控制 默认值 | 审计日志 默认 |
MySQL | ✅ | ✅ | ✅ | ✅ | ✅ |
MariaDB | ✅ | ✅ | ✅ | ✅ | ✅ |
PostgreSQL | ✅ | ✅ | ✅ | ✅ | ✅ |
甲骨文 | ✅ | ✅ | ✅ | ✅ | ✅ |
SQL服务器 | ✅ | ✅ | ✅ | ✅ | ✅ |
Redis | ✅ | ✅ | ✅ | ✅ | ✅ |
MongoDB | ✅ | ✅ | ✅ | ✅ | ✅ |
星石 | ✅ | ✅ | ✅ | ✅ | ✅ |
Clickhouse | ✅ | ✅ | ✅ | ✅ | ✅ |
选择数据库 | ✅ | ✅ | ✅ | ✅ | ✅ |
DB2 | ✅ | ✅ | ✅ | ✅ | ✅ |
OceanBase | ✅ | ✅ | ✅ | ✅ | ✅ |
高斯 | ✅ | ✅ | ✅ | ✅ | ✅ |
BigQuery | ✅ | ✅ | ✅ | ✅ | ✅ |
PolarDB | ✅ | ✅ | ✅ | ✅ | ✅ |
PolarDB-X | ✅ | ✅ | ✅ | ✅ | ✅ |
分析型数据库 | ✅ | ✅ | ✅ | ✅ | ✅ |
林多姆 | ✅ | ✅ | ✅ | ✅ | ✅ |
表格存储 | ✅ | ✅ | ✅ | ✅ | ✅ |
MaxCompute | ✅ | ✅ | ✅ | ✅ | ✅ |
霍洛格雷斯 | ✅ | ✅ | ✅ | ✅ | ✅ |
入门
选项 1:从源代码运行
下载代码
git clone https://github.com/aliyun/alibabacloud-dms-mcp-server.git配置 MCP 客户端
在配置文件中添加以下内容:
"mcpServers": {
"dms-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/alibabacloud-dms-mcp-server/src/alibabacloud_dms_mcp_server",
"run",
"server.py"
],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
}
}
}选项 2:通过 PyPI 包运行
"mcpServers": {
"dms-mcp-server": {
"command": "uvx",
"args": [
"alibabacloud-dms-mcp-server@latest"
],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
}
}
}联系我们
有任何疑问或建议,欢迎加入阿里云DMS MCP群(钉钉群ID:129600002740)。
执照
该项目采用 Apache 2.0 许可证授权。
Available Tools
16 toolsaddInstanceA
Add an instance to DMS. The username and password are required. Only Aliyun instances are supported. Either instance_resource_id or host and port must be provided. The region is optional, but it's recommended to include it.If the instance already exists, it will return the existing instance information.
Inputs: db_user (required), db_password (required), instance_resource_id, host, +2 more.
answerSqlSyntaxARead-only
Answer syntax-related questions for the corresponding database engine based on the database ID.If you don't know the databaseId, first use getDatabase or searchDatabase to retrieve it. (1) If you have the exact host, port, and database name, use getDatabase. (2) If you only know the database name, use searchDatabase. (3) If you don't know any information, ask the user to provide the necessary details. Note: searchDatabase may return multiple databases. In this case, let the user choose which one to use.
Inputs: database_id (required), question (required), model.
approveOrderB
Approve or reject an order in DMS. The workflow_instance_id can be obtained from getOrderInfo.
Inputs: workflow_instance_id (required), approval_type (required), comment.
createDataChangeOrderADestructive
Execute SQL changes through a data change order, and a corresponding order ID will be returned. Prefer using the executeScript tool for SQL execution;only use this tool when explicitly instructed to perform the operation via a order.If you don't know the databaseId, first use getDatabase or searchDatabase to retrieve it. (1) If you have the exact host, port, and database name, use getDatabase. (2) If you only know the database name, use searchDatabase. (3) If you don't know any information, ask the user to provide the necessary details. Note: searchDatabase may return multiple databases. In this case, let the user choose which one to use.
Inputs: database_id (required), script (required), logic, comment.
executeScriptADestructive
Execute SQL script against a database in DMS and return structured results.If you don't know the databaseId, first use getDatabase or searchDatabase to retrieve it. (1) If you have the exact host, port, and database name, use getDatabase. (2) If you only know the database name, use searchDatabase. (3) If you don't know any information, ask the user to provide the necessary details. Note: searchDatabase may return multiple databases. In this case, let the user choose which one to use.
Inputs: database_id (required), script (required), logic.
fixSqlARead-only
Analyze and fix the SQL error based on the provided SQL statement, error message, and database ID.If you don't know the databaseId, first use getDatabase or searchDatabase to retrieve it. (1) If you have the exact host, port, and database name, use getDatabase. (2) If you only know the database name, use searchDatabase. (3) If you don't know any information, ask the user to provide the necessary details. Note: searchDatabase may return multiple databases. In this case, let the user choose which one to use.
Inputs: database_id (required), sql (required), error (required), question, +1 more.
generateSqlARead-only
Generate SELECT-type SQL queries from natural language input.
Inputs: database_id (required), question (required), knowledge, model.
getDatabaseBRead-only
Obtain detailed information about a specific database in DMS when the host and port are provided.
Inputs: host (required), port (required), schema_name (required), sid.
getInstanceARead-only
Retrieve detailed instance information from DMS using the host and port.
Inputs: host (required), port (required), sid.
getOrderInfoARead-only
Retrieve order information from DMS using the order ID.
Inputs: order_id (required).
getTableDetailInfoARead-only
Retrieve detailed metadata information about a specific database table including schema and index details. If you don't know the table_guid parameter, retrieve it using listTables.
Inputs: table_guid (required).
listInstancesCRead-only
Search for instances from DMS.
Inputs: search_key, db_type, env_type.
listTablesARead-only
Search for tables by databaseId and (optional) table name. If you don't know the databaseId, first use getDatabase or searchDatabase to retrieve it. (1) If you have the exact host, port, and database name, use getDatabase. (2) If you only know the database name, use searchDatabase. (3) If you don't know any information, ask the user to provide the necessary details. Note: searchDatabase may return multiple databases. In this case, let the user choose which one to use.
Inputs: database_id (required), search_name, page_number, page_size.
optimizeSqlARead-only
Analyze and optimize SQL performance based on the provided SQL statement and database IDIf you don't know the databaseId, first use getDatabase or searchDatabase to retrieve it. (1) If you have the exact host, port, and database name, use getDatabase. (2) If you only know the database name, use searchDatabase. (3) If you don't know any information, ask the user to provide the necessary details. Note: searchDatabase may return multiple databases. In this case, let the user choose which one to use.
Inputs: database_id (required), sql (required), question, model.
searchDatabaseARead-only
Search databases in DMS by name.
Inputs: search_key (required), page_number, page_size.
submitOrderApprovalA
Submit the order for approval in DMS using the order ID.
Inputs: order_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Every tool has a clearly distinct purpose: instance management, database retrieval, SQL execution, SQL analysis (fix, optimize, generate, syntax), and order processing. Overlapping tools like executeScript and createDataChangeOrder are differentiated by direct vs. order-based execution, with clear descriptions.
All tools follow a verb_noun pattern in camelCase (e.g., addInstance, executeScript, getDatabase, listInstances). The naming is predictable and consistent, with no mixing of styles or unclear abbreviations.
16 tools is slightly above the ideal 3-15 range but still well-scoped for the DMS domain. Each tool serves a specific function without redundancy, and the count reflects a comprehensive feature set without being overwhelming.
The tool set covers core operations: instance CRUD (get, list, add but no delete/update), database queries, SQL analysis, and order management. Missing operations like instance/database deletion or user management create notable gaps, but the core workflow is supported.
Maintenance
Related MCP Connectors
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables large language models to interact with Apache Superset databases through REST API, supporting database queries, table lookups, field information retrieval, and SQL execution.45ISC

MCP TapData Serverofficial
FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.-- AlicenseNot gradedqualityDmaintenanceAn enhanced Model Context Protocol server that enables LLMs to inspect database schemas with rich metadata and execute read-only SQL queries with safety checks.176 npm25MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs like Claude to interact with SQLite and SQL Server databases, allowing for schema inspection and SQL query execution.408MIT