Skip to content

Commit 7b52934

Browse files
author
tianzhen.wtz
committed
Merge branch 'master' of gitlab.alibaba-inc.com:idb/alibabacloud-dms-mcp-server
2 parents e65b2d5 + b96cc91 commit 7b52934

File tree

3 files changed

+217
-2
lines changed

3 files changed

+217
-2
lines changed

doc/README-dts-en.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<!-- 顶部语言切换 -->
2+
3+
<p align="center">English | <a href="./README-dts-zh-cn.md">中文</a><br></p>
4+
5+
6+
# AlibabaCloud DTS MCP Server
7+
8+
**DTS MCP Server provides the capability for AI to rapidly configure data migration services.**。Alibaba Cloud Data Transmission Service (DTS) is a real-time data streaming service. DTS supports data transmission between data sources such as relational database management system (RDBMS) databases, NoSQL databases, and online analytical processing (OLAP) databases. DTS provides the data synchronization, data migration, change tracking, data integration, and data processing features. This allows you to manage data within a secure, scalable, and high-availability architecture.
9+
10+
---
11+
12+
## Core Features
13+
Enable AI to create **DTS migration tasks** through natural language descriptions, including the following capabilities:
14+
- Create migration job:configureDtsJob
15+
- Start migration job:startDtsJob
16+
- Get migration job detail information:getDtsJob
17+
18+
---
19+
## Tool List
20+
21+
### Metadata Related
22+
23+
#### configureDtsJob - Configure a dts job, migrate data from one RDS-MySQL to another RDS-MySQL.
24+
- **region_id** (string, required): The region id of the dts job (e.g., 'cn-hangzhou', 'cn-beijing').
25+
- **job_type** (string, required): The type of job (synchronization job: SYNC, migration job: MIGRATION, data check job: CHECK).
26+
- **source_endpoint_region** (string, required): The source endpoint region ID (e.g., 'cn-hangzhou', 'cn-beijing').
27+
- **source_endpoint_instance_type** (string, required): The source endpoint instance type (RDS, ECS, EXPRESS, CEN, DG).
28+
- **source_endpoint_engine_name** (string, required): The source endpoint engine name (MySQL, PostgreSQL, SQLServer).
29+
- **source_endpoint_instance_id** (string, required): The source endpoint instance ID (e.g., 'rm-xxx').
30+
- **source_endpoint_user_name** (string, required): The source endpoint user name.
31+
- **source_endpoint_password** (string, required): The source endpoint password.
32+
- **destination_endpoint_region** (string, required): The destination endpoint region ID (e.g., 'cn-hangzhou', 'cn-beijing').
33+
- **destination_endpoint_instance_type** (string, required): The destination endpoint instance type (RDS, ECS, EXPRESS, CEN, DG).
34+
- **destination_endpoint_engine_name** (string, required): The destination endpoint engine name (MySQL, PostgreSQL, SQLServer).
35+
- **destination_endpoint_instance_id** (string, required): The destination endpoint instance ID (e.g., 'rm-xxx').
36+
- **destination_endpoint_user_name** (string, required): The destination endpoint user name.
37+
- **destination_endpoint_password** (string, required): The destination endpoint password.
38+
- **db_list** (string, required): The database objects in JSON format, example 1: migration dtstest database, db_list should like {"dtstest":{"name":"dtstest","all":true}}; example 2: migration one table task01 in dtstest database, db_list should like {"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true}}}}; example 3: migration two tables task01 and task02 in dtstest database, db_list should like {"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true},"task02":{"name":"task02","all":true}}}}.
39+
40+
#### startDtsJob - 启动DTS迁移任务
41+
- **region_id** (string, required): The region id of the dts job (e.g., 'cn-hangzhou', 'cn-beijing').
42+
- **dts_job_id** (string, required): The job id of the dts job.
43+
44+
#### getDtsJob - 获取DTS迁移任务详情信息
45+
- **region_id** (string, required): The region id of the dts job (e.g., 'cn-hangzhou', 'cn-beijing').
46+
- **dts_job_id** (string, required): The job id of the dts job.
47+
48+
---
49+
50+
## Getting Started
51+
### Option 1: Run from Source Code
52+
#### Download the Code
53+
```bash
54+
git clone https://github.com/aliyun/alibabacloud-dms-mcp-server.git
55+
```
56+
57+
#### Configure MCP Client
58+
Add the following content to the configuration file:
59+
```json
60+
"mcpServers": {
61+
"dms-mcp-server": {
62+
"command": "uv",
63+
"args": [
64+
"--directory",
65+
"/path/to/alibabacloud-dms-mcp-server/src/alibabacloud_dms_mcp_server",
66+
"run",
67+
"server.py"
68+
],
69+
"env": {
70+
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
71+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
72+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
73+
}
74+
}
75+
}
76+
```
77+
### Option 2: Run via PyPI Package
78+
79+
```json
80+
"mcpServers": {
81+
"dms-mcp-server": {
82+
"command": "uvx",
83+
"args": [
84+
"alibabacloud-dms-mcp-server@latest"
85+
],
86+
"env": {
87+
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
88+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
89+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
90+
}
91+
}
92+
}
93+
```
94+
95+
96+
---
97+
98+
## Contact us
99+
100+
For any questions or suggestions, join the[Alibaba Cloud DMS MCP Group](https://h5.dingtalk.com/circle/joinCircle.html?corpId=dinga0bc5ccf937dad26bc961a6cb783455b&token=2f373e6778dcde124e1d3f22119a325b&groupCode=v1,k1,NqFGaQek4YfYPXVECdBUwn+OtL3y7IHStAJIO0no1qY=&from=group&ext=%7B%22channel%22%3A%22QR_GROUP_NORMAL%22%2C%22extension%22%3A%7B%22groupCode%22%3A%22v1%2Ck1%2CNqFGaQek4YfYPXVECdBUwn%2BOtL3y7IHStAJIO0no1qY%3D%22%2C%22groupFrom%22%3A%22group%22%7D%2C%22inviteId%22%3A2823675041%2C%22orgId%22%3A784037757%2C%22shareType%22%3A%22GROUP%22%7D&origin=11) (DingTalk Group ID: 129600002740) .
101+
102+
<img src="../images/ding-en.jpg" alt="Ding" width="40%">
103+
104+
[//]: # (<img src="http://dms-static.oss-cn-hangzhou.aliyuncs.com/mcp-readme/ding-en.jpg" alt="Ding" width="40%">)
105+
106+
107+
## License
108+
This project is licensed under the Apache 2.0 License.

doc/README-dts-zh-cn.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<!-- 顶部语言切换 -->
2+
3+
<p align="center"><a href="./README-dts-en.md">English</a> | 中文<br></p>
4+
5+
# AlibabaCloud DTS MCP Server
6+
7+
**DTS MCP Server为AI提供快速配置数据迁移服务的能力**。数据传输服务DTS(Data Transmission Service)是阿里云提供的实时数据流服务,支持关系型数据库(RDBMS)、非关系型的数据库(NoSQL)、数据多维分析(OLAP)等数据源间的数据交互,集数据同步、迁移、订阅、集成、加工于一体,助您构建安全、可扩展、高可用的数据架构。
8+
9+
---
10+
11+
## 核心特性
12+
为AI提供通过自然语言描述**创建DTS数据迁移任务**的能力,包含如下功能:
13+
- 创建1个DTS迁移任务:configureDtsJob
14+
- 启动DTS任务:startDtsJob
15+
- 查看DTS任务详情:getDtsJob
16+
17+
## 工具清单
18+
19+
### 数据迁移相关
20+
21+
#### configureDtsJob - 配置DTS数据迁移任务,将一个RDS-MySQL中的数据迁移到另外一个RDS-MySQL中。
22+
- **region_id** (字符串, 必需): 实例所在的区域(例如:杭州 "cn-hangzhou",北京 “cn-beijing”)。
23+
- **job_type** (字符串, 必需): DTS任务类型(例如:同步任务 “SYNC”,迁移任务 “MIGRATION”)。
24+
- **source_endpoint_region** (字符串, 必需): 源数据库所在的区域(例如:杭州 "cn-hangzhou",北京 “cn-beijing”)。
25+
- **source_endpoint_instance_type** (字符串, 必需): 源数据库实例类型(例如: RDS)
26+
- **source_endpoint_engine_name** (字符串, 必需): 源数据库引擎类型(例如:“MySQL”)。
27+
- **source_endpoint_instance_id** (字符串, 必需): 源数据库实例ID(例如:“rm-xxx”)。
28+
- **source_endpoint_user_name** (字符串, 必需): 源数据库连接用户名。
29+
- **source_endpoint_password** (字符串, 必需): 源数据库连接密码。
30+
- **destination_endpoint_region** (字符串, 必需): 目标数据库所在的区域(例如:杭州 "cn-hangzhou",北京 “cn-beijing”)。
31+
- **destination_endpoint_instance_type** (字符串, 必需): 目标数据库实例类型(例如: RDS)
32+
- **destination_endpoint_engine_name** (字符串, 必需): 目标数据库引擎类型(例如:“MySQL”)。
33+
- **destination_endpoint_instance_id** (字符串, 必需): 目标数据库实例ID(例如:“rm-xxx”)。
34+
- **destination_endpoint_user_name** (字符串, 必需): 目标数据库连接用户名。
35+
- **destination_endpoint_password** (字符串, 必需): 目标数据库连接密码。
36+
- **db_list** (字符串, 必需): 迁移对象,JSON字符串格式,示例1:迁移 dtstest 数据库,db_list为 {"dtstest":{"name":"dtstest","all":true}};示例2:迁移 dtstest 数据库下的 task01 表,db_list为 {"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true}}}};示例3:迁移 dtstest 数据库下的 task01、task02 表,db_list为 {"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true},"task02":{"name":"task02","all":true}}}}。
37+
38+
#### startDtsJob - 启动DTS迁移任务。
39+
- **region_id** (字符串, 必需): 实例所在的区域(例如:杭州 "cn-hangzhou",北京 “cn-beijing”)。
40+
- **dts_job_id** (字符串, 必需): DTS任务ID。
41+
42+
#### getDtsJob - 获取DTS迁移任务详情信息。
43+
- **region_id** (字符串, 必需): 实例所在的区域(例如:杭州 "cn-hangzhou",北京 “cn-beijing”)。
44+
- **dts_job_id** (字符串, 必需): DTS任务ID。
45+
46+
---
47+
48+
## 快速开始
49+
50+
### 方案一 使用源码运行
51+
#### 下载代码
52+
```bash
53+
git clone https://github.com/aliyun/alibabacloud-dms-mcp-server.git
54+
```
55+
56+
#### 配置MCP客户端
57+
在配置文件中添加以下内容:
58+
```json
59+
"mcpServers": {
60+
"dms-mcp-server": {
61+
"command": "uv",
62+
"args": [
63+
"--directory",
64+
"/path/to/alibabacloud-dms-mcp-server/src/alibabacloud_dms_mcp_server",
65+
"run",
66+
"server.py"
67+
],
68+
"env": {
69+
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
70+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
71+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
72+
}
73+
}
74+
}
75+
```
76+
77+
### 方案二 使用PyPI包运行
78+
```json
79+
"mcpServers": {
80+
"dms-mcp-server": {
81+
"command": "uvx",
82+
"args": [
83+
"alibabacloud-dms-mcp-server@latest"
84+
],
85+
"env": {
86+
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
87+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
88+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token optional, required when using STS Token"
89+
}
90+
}
91+
}
92+
```
93+
94+
---
95+
96+
## Contact us
97+
98+
如果您有使用问题或建议, 请加入[Alibaba Cloud DMS MCP讨论组](https://h5.dingtalk.com/circle/joinCircle.html?corpId=dinga0bc5ccf937dad26bc961a6cb783455b&token=2f373e6778dcde124e1d3f22119a325b&groupCode=v1,k1,NqFGaQek4YfYPXVECdBUwn+OtL3y7IHStAJIO0no1qY=&from=group&ext=%7B%22channel%22%3A%22QR_GROUP_NORMAL%22%2C%22extension%22%3A%7B%22groupCode%22%3A%22v1%2Ck1%2CNqFGaQek4YfYPXVECdBUwn%2BOtL3y7IHStAJIO0no1qY%3D%22%2C%22groupFrom%22%3A%22group%22%7D%2C%22inviteId%22%3A2823675041%2C%22orgId%22%3A784037757%2C%22shareType%22%3A%22GROUP%22%7D&origin=11) (钉钉群号:129600002740) 进行讨论.
99+
100+
<img src="../images/ding-en.jpg" alt="Ding" width="40%">
101+
102+
[//]: # (<img src="http://dms-static.oss-cn-hangzhou.aliyuncs.com/mcp-readme/ding-zh-cn.jpg" alt="Ding" width="60%">)
103+
104+
105+
106+
## License
107+
This project is licensed under the Apache 2.0 License.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "alibabacloud-dms-mcp-server"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
description = "MCP Server for AlibabaCloud DMS"
55
readme = "README.md"
66
authors = [
@@ -28,7 +28,7 @@ dev = [
2828
]
2929

3030
[project.scripts]
31-
alibabacloud-dms-mcp-server = "alibabacloud_dms_mcp_server.server:main"
31+
alibabacloud-dms-mcp-server = "alibabacloud_dms_mcp_server.server:run_server"
3232

3333
[build-system]
3434
requires = ["hatchling"]

0 commit comments

Comments
 (0)