Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/redgreat/db_mcp_server/db-mcp-servernpx skills add redgreat/db_mcp_server --skill db-mcp-servergit clone --depth 1 https://github.com/redgreat/db_mcp_serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/redgreat/db_mcp_server/db-mcp-server)<a href="https://agentmods.dev/skills/redgreat/db_mcp_server/db-mcp-server"><img src="https://agentmods.dev/badge/skills/redgreat/db_mcp_server/db-mcp-server.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00067 | $0.02194 |
| Opus 5 | $0.00034 | $0.01097 |
| Sonnet 5 | $0.00013 | $0.00439 |
| Haiku 4.5 | $0.00007 | $0.00219 |
Grade A, and why
db-mcp-server scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.
数据库 MCP 工具使用指南
🎯 核心原则
- 先查连接,再操作 — 不知道
connection_id时必须先调mcp__dbmcp__list_connections,禁止猜测 ID - 逐层探索 — 按
list_connections→list_databases→list_tables→describe_table的顺序探索 - 只读优先 — 查询用
mcp__dbmcp__execute_query,写入/DDL 用mcp__dbmcp__execute_sql(需确认权限) - 默认数据库 — 大部分工具的
database参数可选,不传则使用连接的默认数据库 - 明确告知 — 每次操作后向用户说明
connection_id、database、工具名称;若返回 OSS 链接须给出可点击地址 - 大表慎用 —
execute_query必须带LIMIT;文档/ER 库表过多时优先 markdown 或include_columns: false
支持的数据库类型:mysql、postgresql
🔧 可用工具列表(22 个)
所有工具名前缀为 mcp__dbmcp__,例如:mcp__dbmcp__list_connections
基础探索工具
| 工具 | 用途 | 必需参数 | 示例 |
|---|---|---|---|
list_connections |
列出所有可用数据库连接 | 无 | {"search": "mysql"} |
list_databases |
列出指定连接的数据库 | connection_id |
{"connection_id": 1} |
list_tables |
列出指定数据库的表 | connection_id |
{"connection_id": 1, "database": "mydb"} |
list_views |
列出视图 | connection_id |
{"connection_id": 1} |
list_procedures |
列出存储过程 | connection_id |
{"connection_id": 1} |
describe_table |
查看表结构(字段、类型、键) | connection_id, table |
{"connection_id": 1, "table": "users"} |
查询与执行工具
| 工具 | 用途 | 必需参数 | 权限 |
|---|---|---|---|
execute_query |
执行 SELECT 查询(只读) | connection_id, sql |
读 |
execute_sql |
执行任意 SQL(DDL/写入) | connection_id, sql |
写/DDL |
⚠️ 重要提示:
execute_query只能执行 SELECT/SHOW/DESCRIBE/EXPLAIN 等只读语句execute_sql可以执行 INSERT/UPDATE/DELETE/CREATE/DROP/ALTER 等语句,需要相应权限- 所有 SQL 查询必须带 LIMIT,避免返回大量数据
文档与图表工具
| 工具 | 用途 | 必需参数 | 特色功能 |
|---|---|---|---|
export_db_doc |
导出数据字典文档 | connection_id |
支持 markdown/pdf,可上传 OSS |
generate_er_diagram |
生成 ER 图 | connection_id |
业务域分析 + Mermaid 图,支持 pdf/markdown |
generate_data_flow |
生成数据流图 | connection_id |
分析表间数据流向 |
export_ddl |
导出完整 DDL | connection_id |
包含表、视图、存储过程、触发器 |
📊 输出格式选项:
format: "markdown"- Markdown 文本(适合预览和编辑)format: "pdf"- PDF 文件(需要服务器安装中文字体)upload_to_oss: true- 上传到对象存储并返回下载链接
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 168 lines · 67 tokens per session scan A f6ccc5da095c
db-mcp-server is a skill published in the GitHub repository redgreat/db_mcp_server (2 stars, last pushed 2d ago), licensed MIT. It adds 67 tokens to every session and 2,194 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
alloydb-basics
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.
postgresql-table-design
Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.
db-repair
Auto-fix gbrain's Postgres access so the brain stays available. When any gbrain command or MCP tool result carries a GBRAINDBACCESS marker (or an operator reports the brain database is down), run the hardcoded gbrain db-repair ladder: diagnose, apply the safe tier, verify. The action is ALWAYS the hardcoded command …
claimable-postgres
Provision instant temporary Postgres databases via Claimable Postgres by Neon (neon.new) with no login, signup, or credit card. Supports REST API, CLI, and SDK. Use when users ask for a quick Postgres environment, a throwaway DATABASEURL for prototyping/tests, or "just give me a DB now". Triggers include: "quick…
dsql
Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…
volcengine-rds-postgresql
使用火山引擎 RDS PostgreSQL,帮助用户完成 RDS PostgreSQL 相关的实例管理、数据库操作、账号管理和运维任务,可直接调用 uv run ./scripts/callrdspostgresql.py 脚本获取实时结果。.