MM
MySQL MCP Server
Query, inspect, and manage MySQL databases from your AI agent.
Last updated July 18, 2026
DatabaseLocal · stdioJavaScript2k
Overview
An MCP server that connects an AI agent directly to a MySQL database — run SELECT/INSERT/UPDATE queries, inspect schemas and table structures, and manage data, with configurable read-only or write-enabled modes.
Use cases
Ask an agent to explain a table's schema before writing a migration.
Run ad-hoc SELECT queries against production data without opening a SQL client.
Have an agent draft and execute INSERT/UPDATE statements from a natural-language request.
Install
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASS": "your_password",
"MYSQL_DB": "your_database"
}
}
}
}FAQ
Yes — set the read-only environment flag to disable INSERT/UPDATE/DELETE statements, useful for giving an agent safe query access to production.