零负担、开箱即用的模型上下文协议(MCP)服务器,用于与 MySQL 交互和自动化操作。无需 Node.js 或 Python 环境。该服务器提供对 MySQL 数据库和表进行 CRUD 操作的工具,以及只读模式以防止意外的写入操作。您还可以通过添加 --with-explain-check 标志让 MCP 服务器在执行查询前使用 EXPLAIN 语句检查查询计划。
Overview
what is MySQL?
MySQL is a lightweight, out-of-the-box Model Context Protocol (MCP) server designed for interacting with MySQL databases and automating operations without the need for a Node.js or Python environment.
how to use MySQL?
To use MySQL, run the MCP server with the appropriate command line arguments to connect to your MySQL database. You can perform various operations such as listing databases, creating tables, and executing SQL queries.
key features of MySQL?
- CRUD operations on MySQL databases and tables.
- Read-only mode to prevent accidental writes.
- EXPLAIN statement for query plan checks before execution.
use cases of MySQL?
- Automating database management tasks.
- Performing batch operations on MySQL databases.
- Integrating with applications that require database interactions.
FAQ from MySQL?
- Do I need to install Node.js or Python to use MySQL?
No, MySQL is designed to work without requiring Node.js or Python.
- Can I perform write operations on the database?
Yes, you can execute write queries, but you can also run it in read-only mode to prevent accidental writes.
- How do I connect to my MySQL database?
Use the command line with the specified parameters such as host, user, password, port, and database name.
Server Config
{
"mcpServers": {
"mysql": {
"command": "C:\\Users\\<username>\\Downloads\\go-mcp-mysql.exe",
"args": [
"--host",
"localhost",
"--user",
"root",
"--pass",
"password",
"--port",
"3306",
"--db",
"mydb"
]
}
}
}