Data as of
MCP Server for MySQL for Windsurf: Setup & Config
Windsurf: 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 Windsurf
Use it for SQL and schema access with read-only defaults and explicit controls for database writes.
- Run read-only SQL for database exploration.
- Query multiple databases or reach a remote database through SSH.
Before you start: MCP Server for MySQL in Windsurf
- 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 Windsurf configuration
Choose Windsurf configuration scope
For MCP Server for MySQL, open macOS/Linux: ~/.codeium/windsurf/mcp_config.json Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json. Merge into mcpServers; remote endpoints use serverUrl.
Add MCP Server for MySQL to Windsurf
Use the mcp-server-mysql entry below in mcpServers. Keep MCP Server for MySQL's documented stdio connection fields and your other Windsurf entries.
Check MCP Server for MySQL in Windsurf
MCP Server for MySQL: Refresh MCP in Windsurf settings and inspect Cascade’s tools.
Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_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 Windsurf
MCP Server for MySQL's stored tool list documents 1 tool; compare it with Windsurf's connected tool list, because the stored list is not a live check.
- mysql_query
After refreshing MCP Server for MySQL in Windsurf settings, check Cascade's tool list for mysql_query.
Execute SQL with read-only defaults and individually enabled write operations.
Troubleshooting MCP Server for MySQL in Windsurf
- Check npx @benborla29/mcp-server-mysql (Node.js/npm) on the machine running Windsurf's MCP integration for MCP Server for MySQL; refresh MCP and inspect Cascade's tools.
- Check MYSQL_DB, MYSQL_HOST, MYSQL_PASS, MYSQL_PORT, MYSQL_USER for MCP Server for MySQL; do not bypass a Windsurf permission error with a broad administrator token.
- MCP Server for MySQL uses stdio here: Windsurf 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 Windsurf troubleshooting lives in the /clients/windsurf guide.
MCP Server for MySQL — details. Windsurf guide