mysql_mcp_server
MySQL MCP Server is a Python-based bridge that lets AI applications (like Claude) safely query MySQL databases through a structured protocol. It supports multiple deployment modes including local installation, Docker, and hosted options, with features like SSH tunneling and HTTP transport.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | designcomputer/mysql_mcp_server |
| Owner | designcomputer |
| Primary language | Python |
| License | MIT — OSI-approved |
| Stars | 1.3k |
| Forks | 242 |
| Open issues | 1 |
| Latest release | v0.4.2 (2026-06-20) |
| Last updated | 2026-06-20 |
| Source | https://github.com/designcomputer/mysql_mcp_server |
What mysql_mcp_server is
A Model Context Protocol (MCP) server written in Python that exposes MySQL database interaction through three tools: execute_sql, get_schema_info, and get_table_sample. Supports both STDIO and SSE (Server-Sent Events) transport modes, multi-database operation, and SSH tunneling via environment variable configuration.
Get the mysql_mcp_server source
Clone the repository and explore it locally.
git clone https://github.com/designcomputer/mysql_mcp_server.gitcd mysql_mcp_server# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Environment variables (MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD) must be carefully managed; Claude Desktop users cannot rely on .env files in the project directory—credentials must be set in the MCP config.
- SSH tunneling is optional but requires key-based authentication; ensure SSH_KEY_PATH is accessible to the process and permissions are correctly set (e.g., 0600).
- For SSE/HTTP deployments, configure MCP_SSE_ALLOWED_HOSTS to restrict which hosts can connect; default is localhost and 127.0.0.1, but Docker/remote setups need explicit allowlisting.
- Test single-statement execution limits early; refactor any multi-statement SQL workflows before deploying.
- SSL mode (MYSQL_SSL_MODE) defaults to DISABLED; for production use, consider REQUIRED or VERIFY_CA and ensure certificate chain is available.
When to avoid it — and what to weigh
- Multi-Statement Transaction Requirements — The server explicitly does not support multi-statement queries (e.g., `USE db; SELECT ...`). If your workflow requires atomic multi-step operations or transactions, you cannot use this server alone.
- Complex Real-Time Streaming or Event-Driven Workflows — This is a request-response tool, not a real-time data streaming solution. If you need continuous database change notifications or event-driven triggers, look elsewhere.
- Compliance Scenarios Requiring Formal Audit Trails — While the server logs connections, the README does not document comprehensive audit logging, compliance certifications (SOC 2, HIPAA, etc.), or formal data retention policies. Review security requirements before use in regulated industries.
- Non-MySQL Relational Databases — The server is MySQL-specific. PostgreSQL, SQL Server, or Oracle users need alternative implementations.
License & commercial use
MIT License. This is a permissive OSI-approved license allowing commercial use, modification, and redistribution with no warranty and minimal restrictions (attribution required).
MIT License explicitly permits commercial use. However, review the license text and the project's use-case terms (if any) to confirm there are no downstream restrictions. The license itself imposes no liability or warranty guarantees; you assume risk of use. No commercial support level or SLA is documented.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Strong |
| Assessment confidence | High |
Environment variables store credentials; ensure they are never committed to version control or logged. The server does not validate SQL queries (single-statement enforcement is a boundary, not a firewall). SSL mode is configurable but defaults to DISABLED; enable for production. SSH tunneling support offloads credential exposure risk if configured correctly. No explicit mention of rate limiting, query timeouts (beyond MYSQL_CONNECT_TIMEOUT), or injection prevention mechanisms. Audit logging is mentioned but scope is unclear. AgentAudit 'safe' badge is present but criteria are not defined in the README.
Alternatives to consider
LangChain / LlamaIndex MySQL Integrations
Framework-native integrations that bind MySQL directly to LLM chains with less scaffolding, but lack the MCP protocol's standardized interface and may have tighter coupling to specific LLM vendors.
PostgreSQL MCP Server (similar architecture, Postgres-native)
Drop-in alternative if you use PostgreSQL; same MCP interface, likely similar feature set (SSH tunneling, SSE, prompts), but not interchangeable for MySQL workloads.
Custom REST API + Standard HTTP Client
Build your own lightweight HTTP wrapper around MySQL using Flask/FastAPI; more control and no MCP dependency, but requires more development and loses the MCP ecosystem benefits.
Build on mysql_mcp_server with DEV.co software developers
MySQL MCP Server bridges MySQL and large language models securely. Start with local installation via pip, or use Fronteir AI for managed hosting. Explore your database with Claude in minutes.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
mysql_mcp_server FAQ
Can I run multiple queries in one call (e.g., `USE db; SELECT ...`)?
Where should I store my database credentials for Claude Desktop?
What is the difference between STDIO and SSE transport?
Is this suitable for production use?
Software developers & web developers for hire
DEV.co helps companies turn open-source tools like mysql_mcp_server into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your mcp servers stack.
Ready to Connect Your Database to AI?
MySQL MCP Server bridges MySQL and large language models securely. Start with local installation via pip, or use Fronteir AI for managed hosting. Explore your database with Claude in minutes.