Overview
MySQL MCP Server is a Model Context Protocol (MCP) server that facilitates secure interaction with MySQL databases, allowing AI assistants to perform database operations in a controlled manner.
To use the MySQL MCP Server, install it via pip, configure the necessary environment variables, and run it either as a standalone server or integrate it with Claude Desktop.
- Lists available MySQL tables as resources - Reads table contents - Executes SQL queries with error handling - Ensures secure database access through environment variables - Provides comprehensive logging for database operations
- Securely exploring MySQL databases through AI assistants.
- Executing SQL queries in a controlled environment.
- Logging and monitoring database interactions for security purposes.
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": {
"designcomputer-mysql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-designcomputer-mysql-mcp-server-mcp-mirror"
]
}
}
}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": {
"designcomputer-mysql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-designcomputer-mysql-mcp-server-mcp-mirror"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"designcomputer-mysql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-designcomputer-mysql-mcp-server-mcp-mirror"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"designcomputer-mysql-mcp-server-mcp-mirror": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-designcomputer-mysql-mcp-server-mcp-mirror"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"designcomputer-mysql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-designcomputer-mysql-mcp-server-mcp-mirror"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"designcomputer-mysql-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-designcomputer-mysql-mcp-server-mcp-mirror"
]
}
}
}FAQ
Is MySQL MCP Server secure?
Yes! It is designed with security best practices, including minimal permissions for database users and comprehensive logging.
How do I install MySQL MCP Server?
You can install it using pip with the command `pip install mysql-mcp-server`.
Can I use MySQL MCP Server with other applications?
Yes! It can be integrated with various applications that support MCP, such as Claude Desktop.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":662,"uuid":"82e1408b-9317-4da3-bfbe-e597f6ab516b","name":"designcomputer_mysql_mcp_server","title":"MySQL MCP Server","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"2024-12-30T03:25:40.851Z","updated_at":"2025-02-23T07:15:11.706Z","status":"created","author_name":"MCP-Mirror","author_avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","tags":"mysql,mcp-server,database-access","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/MCP-Mirror/designcomputer_mysql_mcp_server","target":"_self","content":"$29","summary":"$2a","img_url":"https://github.com/designcomputer/mysql_mcp_server/actions/workflows/test.yml/badge.svg","type":null,"metadata":null,"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"}]]}]