MySQL query server based on the MCP sse.Multi-level SQL risk control & injection protection Docker support for quick deployment
{
"mcpServers": {
"mysql-mcp-server-sse": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MySQL query server based on the MCP sse.Multi-level SQL risk control & injection protection Docker support for quick deployment
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
MIT. View license →
Is it maintained?
Last commit 294 days ago. 101 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Manage Supabase projects — databases, auth, storage, and edge functions
Query and manage PostgreSQL databases directly from AI assistants
An official Qdrant Model Context Protocol (MCP) server implementation
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
MCP Security Weekly
Get CVE alerts and security updates for Mysql Mcp Server Sse and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
本项目是基于MCP框架的MySQL查询服务器,支持通过SSE协议进行实时数据库操作,具备完善的安全、日志、配置和敏感信息保护机制,适用于开发、测试和生产环境下的安全MySQL数据访问。
This project is a MySQL query server based on the MCP framework, supporting real-time database operations via SSE protocol. It features comprehensive security, logging, configuration, and sensitive information protection mechanisms, suitable for secure MySQL data access in development, testing, and production environments.
基于FastMCP框架,异步高性能
支持高并发的数据库连接池,参数灵活可调
支持SSE实时推送
丰富的MySQL元数据与结构查询API
自动事务管理与回滚
多级SQL风险控制与注入防护
数据库隔离安全:防止跨数据库访问,支持三级访问控制
敏感信息自动隐藏与自定义
灵活的环境变量配置
完善的日志与错误处理
Docker支持,快速部署
Built on FastMCP framework, high-performance async
Connection pool for high concurrency, with flexible parameter tuning
SSE real-time push support
Rich MySQL metadata & schema query APIs
Automatic transaction management & rollback
Multi-level SQL risk control & injection protection
Database Isolation Security: Prevents cross-database access with 3-level access control
Automatic and customizable sensitive info masking
Flexible environment variable configuration
Robust logging & error handling
Docker support for quick deployment
# 拉取镜像
docker pull mangooer/mysql-mcp-server-sse:latest
# 运行容器
docker run -d \
--name mysql-mcp-server-sse \
-e HOST=0.0.0.0 \
-e PORT=3000 \
-e MYSQL_HOST=your_mysql_host \
-e MYSQL_PORT=3306 \
-e MYSQL_USER=your_mysql_user \
-e MYSQL_PASSWORD=your_mysql_password \
-e MYSQL_DATABASE=your_database \
-p 3000:3000 \
mangooer/mysql-mcp-server-sse:latest
Windows PowerShell 格式:
docker run -d `
--name mysql-mcp-server-sse `
-e HOST=0.0.0.0 `
-e PORT=3000 `
-e MYSQL_HOST=your_mysql_host `
-e MYSQL_PORT=3306 `
-e MYSQL_USER=your_mysql_user `
-e MYSQL_PASSWORD=your_mysql_password `
-e MYSQL_DATABASE=your_database `
-p 3000:3000 `
mangooer/mysql-mcp-server-sse:latest
pip install -r requirements.txt
复制.env.example为.env,并根据实际情况修改。
Copy .env.example to .env and modify as needed.
python -m src.server
默认监听:http://127.0.0.1:3000/sse Default endpoint: http://127.0.0.1:3000/sse
.
├── src/
│ ├── server.py # 主服务器入口 / Main server entry
│ ├── config.py # 配置项定义 / Config definitions
│ ├── validators.py # 参数校验 / Parameter validation
│ ├── db/
│ │ └── mysql_operations.py # 数据库操作 / DB operations
│ ├── security/
│ │ ├── interceptor.py # SQL拦截 / SQL interception
│ │ ├── query_limiter.py # 风险控制 / Risk control
│ │ └── sql_analyzer.py # SQL分析 / SQL analysis
│ └── tools/
│ ├── mysql_tool.py # 基础查询 / Basic query
│ ├── mysql_metadata_tool.py # 元数据查询 / Metadata query
│ ├── mysql_info_tool.py # 信息查询 / Info query
│ ├── mysql_schema_tool.py # 结构查询 / Schema query
│ └── metadata_base_tool.py # 工具基类 / Tool base class
├── tests/ # 测试 / Tests
├── .env.example # 环境变量示例 / Env example
└── requirements.txt # 依赖 / Requirements
| 变量名 / Variable | 说明 / Description | 默认值 / Default | |--------------------------|------------------------------------------------------|------------------| | HOST | 服务器监听地址 / Server listen address | 127.0.0.1 | | PORT | 服务器监听端口 / Server listen port | 3000 | | MYSQL_HOST | MySQL服务器地址 / MySQL server host | localhost | | MYSQL_PORT | MySQL服务器端口 / MySQL server