MCP.so
Sign In

mcp_mysql_server

@MCP-Mirror

About mcp_mysql_server

Mirror of

Basic information

Category

Databases

License

MIT license

Runtime

python

Transports

stdio

Publisher

MCP-Mirror

Config

No standard config provided

This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.

Repository

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 mcp_mysql_server?

mcp_mysql_server is a MySQL database MCP server that supports CRUD operations, database anomaly analysis, and custom tool extensions. It is intended for developers who need to interact with MySQL databases through an MCP client with role‑based permissions and built-in diagnostics.

How to use mcp_mysql_server?

Install the package with pip install mysql_mcp_server_pro, create a .env file with MySQL connection details and the desired role (readonly, writer, or admin), then start the server via mysql_mcp_server_sse for SSE mode or using uvx/uv for STDIO mode. Configure your MCP client with the appropriate JSON settings.

Key features of mcp_mysql_server

  • Execute multiple SQL statements separated by ";"
  • Query table names and fields using table comments
  • Analyze SQL execution plans
  • Convert Chinese field names to pinyin initials
  • Detect row-level and table-level locks
  • Assess MySQL health status (connections, transactions, locks)
  • Permission control with three roles (readonly, writer, admin)
  • Supports both STDIO and SSE transport modes

Use cases of mcp_mysql_server

  • Perform database CRUD operations with configurable permissions
  • Diagnose slow SQL queries and deadlock issues
  • Monitor overall MySQL health and index usage
  • Automate table creation and data insertion via natural-language prompts
  • Extend with custom tools for additional database analysis

FAQ from mcp_mysql_server

What permission roles are available?

Three roles: readonly (SELECT, SHOW, DESCRIBE, EXPLAIN), writer (adds INSERT, UPDATE, DELETE), and admin (adds CREATE, ALTER, DROP, TRUNCATE). Role is set via the MYSQL_ROLE environment variable.

How do I install and configure mcp_mysql_server?

Install with pip install mysql_mcp_server_pro, then set the environment variables MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, and optionally MYSQL_ROLE in a .env file or in your shell.

What tools does mcp_mysql_server provide?

It provides eight tools: execute_sql, get_chinese_initials, get_db_health_running, get_table_desc, get_table_index, get_table_lock, get_table_name, and get_db_health_index_usage.

Can I add custom tools to mcp_mysql_server?

Yes. Create a new tool class in the handles package that inherits from BaseHandler, implement get_tool_description and run_tool, then import it in __init__.py.

What transport modes are supported?

Both STDIO and SSE modes are supported. Use mysql_mcp_server_sse for SSE or configure a uv command with --stdio for STDIO.

Comments

More Databases MCP servers