Overview
mysql-server MCP Server is a TypeScript-based Model Context Protocol (MCP) server designed for accessing MySQL databases, providing tools for executing SQL queries and managing database connections.
To use the mysql-server MCP Server, configure the necessary environment variables for your MySQL connection and integrate it with your application by adding the server configuration to your Claude Desktop setup.
- Execute SQL queries through a simple command interface. - Connect to MySQL databases using environment variables for secure access. - Supports auto-rebuild during development for efficient coding.
- Querying MySQL databases in a TypeScript application.
- Integrating with Claude Desktop for enhanced database management.
- Debugging SQL queries using the MCP Inspector tool.
Add to your AI client
Use these steps to connect mysql-server 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": {
"xianzong85-mysql-server-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xianzong85-mysql-server-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": {
"xianzong85-mysql-server-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xianzong85-mysql-server-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": {
"xianzong85-mysql-server-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xianzong85-mysql-server-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": {
"xianzong85-mysql-server-mcp-server-mcp-mirror": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xianzong85-mysql-server-mcp-server-mcp-mirror"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"xianzong85-mysql-server-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xianzong85-mysql-server-mcp-server-mcp-mirror"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"xianzong85-mysql-server-mcp-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-xianzong85-mysql-server-mcp-server-mcp-mirror"
]
}
}
}FAQ
What programming language is used for the server?
The server is built using TypeScript.
How do I install the server?
Install dependencies using `npm install` and build the server with `npm run build`.
Can I debug the server?
Yes, you can use the MCP Inspector for debugging, which provides a URL for browser-based tools.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1014,"uuid":"a3dba7ff-88b1-46ea-9849-c471a27dcd4b","name":"xianzong85_mysql-server-MCP-Server","title":"mysql-server MCP Server","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"2025-01-28T02:26:35.374+00:00","updated_at":"2025-02-23T07:19:42.327+00:00","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/xianzong85_mysql-server-MCP-Server","target":"_self","content":"$29","summary":"$2a","img_url":null,"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"}]]}]