Feedback

MySQL MCP服务器

@lichuanrong7 Claim

Basic information

Runtime
node
Category
License
Not specified
Transports
stdio
Author
lichuanrong7
Submitted by
Community
Quality
20
Stars
17

About MySQL MCP服务器 Server

在 cursor 工具中通过 mysql mcp 服务读取本地 mysql 库,方便通过 AI 来编程开发

MySQL MCP服务器 is a MCP server in the Databases category listed in the AddMCP.net directory, published by lichuanrong7. Supported transport: stdio. Runtime: node. The repository has 17 GitHub stars. Source code is hosted on github.com. Related topics: api, cursor, database, mcp, mysql.

Setup

{
    "mcpServers": {
        "mysql-mcp-server-lichuanrong7": {
            "command": "docker",
            "args": [
                "build",
                "-t",
                "mysql-mcp-server",
                "."
            ]
        }
    }
}

MySQL MCP服务器 config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mysql-mcp-server-lichuanrong7": {
            "command": "docker",
            "args": [
                "build",
                "-t",
                "mysql-mcp-server",
                "."
            ]
        }
    }
}

MySQL MCP服务器 tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MySQL MCP服务器?

MySQL MCP服务器是一个基于Node.js的API服务,为Cursor AI提供直接访问MySQL数据库的能力。它遵循MCP(Model Control Platform)协议规范,使AI能够通过标准化接口执行SQL查询、获取表结构信息以及执行数据操作。

How to use MySQL MCP服务器?

安装依赖并配置环境变量后,启动服务,然后在Cursor编辑器的MCP扩展管理界面添加服务URL http://localhost:3100/manifest.json 并激活。激活后可在Cursor中使用自然语言操作数据库。

Key features of MySQL MCP服务器

  • 支持SELECT、INSERT、UPDATE、DELETE等SQL语句执行
  • 获取数据库表的详细结构信息
  • 为AI提供实时数据库访问能力
  • 通过环境变量配置数据库连接参数
  • 内置CORS支持,便于前端应用集成
  • 完整实现MCP协议,方便与Cursor AI集成

Use cases of MySQL MCP服务器

  • 在Cursor中通过自然语言查询数据库记录
  • 获取指定表的字段、类型等结构信息
  • 执行数据插入、更新、删除等操作
  • 统计数据库中的订单状态分布等聚合数据

Frequently asked questions

1 如何启动与停止服务?

使用 ./start.sh 启动服务,使用 ./stop.sh 停止服务;或通过 npm run dev(开发模式)和 npm start(生产模式)启动。

2 数据库连接失败怎么办?

验证.env中的数据库连接信息是否正确,确认数据库服务是否运行,并检查网络连接和防火墙设置。

3 服务无法启动怎么办?

检查端口是否被占用(如 lsof -i :3100),确认Node.js版本是否兼容(要求14.x或更高),并查看日志文件 ./logs/mysql-mcp-*.log。

4 如何验证服务是否正常运行?

执行 curl http://localhost:3100/manifest.json 检查服务是否返回JSON清单。

5 是否支持Docker部署?

是。可通过 docker build -t mysql-mcp-server . 构建镜像,并使用 docker-compose up -d 启动。

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬