MySQL MCP Server
@OTA-EITA
关于 MySQL MCP Server
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mysql_mcp_servers": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server:latest",
"."
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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).
数据库 分类下的更多 MCP 服务器
Elasticsearch/OpenSearch MCP Server
cr7258A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction.
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
PostgreSQL Model Context Protocol (PG-MCP) Server
stuzeroMCP Server for Milvus
zilliztechModel Context Protocol Servers for Milvus
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
评论