Data as of
MCP Server for MySQL for Claude Desktop: Setup & Config
Claude Desktop: MCP Server for MySQL lets Claude and other AI clients inspect schemas and execute SQL.
What you can do with MCP Server for MySQL in Claude Desktop
Use it for SQL and schema access with read-only defaults and explicit controls for database writes.
- Inspect table and column metadata from an AI client.
- Run read-only SQL for database exploration.
Before you start: MCP Server for MySQL in Claude Desktop
- Node.js 20 or newer
- MySQL 5.7 or newer; 8.0 or newer recommended
- A MySQL account with suitable privileges
- An MCP-compatible client
The local quick-start remains read-only unless write flags are enabled. ALLOW_INSERT_OPERATION, ALLOW_UPDATE_OPERATION, and ALLOW_DELETE_OPERATION opt into the corresponding writes. HTTP remote mode is listed but its setup is delegated to other documentation.
MCP Server for MySQL Claude Desktop configuration
Choose Claude Desktop configuration scope
For MCP Server for MySQL, open macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json. Merge under mcpServers via Settings → Developer → Edit Config when available.
Add MCP Server for MySQL to Claude Desktop
Use the mcp-server-mysql entry below in mcpServers. Keep MCP Server for MySQL's documented stdio connection fields and your other Claude Desktop entries.
Check MCP Server for MySQL in Claude Desktop
MCP Server for MySQL: Fully quit and reopen Claude Desktop; check developer diagnostics.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mcp-server-mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"env": {
"MYSQL_HOST": "<MySQL server hostname or address>",
"MYSQL_PORT": "<MySQL server port>",
"MYSQL_USER": "<MySQL username with appropriate privileges>",
"MYSQL_PASS": "<MySQL user password>",
"MYSQL_DB": "<Target database name>"
}
}
}
}MCP Server for MySQL tools available to Claude Desktop
MCP Server for MySQL's stored tool list documents 1 tool; compare it with Claude Desktop's connected tool list, because the stored list is not a live check.
- mysql_query
When Claude Desktop requests mysql_query from MCP Server for MySQL, review the action before approving it.
Execute SQL with read-only defaults and individually enabled write operations.
Troubleshooting MCP Server for MySQL in Claude Desktop
- Fully quit and reopen Claude Desktop for MCP Server for MySQL. If npx @benborla29/mcp-server-mysql (Node.js/npm) is missing, check the desktop process's PATH, which may differ from your terminal.
- In Claude Desktop's MCP Server for MySQL entry, check MYSQL_DB, MYSQL_HOST, MYSQL_PASS, MYSQL_PORT, MYSQL_USER. Keep secrets out of shared screenshots and repositories.
- MCP Server for MySQL uses stdio here: Claude Desktop must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
- Known limitation: Requires Node.js 20 or newer and MySQL 5.7 or newer.
- Known limitation: Advanced remote-mode and redaction configuration are delegated to separate documentation.
- General Claude Desktop troubleshooting lives in the /clients/claude-desktop guide.
MCP Server for MySQL — details. Claude Desktop guide