MySQL MCP Server
An MCP server implementation that integrates with MySQL databases, providing secure database access capabilities for LLMs.
Overview
MySQL MCP Server is an implementation that integrates with MySQL databases, providing secure database access capabilities for Large Language Models (LLMs).
To use MySQL MCP Server, install it via npm and configure it with your MySQL database settings in the Dive Desktop application.
- Read Operations: Execute read-only SELECT queries, list database tables, show table structures, and view schema information. - Write Operations: Execute INSERT/UPDATE/DELETE with transaction support and parameterized queries for data safety. - Security: Read-only transaction mode, query length and result size limits, performance monitoring, and automatic transaction handling.
- Securely accessing and querying MySQL databases from LLMs.
- Performing data modifications with safety and transaction support.
- Integrating with applications like Dive Desktop for enhanced database management.
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-kevinwatt": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-kevinwatt"
]
}
}
}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-kevinwatt": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-kevinwatt"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mysql-mcp-kevinwatt": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-kevinwatt"
]
}
}
}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-kevinwatt": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-kevinwatt"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mysql-mcp-kevinwatt": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-kevinwatt"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mysql-mcp-kevinwatt": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-mcp-kevinwatt"
]
}
}
}FAQ
Can I use MySQL MCP Server with any version of MySQL?
Yes, as long as it meets the requirements of Node.js 18+ and is compatible with the MCP service.
Is there a limit on the number of queries I can execute?
Yes, there are limits on query length and result size to ensure performance and security.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1421,"uuid":"be0d5e5e-669b-4336-bd46-72672cb04e4e","name":"mysql-mcp","title":"MySQL MCP Server","description":"An MCP server implementation that integrates with MySQL databases, providing secure database access capabilities for LLMs.","avatar_url":"https://avatars.githubusercontent.com/u/171228?v=4","created_at":"2025-02-20T15:44:28.124Z","updated_at":"2025-02-23T07:21:40.040Z","status":"created","author_name":"kevinwatt","author_avatar_url":"https://avatars.githubusercontent.com/u/171228?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/kevinwatt/mysql-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"3\",\"license\":\"MIT license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-02-25 00:06:35\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]