An MCP (Model Context Protocol) server providing read-only access to MySQL databases for AI assistants like Claude. Version 0.1.3, actively maintained. Enables LLMs to list databases, tables, describe schemas, and execute read-only SQL queries with security features including query validation, timeout, and row limits. Differentiates from direct database access by enforcing read-only operations and preventing modifications.
npm install mysql-mcp-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes and starts a MySQL MCP server with environment variable configuration for database connection.
Use MYSQL_HOST instead of DB_HOST, MYSQL_PORT instead of DB_PORT.
Ensure queries are SELECT, SHOW, DESCRIBE, or EXPLAIN. Use a separate write-capable server for modifications.
Adjust timeout and row limit via server options or env vars if needed. Check results for truncation.
Always specify a database name to avoid ambiguity, or set MYSQL_DATABASE in env.
Run 'npm install mysql-mcp-server' in your project directory.
Verify MySQL is started and MYSQL_HOST/MYSQL_PORT env vars are correct.
Check MYSQL_USER and MYSQL_PASSWORD, and ensure user has SELECT privileges on target databases.
Modify the query to be read-only, or use a different server that allows writes.