mysql-mcp-zag
Execute SQL queries and browse database tables and structure via MCP tools and resources.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mysql-mcp-zaglist all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MySQL MCP Server
A modern MySQL Model Context Protocol (MCP) server built with FastMCP.
Features
Execute SQL queries via MCP tools
Browse database tables and structure via MCP resources
SSL certificate support
Connection pooling and error handling
Configuration
Command Line Arguments
Required Arguments
Argument | Description | Default |
| MySQL username | (required) |
| MySQL password | (required) |
| MySQL database name | (required) |
Database Connection (Optional)
Argument | Description | Default |
| MySQL server host |
|
| MySQL server port |
|
SSL Configuration (Optional)
Argument | Description | Default |
| Path to SSL CA certificate file | (none - SSL auto-negotiated) |
| Path to SSL client certificate file | (none) |
| Path to SSL client private key file | (none) |
| Disable SSL connection entirely |
|
Note: If --ssl-cert is provided, --ssl-key must also be provided, and vice versa.
Advanced Options (Optional)
Argument | Description | Default |
| Character set for the connection |
|
| Collation for the connection |
|
| MySQL SQL mode |
|
Usage
Simple Configuration
{
"mcpServers": {
"mysql": {
"command": "uvx",
"args": [
"mysql-mcp-zag",
"--host", "localhost",
"--port", "3306",
"--user", "your_user",
"--password", "your_password",
"--database", "your_database"
]
}
}
}Complex Configuration
{
"mcpServers": {
"mysql": {
"command": "uvx",
"args": [
"mysql-mcp-zag",
"--host", "your-remote-host.com",
"--port", "25060",
"--user", "your_user",
"--password", "your_password",
"--database", "your_database",
"--ssl-ca", "/path/to/ca-certificate.pem"
]
}
}
}Available Tools
execute_sql: Execute SQL queries
Available Resources
mysql://tables: List all tablesmysql://tables/{table}: Describe table structure
Requirements
Python 3.13+
MySQL server
uvx (for installation and usage)
Created by Michael Zag, Michael@MichaelZag.com
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Michaelzag/mysql-mcp-zag'
If you have feedback or need assistance with the MCP directory API, please join our Discord server