by aliyun
An MCP server for Alibaba Cloud RDS that allows programmatic management of database instances through an LLM.
The Alibaba Cloud RDS OpenAPI MCP Server is a tool that enables interaction with Alibaba Cloud's Relational Database Service (RDS) using a Model Context Protocol (MCP) interface. This allows developers and AI agents to manage RDS resources, such as database instances, through natural language commands or automated scripts, streamlining database administration and operations.
To use the server, you need to have Python and uv
installed. You can then run the server using uvx
with the appropriate Alibaba Cloud credentials (Access Key ID and Secret) set as environment variables. The server can be integrated with tools like cherry-studio
for a more user-friendly experience, or used directly from the command line.
uv
and configured with environment variables.What are the prerequisites for running the server?
You need Python 3.12+ and
uv
(a Python package installer). You will also need your Alibaba Cloud Access Key ID and Secret.
Is it free to use?
The MCP server itself is open-source and free to use, but you will be charged for any Alibaba Cloud RDS resources that you provision and use.
Can I use this with other cloud providers?
No, this MCP server is specifically designed to work with Alibaba Cloud RDS.
MCP server for RDS Services via OPENAPI
uv
from Astral or the GitHub READMEuv python install 3.12
The following error may appear during import, which can be ignored: xxx settings.mcp.addServer.importFrom.connectionFailed
{
"mcpServers": {
"rds-openapi": {
"name": "rds-openapi",
"type": "stdio",
"description": "",
"isActive": true,
"registryUrl": "",
"command": "uvx",
"args": [
"alibabacloud-rds-openapi-mcp-server@latest"
],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "$you_access_id",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "$you_access_key"
}
}
}
}
Finally, click to turn on MCP
You can use the prompt template provided below to enhance your experience.
Set you env and run mcp server.
# set env
export SERVER_TRANSPORT=sse;
export ALIBABA_CLOUD_ACCESS_KEY_ID=$you_access_id;
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=$you_access_key;
export ALIBABA_CLOUD_SECURITY_TOKEN=$you_sts_security_token; # optional, required when using STS Token
export API_KEY=$you_mcp_server_api_key; # Optional, after configuration, requests will undergo API Key authentication.
# run mcp server
uvx alibabacloud-rds-openapi-mcp-server@latest
After run mcp server, you will see the following output:
INFO: Started server process [91594]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
And then configure the Cline.
remote_server = "http://127.0.0.1:8000/sse";
If you encounter a
401 Incorrect API key provided
error when using Qwen, please refer to the documentation for solutions.
Download from Github
git clone https://github.com/aliyun/alibabacloud-rds-openapi-mcp-server.git
Add the following configuration to the MCP client configuration file:
{
"mcpServers": {
"rds-openapi-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/alibabacloud-rds-openapi-mcp-server/src/alibabacloud_rds_openapi_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
}
}
}
}
add_tags_to_db_instance
: Add tags to an RDS instance.allocate_instance_public_connection
: Allocate a public connection for an RDS instance.attach_whitelist_template_to_instance
: Attach a whitelist template to an RDS instance.create_db_instance
: Create an RDS instance.create_db_instance_account
: Create an account for RDS instance.describe_all_whitelist_template
: Query the whitelist template list.describe_available_classes
: Query available instance classes and storage ranges.describe_available_zones
: Query available zones for RDS instances.describe_bills
: Query the consumption summary of all product instances or billing items for a user within a specific billing period.describe_db_instance_accounts
: Batch retrieves account information for multiple RDS instances.describe_db_instance_attribute
: Queries the details of an instance.describe_db_instance_databases
: Batch retrieves database information for multiple RDS instances.describe_db_instance_ip_allowlist
: Batch retrieves IP allowlist configurations for multiple RDS instances.describe_db_instance_net_info
: Batch retrieves network configuration details for multiple RDS instances.describe_db_instance_parameters
: Batch retrieves parameter information for multiple RDS instances.describe_db_instance_performance
: Queries the performance data of an instance.describe_db_instances
: Queries instances.describe_error_logs
: Queries the error log of an instance.describe_instance_linked_whitelist_template
: Query the whitelist template list.describe_slow_log_records
: Query slow log records for an RDS instance.describe_sql_insight_statistic
: Query SQL Log statistics, including SQL cost time, execution times, and account.describe_vpcs
: Query VPC list.describe_vswitches
: Query VSwitch list.modify_security_ips
: Modify RDS instance security IP whitelist.get_current_time
: Get the current time.modify_db_instance_description
: Modify RDS instance descriptions.modify_db_instance_spec
: Modify RDS instance specifications.modify_parameter
: Modify RDS instance parameters.restart_db_instance
: Restart an RDS instance.The MCP Server will automatically create a read-only account, execute the SQL statement, and then automatically delete the account. This process requires that the MCP Server can connect to the instance.
show_engine_innodb_status
: Execute sql show engine innodb status
and return sql result.show_create_table
: Execute sql show create table
and return sql result.Toolsets group available MCP tools so you can enable only what you need. Configure toolsets when starting the server using either:
--toolsets
parameterMCP_TOOLSETS
Here is a list of toolsets and their functions:
rds: Enables all tools for the standard, managed RDS service
rds_custom_read: Enables read-only tools for the RDS Custom.
rds_custom_all: Enables full read and write tools for the RDS Custom.
Use comma-separated toolset names (no spaces around commas):
rds,rds_custom_all
# Single toolset
--toolsets rds
# Multiple tools
--toolsets rds,rds_mssql_custom
# Environment variable
export MCP_TOOLSETS=rds,rds_custom_all
If no toolset is specified, the default rds
group is loaded automatically.
None at this time
# Role
You are a professional Alibaba Cloud RDS Copilot, specializing in providing customers with efficient technical support and solutions for RDS (Relational Database Service). Your goal is to help customers resolve issues quickly through clear problem decomposition, precise tool invocation, and accurate time calculations.
## Skills
### Skill 1: Problem Decomposition and Analysis
- Deeply deconstruct user questions to identify core requirements and potential steps/commands involved.
- Provide clear task breakdowns to ensure each step contributes to the final solution.
- Please organize your answers in a table format as much as possible.
### Skill 2: RDS MCP Tool Invocation
- Proficiently invoke the RDS MCP tool to retrieve database information or execute operations.
- Tool invocation must follow task decomposition and align with logical reasoning and customer needs.
- Select appropriate MCP modules (e.g., monitoring data queries, performance diagnostics, backup/recovery) based on user requirements.
### Skill 3: Time Interpretation and Calculation
- Accurately parse relative time concepts like "today," "yesterday," or "the last hour."
- Convert relative time expressions into precise time ranges or timestamps using the current time to support data queries or operations.
## Constraints
- **Task Decomposition First**: Always provide detailed task breakdowns.
- **Tool Dependency Clarity**: All MCP tool invocations must be justified by clear task requirements and logical reasoning.
- **Time Precision**: Calculate exact time ranges for time-sensitive queries.
- **Professional Focus**: Discuss only Alibaba Cloud RDS-related technical topics.
- **Safety Awareness**: Ensure no operations negatively impact customer databases.
Alibaba Cloud Database MyDBA Agent(README.md)
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the Apache 2.0 License.
For any questions or concerns, please contact us through the DingTalk group:106730017609
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by daytonaio
Provides a secure, elastic sandbox environment for executing AI‑generated code with isolated runtimes and sub‑90 ms provisioning.
by awslabs
Specialized servers that expose AWS capabilities through the Model Context Protocol, allowing AI assistants and other applications to retrieve up‑to‑date AWS documentation, manage infrastructure, query services, and perform workflow automation directly from their context.
by awslabs
AWS MCP Servers allow AI agents to interact with and manage a wide range of AWS services using natural language commands. They enable AI-powered cloud management, automated DevOps, and data-driven insights within the AWS ecosystem.
by cloudflare
Remote Model Context Protocol endpoints that let AI clients read, process, and act on data across Cloudflare services such as Workers, Radar, Observability, and more.
by supabase-community
Enables AI assistants to interact directly with Supabase projects, allowing them to query databases, fetch configuration, manage tables, and perform other project‑level operations.
by Azure
azure-mcp is a server that implements the Model Context Protocol (MCP) to connect AI agents with Azure services. It allows developers to interact with Azure resources like Storage, Cosmos DB, and the Azure CLI using natural language commands within their development environment.
by Flux159
MCP Server for Kubernetes management commands, enabling interaction with Kubernetes clusters to manage pods, deployments, and services.
by strowk
Provides a Golang‑based server that enables interaction with Kubernetes clusters via prompts, allowing listing of contexts, namespaces, resources, nodes, pods, events, logs, and executing commands inside pods.
by jamsocket
Run arbitrary Python code securely in persistent, stateful sandboxes that remain available indefinitely.