@davewind/mysql-mcp-server
@MCP-Mirror
关于 @davewind/mysql-mcp-server
Mirror of
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mysql": {
"command": "npx",
"args": [
"-y",
"@davewind/mysql-mcp-server",
"mysql://user:password@localhost:port/database"
]
}
}
}工具
1Execute read-only SQL queries against the connected database
概览
What is @davewind/mysql-mcp-server?
It is a Model Context Protocol server that enforces read-only access to MySQL databases, allowing LLMs to inspect database schemas and execute read-only SQL queries. It acts as an intermediary between LLMs and MySQL databases, processing requests according to the MCP specification.
How to use @davewind/mysql-mcp-server?
Install the package globally via npm install @davewind/mysql-mcp-server -g. Then configure your MCP settings file with the command npx -y @davewind/mysql-mcp-server followed by the MySQL connection string (e.g., mysql://user:password@localhost:port/database). The server exposes a single tool query that accepts a sql parameter and executes SELECT statements within READ ONLY transactions.
Key features of @davewind/mysql-mcp-server
- Read-only access enforced through SQL validation and READ ONLY transactions
- Automatic schema discovery of database table structures
- Secure SQL query execution for SELECT statements only
- Full compliance with the Model Context Protocol specification
- Minimal configuration required for setup
Use cases of @davewind/mysql-mcp-server
- Enable LLMs to explore database schemas without risk of modification
- Execute safe read-only queries for data analysis or reporting
- Integrate database knowledge into AI assistants without write access
- Automate schema inspection for documentation or migration planning
FAQ from @davewind/mysql-mcp-server
Does the server support write operations?
No. It strictly enforces read-only access by validating SQL queries (only SELECT allowed) and running all queries in READ ONLY transactions. INSERT, UPDATE, DELETE, CREATE, ALTER, DROP operations are not supported.
What runtime environment is required?
Node.js v18 or higher is required to run the server.
How does the server communicate with LLMs?
It uses JSON-RPC over stdio, following the Model Context Protocol specification, and is compatible with any LLM system that supports the MCP standard.
What is the security model implemented?
The server validates SQL queries to block any non-SELECT statements, executes all queries in READ ONLY transactions, and prevents data modification or schema alteration (e.g., CREATE, ALTER, DROP).
How do I configure the connection to my MySQL database?
In your MCP settings file, set the command to npx -y @davewind/mysql-mcp-server and provide the MySQL connection string as a command argument in the format mysql://user:password@localhost:port/database.
数据库 分类下的更多 MCP 服务器
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
MCP Server for MySQL based on NodeJS
benborlaA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
MCP Server for Milvus
zilliztechModel Context Protocol Servers for Milvus
评论