MySQL MCP Server
@OTA-EITA
About MySQL MCP Server
No overview available yet
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql_mcp_servers": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server:latest",
"."
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MySQL MCP Server?
It provides a server to interact with MySQL databases using the Model Context Protocol (MCP). It is designed for accessing MySQL databases from WSL (Windows Subsystem for Linux) environments.
How to use MySQL MCP Server?
Clone the repository, create a Python 3.11+ virtual environment, install dependencies, and run the setup script. The server can be started directly (./run_direct.sh), as a module (./run_module.sh), or inside a Docker container (./run_docker.sh). Connection to MySQL is configured via environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE).
Key features of MySQL MCP Server
- Retrieves a list of tables in the database
- Reads data from a specific table (up to 100 rows)
- Executes SQL queries (SELECT, SHOW TABLES, INSERT, UPDATE, DELETE)
- Implements MCP endpoints: list_resources, read_resource, list_tools, call_tool
- Supports direct, module, and Docker execution
- Provides Nox sessions for testing, formatting, and linting
Use cases of MySQL MCP Server
- Query a MySQL database from any MCP‑compatible client (e.g., AI assistants)
- Access a MySQL database running inside WSL from outside the subsystem
- Automate database interactions by calling SQL tools through the MCP protocol
- Run ad‑hoc SQL queries (SELECT, INSERT, UPDATE, DELETE) without a full client
FAQ from MySQL MCP Server
What is the maximum number of rows returned when reading a table?
The read_resource endpoint returns up to 100 rows from a table.
What environment variables are required to connect to MySQL?
MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE must be set.
Can I run the server inside a Docker container?
Yes, build the Docker image with docker build -t mysql-mcp-server:latest . and run with ./run_docker.sh.
What Python version is needed?
Python 3.11 or higher is required.
How do I connect to a MySQL server running in WSL?
Configure the MySQL bind-address to 0.0.0.0, grant remote access to the user, and ensure the Windows firewall allows the MySQL port (default 13306).
More Databases MCP servers
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
Comments