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
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • Onelevenvy
  • Flock是一个基于工作流程的低音平台,可快速构建聊天机器人,抹布和协调多代理团队,由Langgraph,Langchain,Langchain,Fastapi和Nextjs提供支持。(羊群工作流工作流的低代码平台,rag rag rag 用于快速构建聊天机器人、 rag temant Agent fastem temantfaster和muti-agent agagent应用

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • dmayboroda
  • 带有可配置容器的本地对话抹布

    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.