A Model Context Protocol (MCP) server providing secure, read-only access to a single MySQL database. Version 1.0.7 enables MCP clients (Claude Desktop, editor integrations) to inspect schema, preview data, and run analytical queries without mutation risk. Key differentiators: built-in query validation and row limits (prevents dangerous queries), schema inspection tools (list_tables, describe_table, show_relations), and multi-instance support for multiple databases. Configurable via environment variables with a 1-second minimum query timeout.
npm install mysql-readonly-mcpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures MCP client to run the MySQL read-only server securely using npx and environment variables for credentials.
Use npx -y mysql-readonly-mcp or globally installed binary in MCP configuration.
Add one MCP server entry per database under mcpServers.
Ensure timeout value >= 1000.
Use only SELECT, SHOW, DESCRIBE, EXPLAIN, or other read-only statements.
Set MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, and MYSQL_DATABASE in the MCP client configuration env block.
Verify MySQL credentials, host, port, and ensure MySQL is running and accessible.
Optimize the query or increase MYSQL_QUERY_TIMEOUT_MS (minimum 1000).
Use only read-only SQL queries (SELECT, SHOW, DESCRIBE, etc.).