aliyun/alibabacloud-yaochi-db-mcp-server
86ff3f4fb70ealibabacloud-yaochi-db-mcp-server0.1.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 7 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- Supply Chain: the dependency files state no exact versions the scanner could check, so it has no number
Top risks in plain words
- HIGHTool
execute_mysqlruns SQL by design: an agent steered by prompt injection can use it that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Connect it with a read-only database user
execute_mysqlcan run any query it is given. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
execute_mysql, switch them off. - Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 10 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
execute_instance_sqlask_yaochi_agent, create_instance, execute_instance_sql, execute_sql, list_instances, register_to_dms and 1 moreexecute_mysqlask_yaochi_agent, create_instance, execute_instance_sql, execute_sql, list_instances, register_to_dms and 1 moreask_yaochi_agent, create_instance, execute_instance_sql, execute_sql, list_instances, register_to_dms and 1 moreask_yaochi_agent, create_instance, execute_instance_sql, execute_sql, list_instances, register_to_dms and 1 moreWhere its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files7 tools · ask_yaochi_agent, create_instance, execute_instance_sql +4
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (10: 10 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
execute_mysqltool 直连 MySQL/PolarDB MySQL 实例执行 SQL(需提供账号密码)。NetworkRuns SQL
直连 MySQL/PolarDB MySQL 实例执行 SQL(需提供账号密码)。
💡 推荐使用 execute_instance_sql — 基于实例ID自动管理临时账号,无需密码。
本工具适用于已有账号密码的场景。
安全规则:
- SELECT/SHOW/DESC 等只读操作:直接执行
- INSERT/UPDATE/DELETE 等写操作:需设置 force=true 确认后执行
- DROP/TRUNCATE/ALTER/RENAME 等危险 DDL:拒绝执行
Args:
host: MySQL 连接地址(如 pc-xxx.rwlb.rds.aliyuncs.com)
sql: 要执行的 SQL 语句
user: 数据库账号(默认 root)
password: 数据库密码
database: 数据库名(可选)
port: 端口(默认 3306)
force: 写操作确认标志,执行 INSERT/UPDATE/DELETE 时需设为 trueask_yaochi_agenttool 瑶池 Agent 大模型能力接口 — 数据库知识问答、性能诊断、最佳实践建议。FilesCredentialsEnv varsSensitive pathsoutside text
瑶池 Agent 大模型能力接口 — 数据库知识问答、性能诊断、最佳实践建议。
通过自然语言与瑶池 Agent 对话,可以:
- 咨询数据库使用问题(如"如何优化慢查询"、"PolarDB 分区表怎么设计")
- 实例性能诊断(如"我的实例 rm-xxx 有没有异常")
- 获取云数据库最佳实践建议
- 多轮对话(保持同一个 session_id)
Args:
query: 自然语言问题
session_id: 会话 ID(UUID 格式),不传则创建新会话,续问时传入上次返回的 session_id
source: 云产品来源(yaochi / tair / polardb / mongodb / polardb-ai / lindorm)
region: 地域 ID,不传使用默认地域create_instancetool 创建数据库实例。FilesCredentialsEnv varsSensitive pathsoutside text
创建数据库实例。
支持的引擎:
- mongodb: MongoDB 副本集(默认 7.0, 2C4G, 20GB, 按量付费)
- rds-mysql: RDS MySQL 基础版(默认 8.0, 2C4G, 20GB ESSD, 按量付费)
- polardb-mysql: PolarDB MySQL 集群(默认 8.0, 2C8G, 按量付费)
- tair: Tair 内存型(默认 Redis 7.0, 主从架构, 按量付费)
VPC 和 VSwitch 不传时会自动探测区域内第一个可用的。
实例就绪后首次执行 SQL 时将自动开通公网地址并配置白名单。
Args:
engine: 数据库引擎(mongodb / rds-mysql / polardb-mysql / tair)
region: 地域 ID(如 cn-hangzhou),不传则使用默认地域
instance_name: 实例名称(可选)
vpc_id: VPC ID(可选,自动探测)
vswitch_id: VSwitch ID(可选,自动探测)
database_name: 初始数据库名(RDS/PolarDB 有效,默认 testdb)execute_instance_sqltool 通过实例 ID 直接执行 SQL(自动开通公网 + 配置白名单 + 临时账号模式)。ProcessesFilesCredentialsEnv varsSensitive pathsoutside text
通过实例 ID 直接执行 SQL(自动开通公网 + 配置白名单 + 临时账号模式)。
自动流程:
1. 通过 OpenAPI 确保目标数据库存在
2. 尝试 TCP 直连(优先 VPC 内网,其次公网)
3. TCP 不通时自动开通公网地址 + 探测 IP 配置白名单,然后重试
安全规则:
- SELECT/SHOW/DESC 等只读操作:直接执行
- INSERT/UPDATE/DELETE 等写操作:需设置 force=true(受环境变量 YAOCHI_ENABLE_WRITE_SQL 控制)
- CREATE TABLE 等 DDL:需设置 force=true(受环境变量 YAOCHI_ENABLE_DDL_SQL 控制)
- DROP/TRUNCATE/ALTER/RENAME:拒绝执行
Args:
instance_id: 实例 ID(从 create_instance 或 list_instances 获取)
sql: 要执行的 SQL 语句
database: 目标数据库名(可选,不传则不指定默认库)
engine: 引擎类型(rds-mysql / polardb-mysql)
region: 地域 ID,不传使用默认地域
force: 写操作确认标志,执行 INSERT/UPDATE/DELETE/CREATE 时需设为 trueexecute_mongotool 对指定 MongoDB 实例直接执行命令。
对指定 MongoDB 实例直接执行命令。
直连 MongoDB 实例执行命令,无需通过 DMS。
连接地址可从 list_instances 结果中获取。
command 为 JSON 格式字符串,支持的操作:
- 插入: {"insert": "collection", "documents": [{...}]}
- 查询: {"find": "collection", "filter": {...}}
- 更新: {"update": "collection", "updates": [{"q": {...}, "u": {...}}]}
- 删除: {"delete": "collection", "deletes": [{"q": {...}, "limit": 0}]}
- 统计: {"count": "collection", "query": {...}}
安全规则:
- insert/find/update/delete/count 等常规操作:直接执行
- drop/dropDatabase/shutdown 等危险操作:拒绝执行
Args:
host: MongoDB 连接地址(如 dds-bp1xxx.mongodb.rds.aliyuncs.com)
command: MongoDB 命令(JSON 格式字符串)
database: 数据库名(默认 test)
password: root 密码
port: 端口(默认 3717)execute_redistool 对指定 Tair/Redis 实例直接执行 Redis 命令。
对指定 Tair/Redis 实例直接执行 Redis 命令。
直连 Tair/Redis 实例执行命令,无需通过 DMS。
连接地址可从 list_instances 结果中获取。
安全规则:
- GET/SET/HGET/KEYS/INFO 等常规命令:直接执行
- FLUSHALL/FLUSHDB/SHUTDOWN 等危险命令:拒绝执行
Args:
host: Redis 连接地址(如 r-bp15f6006905b3e4.redis.rds.aliyuncs.com)
command: Redis 命令(如 "SET key value"、"GET key"、"HGETALL hash")
password: 实例密码
port: 端口,默认 6379
db: 数据库索引,默认 0execute_sqltool 对指定数据库执行 SQL 查询或写入操作。FilesCredentialsEnv varsSensitive pathsoutside text
对指定数据库执行 SQL 查询或写入操作。
使用前需先通过 search_database 获取 database_id。
安全规则:
- SELECT/SHOW/DESC 等只读操作:直接执行
- INSERT/UPDATE/DELETE 等写操作:需设置 force=true 确认后执行
- DROP/TRUNCATE/ALTER/RENAME 等危险 DDL:拒绝执行,请到 DMS 控制台操作
Args:
database_id: 数据库 ID(从 search_database 结果中获取)
sql: 要执行的 SQL 语句
force: 写操作确认标志,执行 INSERT/UPDATE/DELETE 时需设为 true
logic: 是否使用逻辑库模式(默认 false)
region: 地域 ID,不传则使用默认地域list_instancestool 列出已有的数据库实例。FilesCredentialsEnv varsSensitive pathsoutside text
列出已有的数据库实例。
可以按引擎类型筛选,也可以查看所有支持产品的实例。
Args:
engine: 筛选引擎类型(可选:mongodb / rds-mysql / polardb-mysql / tair,留空查所有)
region: 地域 ID(如 cn-hangzhou),不传则使用默认地域register_to_dmstool 将数据库实例注册到 DMS,注册后即可通过 search_database 找到并执行 SQL/Redis 命令。FilesCredentialsEnv varsSensitive pathsoutside text
将数据库实例注册到 DMS,注册后即可通过 search_database 找到并执行 SQL/Redis 命令。
创建实例后必须注册到 DMS 才能使用 execute_sql / execute_redis。
Args:
host: 实例连接地址(如 rm-xxx.mysql.rds.aliyuncs.com 或 r-xxx.redis.rds.aliyuncs.com)
port: 连接端口(MySQL: 3306, Redis: 6379)
engine: 引擎类型(rds-mysql / polardb-mysql / mongodb / tair)
instance_alias: 实例别名(在 DMS 中显示的名称)
database_user: 数据库账号(可选,默认 default)
database_password: 数据库密码(可选,注册时可跳过连通性测试)
region: 地域 ID,不传则使用默认地域
env_type: 环境类型(dev / test / product,默认 dev)search_databasetool 按关键词搜索 DMS 中注册的数据库,获取 database_id 用于后续 execute_sql。FilesCredentialsEnv varsSensitive pathsoutside text
按关键词搜索 DMS 中注册的数据库,获取 database_id 用于后续 execute_sql。
在执行 SQL 之前,需要先用此工具搜索目标数据库,获取其 database_id。
Args:
keyword: 搜索关键词(数据库名、schema 名、host 等)
region: 地域 ID(如 cn-hangzhou),不传则使用默认地域Text the model reads (10)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
search_database tool
按关键词搜索 DMS 中注册的数据库,获取 database_id 用于后续 execute_sql。
在执行 SQL 之前,需要先用此工具搜索目标数据库,获取其 database_id。
Args:
keyword: 搜索关键词(数据库名、schema 名、host 等)
region: 地域 ID(如 cn-hangzhou),不传则使用默认地域execute_sql tool
对指定数据库执行 SQL 查询或写入操作。
使用前需先通过 search_database 获取 database_id。
安全规则:
- SELECT/SHOW/DESC 等只读操作:直接执行
- INSERT/UPDATE/DELETE 等写操作:需设置 force=true 确认后执行
- DROP/TRUNCATE/ALTER/RENAME 等危险 DDL:拒绝执行,请到 DMS 控制台操作
Args:
database_id: 数据库 ID(从 search_database 结果中获取)
sql: 要执行的 SQL 语句
force: 写操作确认标志,执行 INSERT/UPDATE/DELETE 时需设为 true
logic: 是否使用逻辑库模式(默认 false)
region: 地域 ID,不传则使用默认地域execute_instance_sql tool
通过实例 ID 直接执行 SQL(自动开通公网 + 配置白名单 + 临时账号模式)。
自动流程:
1. 通过 OpenAPI 确保目标数据库存在
2. 尝试 TCP 直连(优先 VPC 内网,其次公网)
3. TCP 不通时自动开通公网地址 + 探测 IP 配置白名单,然后重试
安全规则:
- SELECT/SHOW/DESC 等只读操作:直接执行
- INSERT/UPDATE/DELETE 等写操作:需设置 force=true(受环境变量 YAOCHI_ENABLE_WRITE_SQL 控制)
- CREATE TABLE 等 DDL:需设置 force=true(受环境变量 YAOCHI_ENABLE_DDL_SQL 控制)
- DROP/TRUNCATE/ALTER/RENAME:拒绝执行
Args:
instance_id: 实例 ID(从 create_instance 或 list_instances 获取)
sql: 要执行的 SQL 语句
database: 目标数据库名(可选,不传则不指定默认库)
engine: 引擎类型(rds-mysql / polardb-mysql)
region: 地域 ID,不传使用默认地域
force: 写操作确认标志,执行 INSERT/UPDATE/DELETE/CREATE 时需设为 trueexecute_mysql tool
直连 MySQL/PolarDB MySQL 实例执行 SQL(需提供账号密码)。
💡 推荐使用 execute_instance_sql — 基于实例ID自动管理临时账号,无需密码。
本工具适用于已有账号密码的场景。
安全规则:
- SELECT/SHOW/DESC 等只读操作:直接执行
- INSERT/UPDATE/DELETE 等写操作:需设置 force=true 确认后执行
- DROP/TRUNCATE/ALTER/RENAME 等危险 DDL:拒绝执行
Args:
host: MySQL 连接地址(如 pc-xxx.rwlb.rds.aliyuncs.com)
sql: 要执行的 SQL 语句
user: 数据库账号(默认 root)
password: 数据库密码
database: 数据库名(可选)
port: 端口(默认 3306)
force: 写操作确认标志,执行 INSERT/UPDATE/DELETE 时需设为 trueexecute_redis tool
对指定 Tair/Redis 实例直接执行 Redis 命令。
直连 Tair/Redis 实例执行命令,无需通过 DMS。
连接地址可从 list_instances 结果中获取。
安全规则:
- GET/SET/HGET/KEYS/INFO 等常规命令:直接执行
- FLUSHALL/FLUSHDB/SHUTDOWN 等危险命令:拒绝执行
Args:
host: Redis 连接地址(如 r-bp15f6006905b3e4.redis.rds.aliyuncs.com)
command: Redis 命令(如 "SET key value"、"GET key"、"HGETALL hash")
password: 实例密码
port: 端口,默认 6379
db: 数据库索引,默认 0execute_mongo tool
对指定 MongoDB 实例直接执行命令。
直连 MongoDB 实例执行命令,无需通过 DMS。
连接地址可从 list_instances 结果中获取。
command 为 JSON 格式字符串,支持的操作:
- 插入: {"insert": "collection", "documents": [{...}]}
- 查询: {"find": "collection", "filter": {...}}
- 更新: {"update": "collection", "updates": [{"q": {...}, "u": {...}}]}
- 删除: {"delete": "collection", "deletes": [{"q": {...}, "limit": 0}]}
- 统计: {"count": "collection", "query": {...}}
安全规则:
- insert/find/update/delete/count 等常规操作:直接执行
- drop/dropDatabase/shutdown 等危险操作:拒绝执行
Args:
host: MongoDB 连接地址(如 dds-bp1xxx.mongodb.rds.aliyuncs.com)
command: MongoDB 命令(JSON 格式字符串)
database: 数据库名(默认 test)
password: root 密码
port: 端口(默认 3717)register_to_dms tool
将数据库实例注册到 DMS,注册后即可通过 search_database 找到并执行 SQL/Redis 命令。
创建实例后必须注册到 DMS 才能使用 execute_sql / execute_redis。
Args:
host: 实例连接地址(如 rm-xxx.mysql.rds.aliyuncs.com 或 r-xxx.redis.rds.aliyuncs.com)
port: 连接端口(MySQL: 3306, Redis: 6379)
engine: 引擎类型(rds-mysql / polardb-mysql / mongodb / tair)
instance_alias: 实例别名(在 DMS 中显示的名称)
database_user: 数据库账号(可选,默认 default)
database_password: 数据库密码(可选,注册时可跳过连通性测试)
region: 地域 ID,不传则使用默认地域
env_type: 环境类型(dev / test / product,默认 dev)create_instance tool
创建数据库实例。
支持的引擎:
- mongodb: MongoDB 副本集(默认 7.0, 2C4G, 20GB, 按量付费)
- rds-mysql: RDS MySQL 基础版(默认 8.0, 2C4G, 20GB ESSD, 按量付费)
- polardb-mysql: PolarDB MySQL 集群(默认 8.0, 2C8G, 按量付费)
- tair: Tair 内存型(默认 Redis 7.0, 主从架构, 按量付费)
VPC 和 VSwitch 不传时会自动探测区域内第一个可用的。
实例就绪后首次执行 SQL 时将自动开通公网地址并配置白名单。
Args:
engine: 数据库引擎(mongodb / rds-mysql / polardb-mysql / tair)
region: 地域 ID(如 cn-hangzhou),不传则使用默认地域
instance_name: 实例名称(可选)
vpc_id: VPC ID(可选,自动探测)
vswitch_id: VSwitch ID(可选,自动探测)
database_name: 初始数据库名(RDS/PolarDB 有效,默认 testdb)list_instances tool
列出已有的数据库实例。
可以按引擎类型筛选,也可以查看所有支持产品的实例。
Args:
engine: 筛选引擎类型(可选:mongodb / rds-mysql / polardb-mysql / tair,留空查所有)
region: 地域 ID(如 cn-hangzhou),不传则使用默认地域ask_yaochi_agent tool
瑶池 Agent 大模型能力接口 — 数据库知识问答、性能诊断、最佳实践建议。
通过自然语言与瑶池 Agent 对话,可以:
- 咨询数据库使用问题(如"如何优化慢查询"、"PolarDB 分区表怎么设计")
- 实例性能诊断(如"我的实例 rm-xxx 有没有异常")
- 获取云数据库最佳实践建议
- 多轮对话(保持同一个 session_id)
Args:
query: 自然语言问题
session_id: 会话 ID(UUID 格式),不传则创建新会话,续问时传入上次返回的 session_id
source: 云产品来源(yaochi / tair / polardb / mongodb / polardb-ai / lindorm)
region: 地域 ID,不传使用默认地域What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQL1 finding the scanner could not decide; see the findings below
- Tools that start processes1 of 10 capabilities start processes; 9 more call code the scanner could not follow, where it may happen
- Tools that touch files7 of 10 capabilities touch files; 3 more call code the scanner could not follow, where it may happen
- Tools that call the network1 of 10 capabilities call the network; 9 more call code the scanner could not follow, where it may happen
Where the code is: 10 handlers in 1 file at commit 86ff3f4fb70e
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSVNothing could be resolved to exact versions; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- MCP SDK versionmcp >=1.0.0
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentials7 of 10 capabilities read credentials; 3 more call code the scanner could not follow, where it may happen
- Environment variables7 capabilities read environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp >=1.0.0 |
| Servers in the code | 1 (yaochi-db) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-07-16 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 3 catalogs (github_search, glama, mcp_toplist) |
|---|---|
| License | Apache-2.0 |
| Created | 2026-06-24 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.