MySQL MCP Server
@SuMiaoALi
About MySQL MCP Server
A general Mysql-MCP-Server
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mysql-mcp-server-sumiaoali": {
"command": "npx",
"args": [
"mysql-mcp-server"
]
}
}
}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 MCP Server?
A Model Context Protocol (MCP) server that provides secure MySQL database operations for AI assistants and other MCP clients. It exposes tools and resources for querying, inserting, and inspecting MySQL databases, with built‑in security restrictions that prevent destructive operations.
How to use MySQL MCP Server?
Install via npm: npm install mysql-mcp-server. Configure using environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB, MYSQL_TIMEZONE). Integrate with MCP clients such as Claude Desktop by adding the server to the client’s configuration file, or run standalone with npx mysql-mcp-server using stdio transport.
Key features of MySQL MCP Server
- Tools: execute_query, get_table_info, insert_data, list_tables
- Resources: database metadata and per‑table schema information
- Only allows SELECT, INSERT, SHOW, and DESCRIBE operations
- SQL injection protection via parameterized queries
- Automatic LIMIT clauses on SELECT queries to prevent large data dumps
- Connection pooling for efficient resource management
Use cases of MySQL MCP Server
- List all tables in a database using the list_tables tool
- Examine table structure and schema with get_table_info
- Query data safely with execute_query (SELECT, SHOW, DESCRIBE)
- Insert new records conveniently with the insert_data tool
FAQ from MySQL MCP Server
What database operations are allowed?
Only SELECT, INSERT, SHOW, and DESCRIBE. UPDATE and DELETE are explicitly forbidden.
How does the server prevent SQL injection?
All user inputs use parameterized queries, which properly escape values.
Does the server limit the amount of data returned?
Yes. Automatic LIMIT clauses are added to SELECT queries to prevent large data dumps.
What environment variables are required?
MYSQL_HOST (default localhost), MYSQL_PORT (default 3306), MYSQL_USER (default root), MYSQL_PASSWORD (empty), MYSQL_DB (default mysql), and MYSQL_TIMEZONE (default +00:00).
How do I run the server with a different MCP client?
Run npx mysql-mcp-server – it uses stdio transport and can be connected to any MCP‑compatible client.
Frequently asked questions
What database operations are allowed?
Only SELECT, INSERT, SHOW, and DESCRIBE. UPDATE and DELETE are explicitly forbidden.
How does the server prevent SQL injection?
All user inputs use parameterized queries, which properly escape values.
Does the server limit the amount of data returned?
Yes. Automatic LIMIT clauses are added to SELECT queries to prevent large data dumps.
What environment variables are required?
`MYSQL_HOST` (default localhost), `MYSQL_PORT` (default 3306), `MYSQL_USER` (default root), `MYSQL_PASSWORD` (empty), `MYSQL_DB` (default mysql), and `MYSQL_TIMEZONE` (default +00:00).
How do I run the server with a different MCP client?
Run `npx mysql-mcp-server` – it uses stdio transport and can be connected to any MCP‑compatible client.
Basic information
More Databases MCP servers
MCP Server for MySQL based on NodeJS
benborlaA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

nuzur
nuzur is a model-first database platform for MySQL and PostgreSQL. The MCP server lets any AI assistant or agent (Claude, Cursor, Gemini, or anything else that speaks MCP) design your schema, query your data, generate mi
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Redis MCP Server
redisThe official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
Comments