A Model Context Protocol (MCP) server for executing SELECT queries against MySQL databases. Version 1.1.1, released as an npm package. It is implemented in TypeScript and enforces a security-restricted scope (SELECT-only) to prevent data mutations. The server runs as a stdio-based MCP tool, configurable via environment variables. It is intended for AI agents (e.g., VS Code Copilot) to query databases safely. Differentiators: focuses exclusively on read-only queries, easy integration with MCP-compatible IDEs, and simple environment-based configuration without external configuration files.
npm install mysql-mcpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Run the MCP server with environment variables for database connection, allowing AI agents to execute SELECT queries.
Always pin the same version for both packages: use `mysql-mcp@1.0.2` and `mysql-client@1.0.2`.
Review your queries before execution; use the server only for read-only operations.
Ensure MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE are set.
Update to latest version by using `npx -y mysql-mcp@latest`.
Run `npm install` in the package directory or use `npx -y mysql-mcp` to auto-install.
Start your MySQL service and verify MYSQL_HOST and MYSQL_PORT env vars.
Check MYSQL_USER and MYSQL_PASSWORD environment variables.
Only use SELECT statements with this server.