MySQL Readonly MCP Server
@the-nine-nation
About MySQL Readonly MCP Server
An MCP server that allows the model to safely obtain information from the MySQL database.
Basic information
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MySQL Readonly MCP Server?
这是一个基于 MCP(Model Context Protocol)的 MySQL 只读查询服务器,允许通过安全的只读查询接口访问 MySQL 数据库。适用于需要安全只读数据库访问的 AI 助手场景。
How to use MySQL Readonly MCP Server?
安装 Python 3.10+ 和 MySQL 5.7+,克隆仓库并执行 pip install -e .。在客户端的 config.json 中配置 command 为 Python 可执行文件,args 为 main.py 的绝对路径,并通过 env 设置 MYSQL_HOST、MYSQL_PORT、MYSQL_DATABASE、MYSQL_USERNAME、MYSQL_PASSWORD 等环境变量。
Key features of MySQL Readonly MCP Server
- 支持 MySQL 数据库的只读查询操作
- 使用连接池管理数据库连接
- 自动限制查询结果数量
- 支持参数化查询防止 SQL 注入
- 内置安全检查防止非只读操作
- 提供格式化的查询结果输出
Use cases of MySQL Readonly MCP Server
- AI 助手安全查询 MySQL 数据库
- 只读数据分析和报告生成
- 集成到 MCP 生态系统中提供数据库知识
FAQ from MySQL Readonly MCP Server
如何配置环境变量?
在 JSON 的 env 字段中设置 MYSQL_HOST、MYSQL_PORT、MYSQL_DATABASE、MYSQL_USERNAME、MYSQL_PASSWORD 等,MYSQL_ENABLED 默认可以不用填。
资源描述文件是必须的吗?
是必需的,用于定义可用的查询接口,提升模型对数据库结构的理解能力。
查询结果数量有限制吗?
默认限制为 20 行,可通过环境变量调整。
如何确保安全性?
服务只允许只读操作,防止多语句执行,并使用参数化查询防止 SQL 注入。建议数据库用户只有只读权限。
More Databases MCP servers
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
Postgres Mcp
crystaldbaPostgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
Redis MCP Server
redisThe official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
MCP Server for Milvus
zilliztechModel Context Protocol Servers for Milvus
Comments