Skip to content

Commit a32b375

Browse files
authored
Merge branch 'main' into feature/modify_security_ips
2 parents 09234ea + e188fdf commit a32b375

File tree

9 files changed

+719
-245
lines changed

9 files changed

+719
-245
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: push
55
jobs:
66
build:
77
name: Build distribution 📦
8+
if: startsWith(github.ref, 'refs/tags/')
89
runs-on: ubuntu-latest
910

1011
steps:
@@ -93,27 +94,28 @@ jobs:
9394
gh release upload
9495
"$GITHUB_REF_NAME" dist/**
9596
--repo "$GITHUB_REPOSITORY"
96-
#
97-
# publish-to-testpypi:
98-
# name: Publish Python 🐍 distribution 📦 to TestPyPI
99-
# needs:
100-
# - build
101-
# runs-on: ubuntu-latest
102-
#
103-
# environment:
104-
# name: testpypi
105-
# url: https://test.pypi.org/p/alibabacloud-rds-openapi-mcp-server
106-
#
107-
# permissions:
108-
# id-token: write # IMPORTANT: mandatory for trusted publishing
109-
#
110-
# steps:
111-
# - name: Download all the dists
112-
# uses: actions/download-artifact@v4
113-
# with:
114-
# name: python-package-distributions
115-
# path: dist/
116-
# - name: Publish distribution 📦 to TestPyPI
117-
# uses: pypa/gh-action-pypi-publish@release/v1
118-
# with:
119-
# repository-url: https://test.pypi.org/legacy/
97+
98+
publish-to-testpypi:
99+
name: Publish Python 🐍 distribution 📦 to TestPyPI
100+
if: startsWith(github.ref, 'refs/tags/') # only publish to TestPyPI on tag pushes
101+
needs:
102+
- build
103+
runs-on: ubuntu-latest
104+
105+
environment:
106+
name: testpypi
107+
url: https://test.pypi.org/p/alibabacloud-rds-openapi-mcp-server
108+
109+
permissions:
110+
id-token: write # IMPORTANT: mandatory for trusted publishing
111+
112+
steps:
113+
- name: Download all the dists
114+
uses: actions/download-artifact@v4
115+
with:
116+
name: python-package-distributions
117+
path: dist/
118+
- name: Publish distribution 📦 to TestPyPI
119+
uses: pypa/gh-action-pypi-publish@release/v1
120+
with:
121+
repository-url: https://test.pypi.org/legacy/

README.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MCP server for RDS Services via OPENAPI
1212
### Using [cherry-studio](https://github.com/CherryHQ/cherry-studio) (Recommended)
1313
Install the MCP environment according to [Cherry-Studio's documentation](https://docs.cherry-ai.com/advanced-basic/mcp/install), then configure and use RDS MCP.
1414
Add the following configuration to the MCP client configuration file:
15-
```json
15+
```json5
1616
"mcpServers": {
1717
"rds-openapi-mcp-server": {
1818
"command": "uvx",
@@ -21,7 +21,8 @@ Add the following configuration to the MCP client configuration file:
2121
],
2222
"env": {
2323
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
24-
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key"
24+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
25+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token" // optional, required when using STS Token
2526
}
2627
}
2728
}
@@ -34,6 +35,7 @@ Set you env and run mcp server.
3435
export SERVER_TRANSPORT=sse;
3536
export ALIBABA_CLOUD_ACCESS_KEY_ID=$you_access_id;
3637
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=$you_access_key;
38+
export ALIBABA_CLOUD_SECURITY_TOKEN=$you_sts_security_token; # optional, required when using STS Token
3739

3840
# run mcp server
3941
uvx alibabacloud-rds-openapi-mcp-server@latest
@@ -57,7 +59,7 @@ Download from Github
5759
git clone https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server.git
5860
```
5961
Add the following configuration to the MCP client configuration file:
60-
```json
62+
```json5
6163
"mcpServers": {
6264
"rds-openapi-mcp-server": {
6365
"command": "uv",
@@ -69,32 +71,45 @@ Add the following configuration to the MCP client configuration file:
6971
],
7072
"env": {
7173
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
72-
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key"
74+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
75+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token" // optional, required when using STS Token
7376
}
7477
}
7578
}
7679
```
7780

7881
## Components
7982
### Tools
83+
* `add_tags_to_db_instance`: Add tags to an RDS instance.
84+
* `allocate_instance_public_connection`: Allocate a public connection for an RDS instance.
85+
* `attach_whitelist_template_to_instance`: Attach a whitelist template to an RDS instance.
8086
* `create_db_instance`: Create an RDS instance.
81-
* `describe_db_instances`: Queries instances.
87+
* `create_db_instance_account`: Create an account for RDS instance.
88+
* `describe_all_whitelist_template`: Query the whitelist template list.
89+
* `describe_available_classes`: Query available instance classes and storage ranges.
90+
* `describe_available_zones`: Query available zones for RDS instances.
91+
* `describe_bills`: Query the consumption summary of all product instances or billing items for a user within a specific billing period.
92+
* `describe_db_instance_accounts`: Batch retrieves account information for multiple RDS instances.
8293
* `describe_db_instance_attribute`: Queries the details of an instance.
94+
* `describe_db_instance_databases`: Batch retrieves database information for multiple RDS instances.
95+
* `describe_db_instance_ip_allowlist`: Batch retrieves IP allowlist configurations for multiple RDS instances.
96+
* `describe_db_instance_net_info`: Batch retrieves network configuration details for multiple RDS instances.
97+
* `describe_db_instance_parameters`: Batch retrieves parameter information for multiple RDS instances.
8398
* `describe_db_instance_performance`: Queries the performance data of an instance.
99+
* `describe_db_instances`: Queries instances.
84100
* `describe_error_logs`: Queries the error log of an instance.
85-
* `describe_db_instance_net_info`: Batch retrieves network configuration details for multiple RDS instances.
86-
* `describe_db_instance_ip_allowlist`: Batch retrieves IP allowlist configurations for multiple RDS instances.
87-
* `describe_db_instance_databases`: Batch retrieves database information for multiple RDS instances.
88-
* `describe_db_instance_accounts`: Batch retrieves account information for multiple RDS instances.
89-
* `describe_available_classes`: Query available instance classes and storage ranges.
90-
* `describe_available_zones`: Query available zones for RDS instances.
101+
* `describe_instance_linked_whitelist_template`: Query the whitelist template list.
102+
* `describe_slow_log_records`: Query slow log records for an RDS instance.
91103
* `describe_vpcs`: Query VPC list.
92104
* `describe_vswitches`: Query VSwitch list.
93105
* `describe_slow_log_records`: Query slow log records for an RDS instance.
94106
* `modify_parameter`: Modify RDS instance parameters.
95107
* `modify_db_instance_spec`: Modify RDS instance specifications.
96108
* `modify_security_ips`: Modify security ips
97109
* `get_current_time`: Get the current time.
110+
* `modify_db_instance_description`: Modify RDS instance descriptions.
111+
* `modify_db_instance_spec`: Modify RDS instance specifications.
112+
* `modify_parameter`: Modify RDS instance parameters.
98113

99114
### Resources
100115
None at this time
@@ -108,7 +123,8 @@ You are a professional Alibaba Cloud RDS Copilot, specializing in providing cust
108123

109124
### Skill 1: Problem Decomposition and Analysis
110125
- Deeply deconstruct user questions to identify core requirements and potential steps/commands involved.
111-
- Provide clear task breakdowns to ensure each step contributes to the final solution.
126+
- Provide clear task breakdowns to ensure each step contributes to the final solution.
127+
- Please organize your answers in a table format as much as possible.
112128

113129
### Skill 2: RDS MCP Tool Invocation
114130
- Proficiently invoke the RDS MCP tool to retrieve database information or execute operations.
@@ -137,3 +153,8 @@ Contributions are welcome! Please feel free to submit a Pull Request.
137153

138154
## License
139155
This project is licensed under the Apache 2.0 License.
156+
157+
## Contact Information
158+
For any questions or concerns, please contact us through the DingTalk group:106730017609
159+
160+
<img src="./assets/dingding.png" alt="store" width="500"/>

README_CN.md

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RDS OpenAPI MCP服务。
1010
## 快速开始
1111
### 使用[cherry-studio](https://github.com/CherryHQ/cherry-studio)(推荐)
1212
根据[Cherry-Studio文档](https://docs.cherry-ai.com/advanced-basic/mcp/install)安装MCP环境后配置使用RDS MCP。 MCP配置文件格式如下:
13-
```json
13+
```json5
1414
"mcpServers": {
1515
"rds-openapi-mcp-server": {
1616
"command": "uvx",
@@ -19,7 +19,8 @@ RDS OpenAPI MCP服务。
1919
],
2020
"env": {
2121
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
22-
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key"
22+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
23+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token" // 可选项,使用sts token鉴权时填写
2324
}
2425
}
2526
}
@@ -32,6 +33,7 @@ RDS OpenAPI MCP服务。
3233
export SERVER_TRANSPORT=sse;
3334
export ALIBABA_CLOUD_ACCESS_KEY_ID=$your_access_id; # 替换为你的access_id
3435
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=$your_access_key; # 替换为你的access_key
36+
export ALIBABA_CLOUD_SECURITY_TOKEN=$your_sts_security_token; # 可选项,使用sts token鉴权时填写
3537

3638
# 启动MCP服务
3739
uvx alibabacloud-rds-openapi-mcp-server@latest
@@ -54,7 +56,7 @@ remote_server = "http://127.0.0.1:8000/sse";
5456
git clone https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server.git
5557
```
5658
在MCP客户端配置文件中添加:
57-
```json
59+
```json5
5860
"mcpServers": {
5961
"rds-openapi-mcp-server": {
6062
"command": "uv",
@@ -66,33 +68,46 @@ git clone https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server.git
6668
],
6769
"env": {
6870
"ALIBABA_CLOUD_ACCESS_KEY_ID": "access_id",
69-
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key"
70-
}
71+
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "access_key",
72+
"ALIBABA_CLOUD_SECURITY_TOKEN": "sts_security_token" // 可选项,使用sts token鉴权时填写
73+
}
7174
}
7275
}
7376
```
7477

7578
## 功能组件
7679
### 工具集
80+
* `add_tags_to_db_instance`: 添加标签到RDS实例
81+
* `allocate_instance_public_connection`: 为RDS实例分配公网连接
82+
* `attach_whitelist_template_to_instance`: 将白名单模板绑定到RDS实例
7783
* `create_db_instance`: 创建RDS实例
78-
* `describe_db_instances`: 查询实例列表
79-
* `describe_db_instance_attribute`: 查询实例详情
80-
* `describe_db_instance_metrics`: 查询实例性能数据、错误日志和SQL报告
84+
* `create_db_instance_account`: 创建RDS实例账号
85+
* `describe_all_whitelist_template`: 查询白名单模板列表
86+
* `describe_available_classes`: 查询可用实例规格和存储范围
87+
* `describe_available_zones`: 查询RDS实例可用区域
88+
* `describe_bills`: 查询用户在特定计费周期内所有产品实例或计费项的消费汇总
89+
* `describe_db_instance_accounts`: 批量查询多个RDS实例的账户信息
90+
* `describe_db_instance_attribute`: 查询实例详细信息
91+
* `describe_db_instance_databases`: 批量查询多个RDS实例的数据库信息
92+
* `describe_db_instance_ip_allowlist`: 批量查询多个RDS实例的IP白名单配置
93+
* `describe_db_instance_net_info`: 批量查询多个RDS实例的网络配置详情
94+
* `describe_db_instance_parameters`: 批量查询多个RDS实例的参数信息
8195
* `describe_db_instance_performance`: 查询实例性能数据
96+
* `describe_db_instances`: 查询实例
8297
* `describe_error_logs`: 查询实例错误日志
83-
* `describe_db_instance_net_info`: 批量查询实例网络信息
84-
* `describe_db_instance_ip_allowlist`: 批量查询实例IP白名单配置
85-
* `describe_db_instance_databases`: 批量查询实例的DB信息
86-
* `describe_db_instance_accounts`: 批量查询实例的账号信息
87-
* `describe_available_classes`: 查询可用实例规格和存储范围
88-
* `describe_available_zones`: 查询RDS可用区
98+
* `describe_instance_linked_whitelist_template`: 查询绑定到实例的白名单模板列表
99+
* `describe_slow_log_records`: 查询RDS实例的慢日志记录
89100
* `describe_vpcs`: 查询VPC列表
90101
* `describe_vswitches`: 查询虚拟交换机列表
91102
* `describe_slow_log_records`: 查询RDS慢日志记录
92103
* `modify_parameter`: 修改RDS实例参数
93104
* `modify_db_instance_spec`: 调整RDS实例规格
94105
* `modify_security_ips`: 修改白名单
106+
* `describe_vswitches`: 查询VSwitch列表
95107
* `get_current_time`: 获取当前时间
108+
* `modify_db_instance_description`: 修改RDS实例描述
109+
* `modify_db_instance_spec`: 修改RDS实例规格
110+
* `modify_parameter`: 修改RDS实例参数
96111

97112
### 资源
98113
当前暂无资源
@@ -105,23 +120,24 @@ git clone https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server.git
105120
## 技能
106121

107122
### 技能一:问题拆解与分析
108-
- 能够对用户提出的问题进行深入拆解,明确问题的核心需求及可能涉及的步骤或指令。
109-
- 提供清晰的任务分解步骤,确保每一步都能指向最终解决方案。
123+
- 能够对用户提出的问题进行深入拆解,明确问题的核心需求及可能涉及的步骤或指令。
124+
- 提供清晰的任务分解步骤,确保每一步都能指向最终解决方案。
125+
- 回答结果中尽量以表格的形式进行整理。
110126

111127
### 技能二:RDS MCP工具调用
112-
- 熟练调用RDS MCP工具获取数据库相关信息或执行相关操作。
113-
- 工具调用前必须先完成任务拆解,并确保调用逻辑清晰且符合客户需求。
114-
- 根据用户的具体问题,选择合适的MCP功能模块进行操作,如监控数据查询、性能诊断、备份恢复等。
128+
- 熟练调用RDS MCP工具获取数据库相关信息或执行相关操作。
129+
- 工具调用前必须先完成任务拆解,并确保调用逻辑清晰且符合客户需求。
130+
- 根据用户的具体问题,选择合适的MCP功能模块进行操作,如监控数据查询、性能诊断、备份恢复等。
115131

116132
### 技能三:时间理解与计算
117-
- 能够准确解析用户提出的相对时间概念,例如“今天”、“昨天”、“最近一小时”等。
118-
- 通过获取当前时间,将相对时间转换为具体的时间范围或时间点,以支持后续的数据查询或操作。
133+
- 能够准确解析用户提出的相对时间概念,例如“今天”、“昨天”、“最近一小时”等。
134+
- 通过获取当前时间,将相对时间转换为具体的时间范围或时间点,以支持后续的数据查询或操作。
119135

120136
## 限制条件
121-
- **任务拆解优先**:必须先给出详细的任务拆解步骤。
122-
- **工具依赖明确**:所有需要调用RDS MCP工具的操作,都应基于清晰的任务需求和逻辑推理。
123-
- **时间计算精确**:对于涉及时间的查询,必须准确计算出对应的具体时间范围。
124-
- **专业性保障**:仅讨论与阿里云RDS相关的技术问题,避免偏离主题。
137+
- **任务拆解优先**:必须先给出详细的任务拆解步骤。
138+
- **工具依赖明确**:所有需要调用RDS MCP工具的操作,都应基于清晰的任务需求和逻辑推理。
139+
- **时间计算精确**:对于涉及时间的查询,必须准确计算出对应的具体时间范围。
140+
- **专业性保障**:仅讨论与阿里云RDS相关的技术问题,避免偏离主题。
125141
- **安全性注意**:在执行任何操作时,需确保不会对客户的数据库造成负面影响。
126142
```
127143

@@ -136,3 +152,7 @@ git clone https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server.git
136152
## 许可证
137153
本项目采用Apache 2.0许可证
138154

155+
## 联系信息
156+
如有任何疑问或疑虑,请通过钉钉群联系我们:106730017609
157+
158+
<img src="./assets/dingding.png" alt="store" width="500"/>

assets/alibabacloudrds.png

3.66 KB
Loading

assets/dingding.png

73.4 KB
Loading

pyproject.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[project]
22
name = "alibabacloud-rds-openapi-mcp-server"
3-
version = "1.2.2"
3+
version = "1.7.5"
44
description = "MCP server for RDS Services via OPENAPI."
55
readme = "README.md"
66
requires-python = ">=3.12"
77
dependencies = [
8+
"alibabacloud-bssopenapi20171214>=5.0.0",
89
"alibabacloud-rds20140815>=11.0.0",
910
"alibabacloud-vpc20160428>=6.11.4",
1011
"httpx>=0.28.1",
@@ -19,13 +20,13 @@ authors = [
1920
]
2021

2122
[project.urls]
22-
Homepage = "https://github.com/aliyun/alibaba-cloud-ops-mcp-server"
23-
Documentation = "https://github.com/aliyun/alibaba-cloud-ops-mcp-server/"
24-
Source = "https://github.com/aliyun/alibaba-cloud-ops-mcp-server.git"
25-
"Bug Tracker" = "https://github.com/aliyun/alibaba-cloud-ops-mcp-server/issues"
23+
Homepage = "https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server"
24+
Documentation = "https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server/"
25+
Source = "https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server.git"
26+
"Bug Tracker" = "https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server/issues"
2627

2728
[tool.hatch.build.targets.wheel]
2829
packages = ["src/alibabacloud_rds_openapi_mcp_server"]
2930

3031
[project.scripts]
31-
alibabacloud-rds-openapi-mcp-server = "alibabacloud_rds_openapi_mcp_server.server:main"
32+
alibabacloud-rds-openapi-mcp-server = "alibabacloud_rds_openapi_mcp_server.server:main"

0 commit comments

Comments
 (0)