mcp_mysql_server
@MCP-Mirror
关于 mcp_mysql_server
Mirror of
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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.
数据库 分类下的更多 MCP 服务器
MotherDuck's DuckDB MCP Server
motherduckdbLocal MCP server for DuckDB and MotherDuck
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
Elasticsearch MCP Server
elasticPostgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
评论