MySQL Database Access MCP Server
@MCP-Mirror
About MySQL Database Access MCP Server
Mirror of
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"mysql-mcp-server"
],
"env": {
"MYSQL_HOST": "",
"MYSQL_PORT": "",
"MYSQL_USER": "",
"MYSQL_PASSWORD": "",
"MYSQL_DATABASE": ""
}
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is MySQL Database Access MCP Server?
This MCP server provides read-only access to MySQL databases. It allows listing databases, listing tables, describing table schemas, and executing read-only SQL queries. It is designed for developers who need safe, read-only database exploration and querying via the Model Context Protocol.
How to use MySQL Database Access MCP Server?
Install globally via npm install -g mysql-mcp-server or locally. Configure environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE). Add the server to your MCP settings file using either npx mysql-mcp-server (npm install) or node /path/to/build/index.js (build from source).
Key features of MySQL Database Access MCP Server
- Read-only access: only SELECT, SHOW, DESCRIBE, EXPLAIN allowed
- Query validation prevents SQL injection and data modification
- Query timeout prevents long-running queries
- Row limit prevents excessive data return
- Tools: list_databases, list_tables, describe_table, execute_query
Use cases of MySQL Database Access MCP Server
- Exploring database structure (list tables, describe schemas)
- Running safe, read-only analytics queries
- Integrating MySQL data with AI assistants via MCP
- Checking database content without write risk
FAQ from MySQL Database Access MCP Server
What dependencies does this server require?
Node.js and npm. A MySQL database server accessible via the provided credentials is also required.
How is authentication handled?
Authentication uses environment variables: MYSQL_USER, MYSQL_PASSWORD, and optionally MYSQL_HOST and MYSQL_PORT.
What security restrictions are in place?
Only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are allowed. Query validation blocks injection and data modification attempts. A query timeout and row limit protect resources.
Do I need to set up a MySQL user with specific permissions?
Yes. Your MySQL user must have appropriate permissions to list databases, list tables, describe schemas, and execute read-only queries on the target databases.
Can I modify data through this server?
No. The server enforces strict read-only access; any attempt to execute INSERT, UPDATE, DELETE, or other modification statements will be rejected.
Frequently asked questions
What dependencies does this server require?
Node.js and npm. A MySQL database server accessible via the provided credentials is also required.
How is authentication handled?
Authentication uses environment variables: `MYSQL_USER`, `MYSQL_PASSWORD`, and optionally `MYSQL_HOST` and `MYSQL_PORT`.
What security restrictions are in place?
Only SELECT, SHOW, DESCRIBE, and EXPLAIN statements are allowed. Query validation blocks injection and data modification attempts. A query timeout and row limit protect resources.
Do I need to set up a MySQL user with specific permissions?
Yes. Your MySQL user must have appropriate permissions to list databases, list tables, describe schemas, and execute read-only queries on the target databases.
Can I modify data through this server?
No. The server enforces strict read-only access; any attempt to execute INSERT, UPDATE, DELETE, or other modification statements will be rejected.
Basic information
More Databases MCP servers
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.

PostgreSQL
modelcontextprotocolModel Context Protocol Servers

Redis
modelcontextprotocolModel Context Protocol Servers
Comments