A read-only MySQL MCP server for AI agents (Claude, etc.) that provides safe, restricted access to MySQL databases. Version 0.1.2, stable. Supports DDL (schema inspection) but only SELECT queries — INSERT/UPDATE/DELETE are blocked. Released as an npm package, designed for integration with MCP-compatible AI tools. Key differentiator: strict read-only enforcement at the server level, not just SQL parsing.
npm install mysql-mcp-readonlyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate and start the read-only MySQL MCP server using environment variables for configuration.
Use a separate write-enabled server if write access is needed.
Consider the implications: though read-only for data, schema changes are permitted. Restrict network access accordingly.
Pin exact version in production and monitor updates.
Use a dedicated MySQL user with limited privileges for this server.
Run: npm install @modelcontextprotocol/sdk
Ensure MySQL is running and MYSQL_HOST/MYSQL_PORT environment variables are correct.
Check MYSQL_USER and MYSQL_PASSWORD environment variables.