MySQL MCP Server
@MCP-Mirror
About MySQL MCP Server
Mirror of
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"SuMiaoALi_mysql-mcp-server": {
"command": "npx",
"args": [
"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 server that provides secure MySQL database operations for AI assistants and other MCP clients. It exposes database queries and schema introspection as MCP tools and resources.
How to use MySQL MCP Server?
Install via npm install mysql-mcp-server and configure with environment variables (MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB, MYSQL_TIMEZONE). Add it to your Claude Desktop config or run directly with npx mysql-mcp-server.
Features of MySQL MCP Server
- Execute safe SQL queries (SELECT, INSERT, SHOW, DESCRIBE)
- Get detailed table structure information
- Insert data with automatic parameterization
- List all tables in the database
- Automatic LIMIT clauses on SELECT queries
- Connection pooling for efficient database management
Use cases of MySQL MCP Server
- AI assistants answering questions from a MySQL database
- Automated database schema inspection and documentation
- Safe, read-mostly database access for chat-based tools
- Inserting records via natural language instructions
- Exploring and understanding table structures interactively
FAQ from MySQL MCP Server
What operations are allowed?
Only SELECT, INSERT, SHOW, and DESCRIBE operations are permitted. Destructive operations like UPDATE and DELETE are explicitly forbidden.
How do I configure the server?
Set environment variables for MySQL connection: MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB, and MYSQL_TIMEZONE. All have defaults except password and database.
Does the server protect against SQL injection?
Yes. All user inputs are handled with parameterized queries, and SELECT queries automatically get LIMIT clauses to prevent large data dumps.
What are the runtime dependencies?
Node.js 18 or later, TypeScript, and access to a MySQL database. The server uses connection pooling to manage database connections.
How do I test or debug the server?
Run npm run inspector to start the MCP Inspector, which provides a browser URL for testing tools and resources interactively.
Frequently asked questions
What operations are allowed?
Only SELECT, INSERT, SHOW, and DESCRIBE operations are permitted. Destructive operations like UPDATE and DELETE are explicitly forbidden.
How do I configure the server?
Set environment variables for MySQL connection: `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_DB`, and `MYSQL_TIMEZONE`. All have defaults except password and database.
Does the server protect against SQL injection?
Yes. All user inputs are handled with parameterized queries, and SELECT queries automatically get LIMIT clauses to prevent large data dumps.
What are the runtime dependencies?
Node.js 18 or later, TypeScript, and access to a MySQL database. The server uses connection pooling to manage database connections.
How do I test or debug the server?
Run `npm run inspector` to start the MCP Inspector, which provides a browser URL for testing tools and resources interactively.
Basic information
More Databases MCP servers
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展

Lawstronaut
Lawstronaut-FZCOAccess millions of official legal and regulatory source documents from 155+ jurisdictions via MCP. Lawstronaut supports AI agents with structured legal research, legal data, laws, regulations, cases, guidance, official s
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.
Comments