A Model Context Protocol (MCP) server for MySQL databases with multi-database support and read-only mode. Enables AI assistants to securely query multiple MySQL databases.
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":"mcp-mysql-server-2","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.
# MCP MySQL Server [](https://pypi.org/project/mcp-mysql-server/) [](https://pypi.org/project/mcp-mysql-server/) MySQL 数据库模型上下文协议 (MCP) 实现,支持与 MySQL 数据库的安全交互。该服务器组件促进 AI 应用程序(主机/客户端)与 MySQL 数据库之间的通信,使数据库探索和分析更加安全和结构化。 > **注意**: MCP MySQL Server 不是设计为独立服务器,而是作为 AI 应用程序和 MySQL 数据库之间的通信协议实现。 ## 功能特性 - **多数据库支持**: 配置多个 MySQL 连接,每个连接作为独立的工具 - **只读模式**: 将连接限制为仅执行 SELECT/SHOW/DESCRIBE 查询 - 列出可用的 MySQL 表作为资源(按连接分组) - 读取表内容 - 执行 SQL 查询,具有适当的错误处理 - 通过环境变量或配置文件实现安全的数据库访问 - 全面的日志记录 ## 安装 ### 使用 uvx(推荐) ```bash uvx mcp-mysql-server ``` ### 使用 pip ```bash pip install mcp-mysql-server ``` ## 配置 ### 多数据库配置(推荐) 您可以使用 JSON 配置文件或环境变量来配置多个 MySQL 连接。 #### 选项 1:JSON 配置文件 创建 JSON 配置文件并设置 `MYSQL_CONFIG_FILE` 环境变量: **单数据库模式**(每个连接一个默认数据库): ```json { "connections": { "config_manage": { "host": "localhost", "port": 3306, "user": "your_username", "password": "your_password", "database": "mysql-config-manage" }, "product_staging": { "host": "localhost", "port": 3306, "user": "your_username", "password": "your_password", "database": "mysql-product-sg-staging" } } } ``` **多数据库模式**(一个连接可访问多个数据库,推荐用于大量数据库场景): 当同一个 MySQL 服务器上有多个数据库需要访问时,使用 `databases` 数组指定允许访问的数据库列表。**每个连接只生成一个工具**,通过 `database` 参数指定要操作的数据库: ```json { "connections": { "local_server": { "host": "localhost", "port": 3306, "user": "your_username", "password": "your_password", "databases": ["config_manage", "product_staging", "user_center", "orders", "inventory"], "readonly": true }, "production": { "host": "prod-db.example.com", "port": 3306, "user": "prod_user", "password": "prod_password", "databases": ["orders", "inventory", "analytics", "users", "logs"], "readonly": true } } } ``` 这将创建 **2 个工具**(而不是 10 个): - `execut…
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.