MySQL is a Databases MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent mySQL database integration for AI queries. Install in 1 minute with mcpizy install mysql.
Databases
MySQL database integration for AI queries
Official homepagemcpizy install mysqlnpx -y mcp-server-mysqlqueryRun a read-only SQL query
Inputs
sqlstringrequiredlist_databasesList all databases on the server
list_tablesList tables in the current database
describe_tableShow columns, types, and keys for a table
Inputs
tablestringrequiredWorks identically across clients. Only the config file path differs.
~/.claude.json{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "",
"MYSQL_DATABASE": "mydb"
}
}
}
}.cursor/mcp.json{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "",
"MYSQL_DATABASE": "mydb"
}
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "",
"MYSQL_DATABASE": "mydb"
}
}
}
}Connect with a read-only MySQL user for safety
MYSQL_USERPaste any of these prompts into Claude Code, Cursor or another MCP-compatible client.
“Describe the schema of the `orders` table”
Uses: describe_table
“Show me every table in the current database with row counts”
Uses: list_tables, query
“Top 10 products by revenue in Q1”
Uses: query
If MySQL doesn't fit your stack, these Databases MCP servers solve similar problems.
The MySQL MCP server is an Databases Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents mySQL database integration for AI queries. It exposes MySQL's capabilities as tools the AI can call directly from your editor or CLI.
The fastest way is the MCPizy CLI: run `mcpizy install mysql` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y mcp-server-mysql` and restarting Claude Code.
Yes. The MySQL MCP server is free and open source (see the GitHub repository linked on this page). You may still need a MySQL account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.
Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.
Once installed, your AI agent can mySQL database integration for AI queries directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run MySQL operations, inspect results, chain MySQL with other MCP servers (see our Workflow Recipes), and automate repetitive databases tasks without leaving your editor.