MySQL MCP Server
Enable AI agents to connect to MySQL databases for schema inspection, query execution, and data exploration. Community-maintained server supporting connection pooling and configurable access controls.
Quick Install
$ npx -y @benborla29/mcp-server-mysqlEnvironment Variables
| Variable | Description | Required |
|---|---|---|
| MYSQL_HOST | MySQL server hostname | Yes |
| MYSQL_USER | Database username | Yes |
| MYSQL_PASSWORD | Database password | Yes |
| MYSQL_DATABASE | Database name | Yes |
In-Depth Setup Guide
Complete setup walkthrough & security best practices
Configuration by Client
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@benborla29/mcp-server-mysql"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "",
"MYSQL_DATABASE": "mydb"
}
}
}
}Need a different client? Use the Config Generator for Windsurf, Cline, Antigravity, and more.
Available Tools (1)
MySQL FAQ
What is the MySQL MCP server?
Enable AI agents to connect to MySQL databases for schema inspection, query execution, and data exploration. Community-maintained server supporting connection pooling and configurable access controls.
How do I install the MySQL MCP server?
Run: npx -y @benborla29/mcp-server-mysql
Which AI clients support the MySQL MCP server?
The MySQL MCP server works with Claude Desktop, Cursor, Codex CLI, Antigravity, Windsurf, and any MCP-compatible client using stdio transport.
What tools does the MySQL MCP server provide?
The server provides 1 tools: query.