A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
MCPpedia last refreshed this data
Mysql_mcp_server is an MCP server that a Model Context Protocol (MCP) server that enables secure interaction with MySQL databases. Its tool list has not been published yet over stdio and sse, requires no API key, and scores 93/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mysql": {
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_DATABASE": "your_database",
"MYSQL_PASSWORD": "your_password"
},
"args": [
"--directory",
"path/to/mysql_mcp_server",
"run",
"mysql_mcp_server"
],
"command": "uv"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) implementation that enables secure interaction with MySQL databases. This server component facilitates communication between AI applications (hosts/clients) and MySQL databases, making database exploration and analysis safer and more structured through a controlled interface.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@smithery/cli' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
MySQL MCP Server is Vulnerable to SQL Injection Through its mysql URI Handler
A vulnerability was determined in designcomputer mysql-mcp-server up to 0.2.2. The impacted element is the function read_resource of the file src/mysql_mcp_server/server.py of the component mysql URI Handler. This manipulation of the argument uri_str causes sql injection. Remote exploitation of the attack is possible. The exploit has been publicly disclosed and may be utilized. Upgrading to version 0.3.0 is sufficient to resolve this issue. Patch name: 080bef9a96d625ce0dfbde573a08b93497871981. U
Click any tool to inspect its schema.
mysql_tablesList available MySQL tables as resources
mysql://tables
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in data
Manage Supabase projects — databases, auth, storage, and edge functions
Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
DataForSEO API modelcontextprotocol server
MCP Security Weekly
Get CVE alerts and security updates for Mysql_mcp_server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) implementation that enables secure interaction with MySQL databases. This server component facilitates communication between AI applications (hosts/clients) and MySQL databases, making database exploration and analysis safer and more structured through a controlled interface.
Note: MySQL MCP Server supports both standard input/output (STDIO) and Streamable HTTP (SSE) transport modes. The SSE mode is recommended for remote/self-hosted deployments.
MYSQL_DATABASE)MCP_TRANSPORT=sse)pip install mysql-mcp-server
To install MySQL MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install designcomputer/mysql-mcp-server --client claude
claude mcp add --transport stdio designcomputer-mysql_mcp_server uvx mysql_mcp_server
autohand mcp add mysql env MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_USER=your_username MYSQL_PASSWORD=your_password MYSQL_DATABASE=your_database uvx mysql_mcp_server
Add --scope project after mcp add to keep the registration in the current workspace. See Autohand Code for current CLI details.
Set the following environment variables:
MYSQL_HOST=localhost # Database host
MYSQL_PORT=3306 # Optional: Database port (defaults to 3306 if not specified)
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_database # Optional: Omit for multi-database mode
# Advanced Configuration
MYSQL_SSL_MODE=DISABLED # DISABLED, REQUIRED, VERIFY_CA, VERIFY_IDENTITY
MYSQL_CONNECT_TIMEOUT=10 # Timeout in seconds
# Connection behaviour (Optional)
MYSQL_SQL_MODE=TRADITIONAL # SQL mode applied to the connection (default: TRADITIONAL)
# Compatibility (Optional)
MYSQL_CHARSET=utf8mb4
MYSQL_COLLATION=utf8mb4_unicode_ci
MYSQL_AUTH_PLUGIN= # e.g., mysql_native_password for older MySQL versions
MYSQL_USE_PURE=false # Force the pure-Python connector (default: false)
MYSQL_RAISE_ON_WARNINGS=false # Raise on SQL warnings (default: false)
# SSE Transport (Optional)
MCP_TRANSPORT=stdio # stdio or sse
MCP_SSE_HOST=0.0.0.0 # Listen on all interfaces (required for Docker/hosting)
PORT=8000 # HTTP port (fallback for MCP_SSE_PORT)
MCP_SSE_ALLOWED_HOSTS= # Comma-separated allowed Host headers (default: localhost:{port},127.0.0.1:{port})
# SSH Tunneling (Optional)
MYSQL_SSH_ENABLE=false # Set to true to enable
MYSQL_SSH_HOST= # SSH jump host
MYSQL_SSH_PORT=22 # SSH port
MYSQL_SSH_USER= # SSH username
MYSQL_SSH_KEY_PATH= # Path to SSH private key
MYSQL_SSH_REMOTE_HOST=localhost #
... [View full README on GitHub](https://github.com/designcomputer/mysql_mcp_server#readme)