Basic information
About MySQL MCP Server
# MySQL MCP Server
MySQL MCP Server is a MCP server in the Databases category listed in the AddMCP.net directory, published by OTA-EITA. Supported transport: stdio. Runtime: python. The repository has 2 GitHub stars. Source code is hosted on github.com. Related topics: database-server, llm, mcp, model-context-protocol, mysql.
Setup
{
"mcpServers": {
"mysql_mcp_servers": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server:latest",
"."
]
}
}
}
{
"mcpServers": {
"mysql_mcp_servers": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server:latest",
"."
]
}
}
}
{
"servers": {
"mysql_mcp_servers": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server:latest",
"."
]
}
}
}
MySQL MCP Server — by OTA-EITA 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",
"."
]
}
}
}
MySQL MCP Server — by OTA-EITA tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
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
Frequently asked questions
1 What is the maximum number of rows returned when reading a table?
The read_resource endpoint returns up to 100 rows from a table.
2 What environment variables are required to connect to MySQL?
MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE must be set.
3 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.
4 What Python version is needed?
Python 3.11 or higher is required.
5 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).
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In