MCP.so
登录

mysql-mcp-server

@Mineru98

关于 mysql-mcp-server

A server application designed on top of MCP to interact with Cursor and MySQL.

基本信息

分类

数据库

许可证

MIT

运行时

python

传输方式

stdio

发布者

Mineru98

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mysql-mcp-server-mineru98": {
      "command": "python",
      "args": [
        "mysql_mcp_server/main.py",
        "run"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is mysql-mcp-server?

mysql-mcp-server is a server application for MySQL database operations built on the Model Context Protocol (MCP). It provides tools that allow AI models to interact with a MySQL database.

How to use mysql-mcp-server?

Deploy via Docker, Docker Compose, or run directly with Python. Set environment variables for MySQL connection (host, port, user, password, database). For Cursor IDE, version 0.46+ and a Pro account are required. Use python mysql_mcp_server/main.py run for local execution.

Key features of mysql-mcp-server

  • Docker and Docker Compose deployment
  • Python-based MCP server using FastMCP
  • Tools for CREATE, SELECT, INSERT, DESC, EXPLAIN, SHOW TABLES
  • Database connection management via singleton pattern
  • Environment variable configuration for credentials
  • Visualization chart recommendation tool

Use cases of mysql-mcp-server

  • AI models querying MySQL databases via natural language
  • Automated database schema exploration and reporting
  • Generating data analysis reports with chart recommendations
  • Executing safe SQL operations through tool-based access
  • Integrating MySQL into MCP-enabled workflows

FAQ from mysql-mcp-server

What database tools does mysql-mcp-server provide?

It offers tools for creating tables, viewing schemas, executing SELECT and INSERT queries, retrieving table lists, explaining query plans, and generating insight reports.

What are the runtime requirements for mysql-mcp-server?

Python with dependencies (mcp, PyMySQL, pandas, python-dotenv, fire) and MySQL 8.0. Docker and Docker Compose are optional for containerized deployment.

How do I add a new tool to mysql-mcp-server?

Create an executor file in mysql_mcp_server/executors, then import it in __init__.py and add it to the __all__ array. The @tool decorator registers it with MCP.

Are there any security considerations for mysql-mcp-server?

Database credentials are managed via environment variables. Use strong passwords in production and consider implementing SSL/TLS encryption for database connections.

Does mysql-mcp-server support Cursor IDE?

Yes, it works with Cursor version 0.46 and above, but only for Cursor Pro account users. Configuration requires adding the server in Cursor settings.

评论

数据库 分类下的更多 MCP 服务器