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
コメント