Mysql MCP Server
MySQL database exploration and SQL execution via Model Context Protocol.
Data last scanned today · Reviewed today
Overview
This Python-based server provides a structured interface for AI models to interact with MySQL databases. It enables developers to list tables, sample data, and run SQL queries directly from their AI-assisted development environments. The server supports multi-database modes and integrates with SSH tunneling for secure connectivity. Deployment is flexible, allowing for either local execution via Smithery or hosted usage through platforms like Fronteir AI. The system supports both STDIO and SSE transport modes to accommodate various AI host configurations and network requirements.
Our verdict
This server carries a high risk level with a security score of 53/100. Because the implementation is community-maintained and not officially reviewed, users should exercise caution regarding its authentication and read-only mode, both of which remain unverified. It is suitable for developers testing database interactions in non-sensitive environments, but not recommended for production setups handling critical data until further review is conducted.
- Supports both STDIO and SSE transport modes
- Zero direct dependencies minimize supply-chain surface area
- Active development with commits within the last three days
- Includes SSH tunneling support for remote connections
- High risk score due to lack of editorial security review
- Authentication mechanisms have not undergone independent security verification
- Read-only mode functionality is currently unreviewed
Tools
| Tool | Description | Risk |
|---|---|---|
| execute_sql | Executes any standard SQL query. | high |
| get_schema_info | Provides detailed metadata about database structures. | low |
| get_table_sample | Fetches a representative sample of data. | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf | ||||
| ChatGPT |
Frequently asked questions
›Can I connect to multiple databases simultaneously?
Yes, if you omit the MYSQL_DATABASE environment variable, the server enters multi-database mode. In this mode, you can query any table by using the database.table naming convention.
›Why is my local .env file not working with Claude Desktop or Claude Code?
These hosts launch the server from their own working directory rather than your project folder. You must define your credentials directly in the environment block of your MCP configuration instead of relying on a .env file.
›Does the server support SSH tunneling?
Yes, you can enable SSH tunneling by setting MYSQL_SSH_ENABLE to true and providing the necessary SSH host, user, and key path configuration.
›Can I execute multi-statement SQL queries?
No, the server only supports single SQL statements. Multi-statement queries such as using USE to switch databases are not supported.
›Which transport modes are available for this server?
The server supports both standard input/output (STDIO) and Streamable HTTP (SSE) transport modes, with SSE recommended for remote or self-hosted deployments.
›How are DML operations handled in the execute_sql tool?
The execute_sql tool supports DML operations like INSERT, UPDATE, and DELETE. These operations are explicitly marked with a destructive hint for safety.
Alternatives
Changelog
- Fixv0.4.4
2026-07-30
- Breakingv0.4.3
2026-07-30
- Securityv0.4.2
2026-06-20
- Fixv0.4.1
2026-06-08
- Newv0.4.0
2026-06-08
- Security
- Security
- FixRelease v0.2.2
2025-04-18
- Newv0.2.1 Release Notes
2025-03-29
- Newv0.2.0 Release Notes
2025-03-29
Badge
Maintain this server? Add the live badge to your README.