Overview
@enemyrr/mcp-mysql-server is a Model Context Protocol server that facilitates MySQL database operations, allowing AI models to interact with MySQL databases through a standardized interface.
To use the server, you can install it via Smithery or manually clone and build the project. After installation, configure the database connection and utilize various tools to perform database operations.
- Multiple connection methods (URL, workspace, direct) - Secure connection handling with automatic cleanup - Prepared statement support for query parameters - Schema management tools - Comprehensive error handling and validation - TypeScript support - Automatic workspace detection
- Connecting AI models to MySQL databases for data retrieval and manipulation.
- Executing complex SQL queries through a standardized interface.
- Managing database schemas and structures programmatically.
Add to your AI client
Use these steps to connect @enemyrr/mcp-mysql-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": {
"enemyrr-mcp-mysql-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-enemyrr-mcp-mysql-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": {
"enemyrr-mcp-mysql-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-enemyrr-mcp-mysql-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": {
"enemyrr-mcp-mysql-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-enemyrr-mcp-mysql-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": {
"enemyrr-mcp-mysql-server-mcp-mirror": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-enemyrr-mcp-mysql-server-mcp-mirror"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"enemyrr-mcp-mysql-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-enemyrr-mcp-mysql-server-mcp-mirror"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"enemyrr-mcp-mysql-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-enemyrr-mcp-mysql-server-mcp-mirror"
]
}
}
}FAQ
Can I connect to any MySQL database?
Yes! The server supports connections to any MySQL database using the appropriate credentials.
Is there support for error handling?
Yes! The server provides detailed error messages for connection failures, invalid queries, and more.
How do I contribute to the project?
Contributions are welcome! You can submit a Pull Request on the GitHub repository.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1343,"uuid":"eeeef563-8c4b-40c7-983c-9db7aa449b91","name":"enemyrr_mcp-mysql-server","title":"@enemyrr/mcp-mysql-server","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"2025-02-20T15:28:25.775+00:00","updated_at":"2025-02-23T07:21:17.687+00:00","status":"created","author_name":"MCP-Mirror","author_avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","tags":"mcp-mysql-server,database,AI-integration","category":"databases","is_featured":false,"sort":1,"url":"https://github.com/MCP-Mirror/enemyrr_mcp-mysql-server","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/59a011e43da2a00d5a1d2824afe0d378f0fed17782639c4b5da12e42175b60ef/68747470733a2f2f736d6974686572792e61692f62616467652f40656e656d7972722f6d63702d6d7973716c2d736572766572","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"}]]}]