Data as of
MCP Server for MySQL for Cursor: Setup & Config
Cursor: 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 Cursor
Use it for SQL and schema access with read-only defaults and explicit controls for database writes.
- Enable selected data modifications through explicit operation flags.
- Query multiple databases or reach a remote database through SSH.
Before you start: MCP Server for MySQL in Cursor
- 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 Cursor configuration
Choose Cursor configuration scope
For MCP Server for MySQL, open Project: .cursor/mcp.json User: ~/.cursor/mcp.json. Merge into mcpServers at project or user scope.
Add MCP Server for MySQL to Cursor
Use the mcp-server-mysql entry below in mcpServers. Keep MCP Server for MySQL's documented stdio connection fields and your other Cursor entries.
Check MCP Server for MySQL in Cursor
MCP Server for MySQL: Enable in Cursor’s MCP settings; inspect tools.
Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.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 Cursor
MCP Server for MySQL's stored tool list documents 1 tool; compare it with Cursor's connected tool list, because the stored list is not a live check.
- mysql_query
Find mysql_query under MCP Server for MySQL in Cursor's MCP settings; inspect its arguments when the agent requests a call.
Execute SQL with read-only defaults and individually enabled write operations.
Troubleshooting MCP Server for MySQL in Cursor
- Cursor must find npx @benborla29/mcp-server-mysql (Node.js/npm) for MCP Server for MySQL. Enable the project/user entry in MCP settings and inspect its tools.
- Review MYSQL_DB, MYSQL_HOST, MYSQL_PASS, MYSQL_PORT, MYSQL_USER for MCP Server for MySQL before sharing project .cursor/mcp.json; project scope travels with the repository.
- MCP Server for MySQL uses stdio here: Cursor 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 Cursor troubleshooting lives in the /clients/cursor guide.
MCP Server for MySQL — details. Cursor guide