A production-grade MySQL MCP server with connection pooling, transactions, EXPLAIN analysis, CSV/JSON export, ER graph, audit log, and prompt templates.
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"mysql-mcp-pro","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# mysql-mcp-pro > 🇺🇸 [English version available here](README.en.md) [](LICENSE) [](https://www.python.org/downloads/) [](https://modelcontextprotocol.io) 一个生产级的 **MySQL MCP Server**,让 AI 助手(Claude Desktop / WorkBuddy / Cursor / Cline 等)通过标准化协议安全高效地操作 MySQL 数据库。 ## ✨ 为什么选 mysql-mcp-pro? 相比社区其他 MySQL MCP 实现,本项目提供了更完整的能力集: | 特性 | mysql-mcp-pro | 其他 MCP | |------|:---:|:---:| | 连接池(减少握手开销) | ✅ | ❌ | | 事务支持(begin/commit/rollback) | ✅ | ❌ | | EXPLAIN 自动解读 | ✅ | ❌ | | 结果导出 CSV/JSON(Excel 友好 BOM) | ✅ | ❌ | | ER 关系图数据(nodes/edges) | ✅ | 少数 | | 视图 / 存储过程 / 函数 / 触发器 浏览 | ✅ | 少数 | | 查询历史 & 审计日志 | ✅ | ❌ | | MCP Prompts 模板(生成/优化/对比/概览) | ✅ | ❌ | | 安全分级(只读/DDL/危险语句/超时/行限/参数化) | ✅ | 基础 | | 多传输模式(stdio / SSE / streamable-http) | ✅ | 部分 | ## 🚀 快速开始 ### 1. 安装 ```bash # 从源码(推荐先 clone 再使用) git clone https://github.com/CCCT173/mysql-mcp-pro.git cd mysql-mcp-pro pip install -e . # 或从 PyPI(待发布) pip install mysql-mcp-pro ``` ### 2. 配置环境变量 复制 `.env.example` 为 `.env` 并编辑: ```env MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USER=root MYSQL_PASSWORD=your_password MYSQL_DATABASE=your_database READ_ONLY=false # 只读模式 ALLOW_DDL=false # 是否允许 CREATE/ALTER/DROP MAX_RESULT_ROWS=1000 # 单次查询最大返回行数 QUERY_TIMEOUT=30 # 查询超时(秒) POOL_SIZE=5 AUDIT_LOG=true # 审计日志 EXPORT_DIR=./exports # 导出目录 ``` ### 3. 在你的 MCP 客户端注册 #### WorkBuddy 编辑 `~/.workbuddy/mcp.json`: ```json { "mcpServers": { "mysql": { "command": "python", "args": ["-m", "server"], "cwd": "D:/path/to/mysql-mcp-pro", "env": { "MYSQL_HOST": "localhost", "MYSQL_PORT": "3306", "MYSQL_USER": "root", "MYSQL_PASSWORD": "your_password", "MYSQL_DATABASE": "your_database" } } } } ``` 或者如果你已经 `pip install -e .`: ```json { "mcpS…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.