MySQL MCP Server
@kevinwatt
About MySQL MCP Server
An MCP server implementation that integrates with MySQL databases, providing secure database access capabilities for LLMs.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql-mcp": {
"command": "npx",
"args": [
"@kevinwatt/mysql-mcp"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MySQL MCP Server?
MySQL MCP Server is an MCP server implementation that integrates with MySQL databases, providing secure database access capabilities for LLMs. It enables language models to execute SQL queries, list tables, describe schemas, and perform data modifications with transaction support.
How to use MySQL MCP Server?
Install via npm install -g @kevinwatt/mysql-mcp, then configure environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, MYSQL_DB) and run with a compatible MCP host like Dive Desktop. Alternatively, start manually with npx @kevinwatt/mysql-mcp.
Key features of MySQL MCP Server
- Execute read-only SELECT queries with safety limits
- Perform INSERT/UPDATE/DELETE with automatic transactions
- List all tables and describe table structures
- Parameterized queries for data safety
- Query length (4096 chars) and result row (1000) limits
Use cases of MySQL MCP Server
- Natural-language database querying via LLM
- Automated schema exploration and documentation
- Safe data modification with transaction rollback
- Integration with MCP‑compatible AI assistants
FAQ from MySQL MCP Server
What limits are enforced on queries?
Maximum query length is 4096 characters, maximum result rows are 1000, and query timeout is 30 seconds.
What are the system requirements?
Node.js 18+ and a running MySQL Server are required. The server must be used with an MCP‑compatible LLM service.
How are write transactions handled?
mysql_execute automatically wraps INSERT/UPDATE/DELETE in transactions, returning affected rows count and last insert ID.
Is the server read‑only for SELECT queries?
Yes, the mysql_query tool enforces a read‑only transaction mode for all SELECT statements.
What authentication or transport configuration is needed?
Connection is configured via environment variables for host, port, user, password, and database. No separate auth mechanism is mentioned beyond standard MySQL credentials.
Frequently asked questions
What limits are enforced on queries?
Maximum query length is 4096 characters, maximum result rows are 1000, and query timeout is 30 seconds.
What are the system requirements?
Node.js 18+ and a running MySQL Server are required. The server must be used with an MCP‑compatible LLM service.
How are write transactions handled?
`mysql_execute` automatically wraps INSERT/UPDATE/DELETE in transactions, returning affected rows count and last insert ID.
Is the server read‑only for SELECT queries?
Yes, the `mysql_query` tool enforces a read‑only transaction mode for all SELECT statements.
What authentication or transport configuration is needed?
Connection is configured via environment variables for host, port, user, password, and database. No separate auth mechanism is mentioned beyond standard MySQL credentials.
Basic information
More Databases MCP servers
Elasticsearch MCP Server
elasticPostgreSQL Model Context Protocol (PG-MCP) Server
stuzeromcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Comments