Cover image
Try Now
2025-04-14

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

MySQL MCP 服务器

此MCP服务器提供对MySQL数据库的只读访问。

功能

  • 列出可用数据库
  • 列出数据库中的表
  • 描述表结构(包含字段备注)
  • 执行只读SQL查询

安装

1. 从NPM安装

# 全局安装
npm install -g @valuprosys/mysql-mcp-server

# 或在项目中本地安装
npm install @valuprosys/mysql-mcp-server

2. 配置环境变量

服务器需要以下环境变量:

  • MYSQL_HOST: 数据库服务器地址
  • MYSQL_PORT: 数据库端口 (默认: 3306)
  • MYSQL_USER: 数据库用户名
  • MYSQL_PASSWORD: 数据库密码
  • MYSQL_DATABASE: 默认数据库名 (可选)

3. 添加到MCP配置

在MCP配置文件中添加以下配置:

{
  "mcpServers": {
    "mysql": {
      "command": "npx",
      "args": ["@valuprosys/mysql-mcp-server"],
      "env": {
        "MYSQL_HOST": "your-mysql-host",
        "MYSQL_PORT": "3306",
        "MYSQL_USER": "your-mysql-user",
        "MYSQL_PASSWORD": "your-mysql-password",
        "MYSQL_DATABASE": "your-default-database"
      },
      "disabled": false,
      "autoApprove": [
        "list_databases",
        "list_tables",
        "describe_table",
        "execute_query"
      ]
    }
  }
}

可用工具

list_databases

列出MySQL服务器上所有可访问的数据库。

参数: 无

list_tables

列出指定数据库中的所有表。

参数:

  • database (可选): 数据库名称 (未指定时使用默认数据库)

describe_table

显示指定表的详细结构。

参数:

  • database (可选): 数据库名称 (未指定时使用默认数据库)
  • table (必填): 表名称

execute_query

执行只读SQL查询。

参数:

  • query (必填): SQL查询语句 (仅允许SELECT、SHOW、DESCRIBE和EXPLAIN语句)
  • database (可选): 数据库名称 (未指定时使用默认数据库)

相关推荐

  • av
  • Führen Sie mühelos LLM -Backends, APIs, Frontends und Dienste mit einem Befehl aus.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.

  • 1Panel-dev
  • 🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.

  • rulego
  • ⛓️Rugele ist ein leichter, leistungsstarker, leistungsstarker, eingebetteter Komponenten-Orchestrierungsregel-Motor-Rahmen für GO.

  • Azure
  • Dieses Repository dient zur Entwicklung des Azure MCP -Servers, wodurch Ihre Agenten die Leistung von Azure verleiht.

  • Onelevenvy
  • Flock ist eine Workflow-basierte Low-Code-Plattform, um schnell Chatbots, Lappen und Koordinierung von Multi-Agent-Teams zu erstellen, die von Langgraph, Langchain, Fastapi und NextJs angetrieben werden.

  • caio-moliveira
  • Dieses Projekt wurde erstellt, um zu demonstrieren, wie wir uns mit verschiedenen Modellkontextprotokollen (MCPs) verbinden können.

  • MarcusAdriano
  • Estudando mcp usando eine api do bacen ptax

    Reviews

    3.2 (13)
    Avatar
    user_KlmbYwwq
    2025-04-24

    mysql-mcp-server-modification by shensiqi0701 is a game changer! As a loyal MCP application user, I must say this tool significantly enhances the server management experience. It's seamless, efficient, and incredibly reliable. Highly recommend for anyone looking to optimize their MySQL server performance.

    Avatar
    user_3G5c6Pev
    2025-04-24

    As a dedicated user of MCP applications, I highly recommend the mysql-mcp-server-modification created by shensiqi0701. This modification offers seamless integration and enhanced performance for managing MySQL servers. It boosts efficiency and ensures stability, making server administration a breeze. The developer’s attention to detail is evident, and the welcome information gets you started promptly. A must-have for anyone looking to optimize their MySQL server management!

    Avatar
    user_5WAZT1SD
    2025-04-24

    As a devoted user of mcp applications, the mysql-mcp-server-modification by shensiqi0701 has profoundly impressed me. This product efficiently streamlines server modifications, improving performance and reliability. Its seamless integration and user-friendly interface make complex server tasks simple and accessible. Highly recommended for simplifying and enhancing your MySQL server management!

    Avatar
    user_YnGoNHsW
    2025-04-24

    MySQL-MCP-Server-Modification by shensiqi0701 is an outstanding tool for optimizing server performance. As a dedicated user, I've found its seamless integration and effectiveness in managing MySQL configurations to be immensely valuable. Highly recommend for anyone looking to enhance their database operations!

    Avatar
    user_QVfAABNO
    2025-04-24

    As an avid user of the mysql-mcp-server-modification by shensiqi0701, I am truly impressed with its performance and ease of use. This modification has significantly streamlined my server management tasks and enhanced overall efficiency. It's a must-have tool for anyone handling MySQL databases. Highly recommended!

    Avatar
    user_c3ZiI4oE
    2025-04-24

    I've been using mysql-mcp-server-modification by shensiqi0701 for a few weeks now, and it has significantly enhanced my database management experience. The modifications are intuitive and effective, making MySQL even more powerful and user-friendly. Highly recommend this for any MySQL user looking to optimize their server.

    Avatar
    user_6DGRLulh
    2025-04-24

    I have been using mysql-mcp-server-modification by shensiqi0701 and it has significantly improved my database management tasks. The product's seamless integration and efficient performance make it indispensable for any MySQL user. Highly recommended!

    Avatar
    user_vqG0kEwb
    2025-04-24

    As a devoted user of the mysql-mcp-server-modification by shensiqi0701, I find this tool indispensable for managing my MySQL servers. It provides seamless modifications and boosts server efficiency significantly. This product is highly intuitive and caters to both novices and experts in database management. It's an absolute must-have for anyone looking to enhance their MySQL server performance.

    Avatar
    user_KQ7o4uZm
    2025-04-24

    As a dedicated user of mysql-mcp-server-modification by shensiqi0701, I am thoroughly impressed with its performance and functionality. This tool significantly simplifies the process of modifying MySQL server configurations, making it an essential asset for database administrators. Its user-friendly interface and reliable execution have greatly enhanced my productivity. Highly recommended!

    Avatar
    user_GzQ0OG3X
    2025-04-24

    I've been using the mysql-mcp-server-modification by shensiqi0701 and it's a game changer! The modifications enhanced the performance and reliability of my MySQL server significantly. Highly recommend for anyone looking to optimize their database operations. The setup was seamless and the documentation is clear. Kudos to the author for this excellent tool!

    Avatar
    user_q7TnfVFZ
    2025-04-24

    As a dedicated user of mcp applications, I highly recommend the mysql-mcp-server-modification by shensiqi0701. This tool has significantly improved my database management experience. Its efficiency and ease of use are commendable. Perfect for both beginners and experienced users, it's a must-have for anyone working with MySQL servers.

    Avatar
    user_W1NLYEKJ
    2025-04-24

    As a dedicated user of mysql-mcp-server-modification by shensiqi0701, I must say that this product significantly enhances server functionality. The modifications are seamless and performance has noticeably improved. Integration was straightforward, and documentation is exceptionally clear. Highly recommend for anyone seeking to boost their MySQL server capabilities.

    Avatar
    user_1ITNG0W9
    2025-04-24

    I've been using the mysql-mcp-server-modification by shensiqi0701 and I'm genuinely impressed. This modification significantly enhances the functionality and performance of the MySQL server. It's well-documented and user-friendly, making the integration process seamless. If you're looking for a reliable and efficient way to improve your MySQL server performance, this product is definitely worth trying.