Alibaba Cloud Yaochi DB MCP Server
OfficialProvides a unified interface to manage and operate Alibaba Cloud databases, including creating instances, executing SQL, and more.
Allows direct connection to MongoDB instances to execute MongoDB commands, including Alibaba Cloud MongoDB.
Allows direct connection to MySQL databases to execute SQL statements, including Alibaba Cloud RDS MySQL and PolarDB MySQL.
Allows direct connection to Redis instances to execute Redis commands, including Alibaba Cloud Tair.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Alibaba Cloud Yaochi DB MCP ServerCreate an RDS MySQL instance and create a users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Alibaba Cloud Yaochi DB MCP Server
Yaochi Database AI Native MCP Server — One MCP Server to manage all Alibaba Cloud databases.
What is Yaochi DB MCP Server?
A database tool service built on Model Context Protocol (MCP), enabling AI coding assistants (Cursor, Claude Desktop, Qoder, etc.) to directly operate Alibaba Cloud databases.
Core Scenario: After AI writes code, it automatically creates a database → creates tables → executes SQL to verify — all without leaving the IDE.
Related MCP server: AlibabaCloud DevOps MCP Server
Supported Database Engines
Engine | Operations |
RDS MySQL | Create instance, execute SQL, ephemeral account mode |
PolarDB MySQL | Create cluster, execute SQL, ephemeral account mode |
MongoDB | Create replica set, execute MongoDB commands |
Tair (Redis) | Create instance, execute Redis commands |
Available Tools
Tool | Description |
| Create a database instance |
| List existing instances |
| Execute SQL via instance ID (ephemeral account, no password needed) |
| Direct connect to MySQL/PolarDB and execute SQL |
| Direct connect to MongoDB and execute commands |
| Direct connect to Tair/Redis and execute commands |
| Search databases in DMS |
| Execute SQL via DMS |
| Register instance to DMS |
| Yaochi Agent LLM Q&A |
Quick Start
Installation
git clone https://github.com/aliyun/alibabacloud-yaochi-db-mcp-server.git
cd alibabacloud-yaochi-db-mcp-server
python3 -m venv .venv
source .venv/bin/activate
pip install .Verify
yaochi-db-mcp-serverIt enters stdio waiting mode (no output) on success. Press Ctrl+C to exit.
Configure AI Client
Add to your AI client's MCP configuration:
{
"mcpServers": {
"yaochi-db": {
"command": "<project-path>/alibabacloud-yaochi-db-mcp-server/.venv/bin/yaochi-db-mcp-server",
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "your-ak",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your-sk",
"ALIBABA_CLOUD_REGION_ID": "cn-hangzhou",
"YAOCHI_ENABLE_WRITE_SQL": "true",
"YAOCHI_ENABLE_DDL_SQL": "true"
}
}
}
}Environment Variables
Variable | Default | Description |
| — | Alibaba Cloud AccessKey ID (required) |
| — | Alibaba Cloud AccessKey Secret (required) |
|
| Default region |
|
| Allow INSERT/UPDATE/DELETE |
|
| Allow CREATE/ALTER DDL |
| Auto-detect | Manually specify public IP |
Security Features
Ephemeral Accounts: Automatically creates/destroys temporary database accounts per SQL execution — no persistent credentials
SQL Safety Checks: Blocks DROP/TRUNCATE and other dangerous operations; disallows comments and multi-statements
Restrictive Whitelist: Auto-provisions public access with current IP only (/32), without affecting existing rules
Write Control: Fine-grained DML/DDL permissions via environment variables
Usage Example
User: Create an RDS MySQL and build a users table
AI automatically:
1. create_instance(engine="rds-mysql")
→ Returns instance_id="rm-bp1xxx"
2. execute_instance_sql(instance_id="rm-bp1xxx", database="testdb",
sql="CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50))", force=true)
→ Auto-provisions public access + whitelist + creates DB + creates table
3. execute_instance_sql(instance_id="rm-bp1xxx", database="testdb",
sql="SELECT * FROM users")
→ Returns query resultsLicense
Contributing
Issues and Pull Requests are welcome.
Links
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliyun/alibabacloud-yaochi-db-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server