这是一个专为 Cursor 设计的MySQL数据库 MCP (Model Context Protocol) 服务,提供表结构查询、文档生成和数据查询功能。
mysql-mcp is an MCP project maintained in the gcluowenqiang/mysql-mcp repository. The maintainer describes its purpose as “这是一个专为 Cursor 设计的MySQL数据库 MCP (Model Context Protocol) 服务,提供表结构查询、文档生成和数据查询功能。”. Read the project documentation for the complete scope.
The project provides a local client configuration using python. Follow the repository’s build and installation steps before copying it, and replace example paths with the paths on your own computer.
The example declares MYSQL_HOST, MYSQL_PORT, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE, MYSQL_SECURITY_MODE, MYSQL_ALLOWED_SCHEMAS, MYSQL_ENABLE_QUERY_LOG. Secret-looking values have been replaced with placeholders. Required and optional labels are shown only when the documentation states them.
Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.
{
"mcpServers": {
"mysql-mcp": {
"command": "python",
"args": [
"F:/path/to/mysql-mcp/main.py"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USERNAME": "your_username",
"MYSQL_PASSWORD": "YOUR_MYSQL_PASSWORD",
"MYSQL_DATABASE": "your_database",
"MYSQL_SECURITY_MODE": "readonly",
"MYSQL_ALLOWED_SCHEMAS": "*",
"MYSQL_ENABLE_QUERY_LOG": "false"
}
}
}
}From the project documentation. Replace placeholders and example paths before connecting.
| Variable | Description | Required |
|---|---|---|
| MYSQL_HOST | Declared in the maintainer’s client configuration. | Check documentation |
| MYSQL_PORT | Declared in the maintainer’s client configuration. | Check documentation |
| MYSQL_USERNAME | Declared in the maintainer’s client configuration. | Check documentation |
| MYSQL_PASSWORD | Declared in the maintainer’s client configuration. | Check documentation |
| MYSQL_DATABASE | Declared in the maintainer’s client configuration. | Check documentation |
| MYSQL_SECURITY_MODE | Declared in the maintainer’s client configuration. | Check documentation |
| MYSQL_ALLOWED_SCHEMAS | Declared in the maintainer’s client configuration. | Check documentation |
| MYSQL_ENABLE_QUERY_LOG | Declared in the maintainer’s client configuration. | Check documentation |
Inspect PostgreSQL schemas and run read-only queries with the archived MCP reference server. Review its maintenance status before choosing it.
Connect the Notion MCP server to search workspace content and work with pages and databases through Notion’s hosted OAuth service.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.