Feedback

MySQL MCP 服务器生成器(支持 stdio + SSE)

@lanjunfei Claim

Basic information

Runtime
python
Category
License
Not specified
Transports
stdio
Author
lanjunfei
Submitted by
Community
Quality
40
Stars
1

About MySQL MCP 服务器生成器(支持 stdio + SSE) Server

批量生成基于mysql数据库的mcpserver,支持stdio传输。Generate MCP servers in batch based on MySQL database, supporting stdio transmission.

MySQL MCP 服务器生成器(支持 stdio + SSE) is a MCP server in the Databases category listed in the AddMCP.net directory, published by lanjunfei. Supported transport: stdio. Runtime: python. The repository has 1 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "mysql_mcpserver_stdio_sse": {
            "command": "python",
            "args": [
                "-m",
                "venv",
                ".venv"
            ]
        }
    }
}

MySQL MCP 服务器生成器(支持 stdio + SSE) config

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

{
    "mcpServers": {
        "mysql_mcpserver_stdio_sse": {
            "command": "python",
            "args": [
                "-m",
                "venv",
                ".venv"
            ]
        }
    }
}

MySQL MCP 服务器生成器(支持 stdio + SSE) 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 服务器生成器(支持 stdio + SSE)?

一个基于 Flask 的 Web 工具,用于批量生成连接 MySQL 数据库的 MCP(Model Context Protocol)服务器脚本。生成的脚本同时支持 stdio(本地子进程/管道)和 SSE/HTTP(远程端点 /sse)两种传输方式,适合需要快速创建多个数据库 MCP 工具的用户。

How to use MySQL MCP 服务器生成器(支持 stdio + SSE)?

安装 Python 虚拟环境和依赖 (pip install -r requirements.txt),启动 python app.py 后在浏览器访问 http://127.0.0.1:5000,输入 MySQL 连接信息并指定输出文件名,点击生成。生成的脚本可直接运行(默认 stdio 模式,加 --http 参数启用 SSE 模式),也可通过 MCP Inspector 测试。

Key features of MySQL MCP 服务器生成器(支持 stdio + SSE)

  • 批量生成 MySQL 数据库的 MCP 服务器脚本
  • 同时支持 stdio 和 SSE(HTTP)两种传输方式
  • 通过 Flask Web 界面配置连接并生成脚本
  • 可添加自定义工具函数,支持参数化 SQL 和格式化输出
  • 生成脚本内置 check_database 连通性测试工具
  • 支持通过环境变量 MCP_PORT 自定义 SSE 服务端口

Use cases of MySQL MCP 服务器生成器(支持 stdio + SSE)

  • 快速为多个 MySQL 数据库创建独立的 MCP 服务器
  • 在本地开发环境中通过 stdio 调用数据库查询工具
  • 通过 SSE 远程暴露 MySQL 查询接口供 MCP 客户端(如 Inspector)调用
  • 为已有 SQL 语句封装成可复用的 MCP 工具函数

Frequently asked questions

1 安装需要哪些依赖?

需要 Python 虚拟环境,并执行 pip install -r requirements.txt 安装 Flask 及 MCP 相关依赖。

2 生成的服务器脚本支持哪些传输方式?

同时支持 stdio(默认)和 SSE(HTTP,通过 --http 参数启用),SSE 端点位于 http://127.0.0.1:8000/sse。

3 如何自定义 SSE 服务的端口?

启动前设置环境变量 MCP_PORT,例如 export MCP_PORT=9110(Linux/macOS)或 set MCP_PORT=9110(Windows),然后运行 python my_server.py --http。

4 能否在生成后添加或修改工具?

生成器的 “新增工具函数” 页面允许为每条 SQL 查询定义工具函数名、说明、SQL 语句(使用 %s 占位符)和输出格式,保存后脚本会自动插入相应工具。

5 如何用 MCP Inspector 测试生成的服务器?

运行 npx @modelcontextprotocol/inspector,Transport 选择 SSE,URL 填写 http://127.0.0.1:8000/sse,连接成功后即可看到并调用所有工具。

Comments

No comments yet

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

Sign In

Feedback 💬