Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables AI coding assistants to manage Alibaba Cloud databases by creating instances, executing SQL, and more directly from the IDE.

README.md

Alibaba Cloud Yaochi DB MCP Server

Yaochi Database AI Native MCP Server — One MCP Server to manage all Alibaba Cloud databases.

![License](LICENSE) ![Python](https://python.org)

中文版 README

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 → calls Yaochi Database Agent for performance diagnosis — all without leaving the IDE.

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 |

Yaochi Database Agent

Built-in AI database advisor powered by Alibaba Cloud’s official documentation and expert knowledge:

  • Knowledge Q&A — Instantly answers database usage questions, reducing support tickets
  • Intelligent Diagnosis — Auto-executes performance diagnostics via OpenAPI, pinpointing issues
  • Best Practices — Provides architecture recommendations and optimization suggestions tailored to your workload

Supports multi-turn conversations and covers all Alibaba Cloud database engines (RDS, PolarDB, MongoDB, Tair, Lindorm, etc.).

Available Tools

| Tool | Description | |------|-------------| | ask_yaochi_agent | Yaochi Database Agent — AI database advisor (diagnosis, best practices, architecture) | | create_instance | Create a database instance | | list_instances | List existing instances | | execute_instance_sql | Execute SQL via instance ID (ephemeral account, no password needed) | | execute_mysql | Direct connect to MySQL/PolarDB and execute SQL | | execute_mongo | Direct connect to MongoDB and execute commands | | execute_redis | Direct connect to Tair/Redis and execute commands | | search_database | Search databases in DMS | | execute_sql | Execute SQL via DMS | | register_to_dms | Register instance to DMS |

Quick Start

Installation

git clone http://gitlab.alibaba-inc.com/cloudmon/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-server

It 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_ACCESS_KEY_ID | — | Alibaba Cloud AccessKey ID (required) | | ALIBABA_CLOUD_ACCESS_KEY_SECRET | — | Alibaba Cloud AccessKey Secret (required) | | ALIBABA_CLOUD_REGION_ID | cn-hangzhou | Default region | | YAOCHI_ENABLE_WRITE_SQL | true | Allow INSERT/UPDATE/DELETE | | YAOCHI_ENABLE_DDL_SQL | false | Allow CREATE/ALTER DDL | | YAOCHI_PUBLIC_IP | 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 a PolarDB MySQL cluster, build an orders table, and set up a Tair cache

AI automatically:
1. create_instance(engine="polardb-mysql")
   → Returns instance_id="pc-bp1xxx"

2. execute_instance_sql(instance_id="pc-bp1xxx", engine="polardb-mysql", database="testdb",
     sql="CREATE TABLE orders (id BIGINT PRIMARY KEY, amount DECIMAL(10,2))", force=true)
   → Auto-provisions public access + whitelist + creates DB + creates table

3. create_instance(engine="tair")
   → Returns instance_id="r-bp1xxx"

4. execute_redis(host="r-bp1xxx.redis.rds.aliyuncs.com", port=6379, password="xxx",
     command="SET order:1001 '{\"amount\":99.9}'")
   → OK

5. ask_yaochi_agent(query="PolarDB cluster pc-bp1xxx performance diagnosis")
   → Returns optimization suggestions from Yaochi Database Agent

License

Apache License 2.0

Contributing

Issues and Pull Requests are welcome.

Links

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.