MySQL MCP Server
@he426100
About MySQL MCP Server
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql-mcp-server-he426100": {
"command": "docker",
"args": [
"build",
"-t",
"mysql-mcp-server",
"."
]
}
}
}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?
MySQL MCP Server is a Model Context Protocol (MCP) server that enables secure interaction with MySQL databases. It allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.
How to use MySQL MCP Server?
Clone the repository, install dependencies with Composer, and set environment variables for database connection (DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE). Run as a standalone server with php bin/console or via Docker.
Key features of MySQL MCP Server
- List available MySQL tables as resources
- Read table contents
- Execute SQL queries with proper error handling
- Secure database access through environment variables
- Comprehensive logging
Use cases of MySQL MCP Server
- AI-assisted database exploration and schema discovery
- Controlled read and query access for AI assistants
- Secure, logged database interaction in development environments
- Automated data retrieval and analysis workflows
FAQ from MySQL MCP Server
How does MySQL MCP Server ensure security?
It uses environment variables for credentials, recommends creating a dedicated MySQL user with minimal permissions, never uses root credentials, and enables logging for audit purposes.
What are the runtime requirements for MySQL MCP Server?
PHP and Composer are required. A MySQL database server must be accessible, with connection details provided via environment variables.
How do I run MySQL MCP Server with Docker?
Build the image with docker build -t mysql-mcp-server ., then run with docker run -i --rm mysql-mcp-server --host 127.0.0.1.
Is there support for query whitelisting?
The README suggests considering query whitelisting for production use but does not implement it by default.
Where is database connection data stored?
Connection credentials are supplied via environment variables at runtime; no persistent credential storage is provided by the server.
More Databases MCP servers
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma

Sqlite
modelcontextprotocolModel Context Protocol Servers
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Elasticsearch MCP Server
elasticClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.
Comments