MySQL MCP Server
A MySQL implementation of the Model Context Protocol (MCP) server. This server allows AI models to interact with MySQL databases through a standardized interface.
Overview
MySQL MCP Server is a MySQL implementation of the Model Context Protocol (MCP) server, enabling AI models to interact with MySQL databases through a standardized interface.
To use the MySQL MCP Server, install it via npm, configure the server settings in the Claude Desktop App, and run the server with the specified command.
- List available database tables - Get table schemas - Execute read-only SQL queries - Safe transaction handling with automatic rollback
- Integrating AI models with MySQL databases for data retrieval.
- Facilitating standardized interactions between AI applications and database systems.
- Enabling developers to manage database operations through AI-driven interfaces.
Add to your AI client
Use these steps to connect MySQL MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mysql-mcp-server-wuwen1030": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-wuwen1030"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mysql-mcp-server-wuwen1030": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-wuwen1030"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mysql-mcp-server-wuwen1030": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-wuwen1030"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mysql-mcp-server-wuwen1030": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-wuwen1030"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mysql-mcp-server-wuwen1030": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-wuwen1030"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mysql-mcp-server-wuwen1030": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-server-wuwen1030"
]
}
}
}FAQ
What is the Model Context Protocol (MCP)?
MCP is a protocol that standardizes how AI models can interact with various data sources, including databases.
How do I install MySQL MCP Server?
You can install it using npm with the command `npm install` followed by `npm run build`.
Is MySQL MCP Server free to use?
Yes! MySQL MCP Server is open-source and free to use.