mysql-server MCP Server
Overview
mysql-server MCP Server is a Model Context Protocol server designed for MySQL database access, built using TypeScript. It provides tools for executing SQL queries and connecting to MySQL databases.
To use the mysql-server MCP Server, configure the necessary environment variables for your MySQL connection and execute SQL queries through the provided tools.
- Execute SQL queries using the
querytool. - Connect to MySQL databases via environment variables. - Supports debugging with the MCP Inspector.
- Executing SQL queries in a TypeScript environment.
- Integrating MySQL database access into applications using the Model Context Protocol.
- Debugging MCP server communications with the MCP Inspector.
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": {
"mysql-server-mcp-server-xianzong85": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-server-mcp-server-xianzong85"
]
}
}
}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-server-mcp-server-xianzong85": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-server-mcp-server-xianzong85"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mysql-server-mcp-server-xianzong85": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-server-mcp-server-xianzong85"
]
}
}
}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-server-mcp-server-xianzong85": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-server-mcp-server-xianzong85"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mysql-server-mcp-server-xianzong85": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-server-mcp-server-xianzong85"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mysql-server-mcp-server-xianzong85": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mysql-server-mcp-server-xianzong85"
]
}
}
}FAQ
What programming language is used for the server?
The server is built using TypeScript.
How do I configure my MySQL connection?
Set the MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE environment variables in your MCP server configuration.
Is there a debugging tool available?
Yes, you can use the MCP Inspector for debugging.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1123,"uuid":"813e4c2c-85c4-4679-9cd2-652a1d8dd95a","name":"mysql-server-MCP-Server","title":"mysql-server MCP Server","description":null,"avatar_url":"https://avatars.githubusercontent.com/u/56583627?v=4","created_at":"$D2025-01-28T02:33:11.027Z","updated_at":"$D2025-02-23T07:20:07.815Z","status":"created","author_name":"xianzong85","author_avatar_url":"https://avatars.githubusercontent.com/u/56583627?v=4","tags":"mysql,mcp,database,typescript","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/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"}]]}]