Overview
What is MCP Server for MySQL based on NodeJS?
A Model Context Protocol server that provides read-only access to MySQL databases. It enables LLMs to inspect database schemas and execute read-only SQL queries. This server is designed for developers using MCP clients like Claude Desktop.
How to use MCP Server for MySQL based on NodeJS?
Add the provided configuration to the mcpServers section of your claude_desktop_config.json. Set environment variables MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, and MYSQL_DB. If npx is not in your default PATH, specify the full binary path and include PATH in the environment.
Key features of MCP Server for MySQL based on NodeJS
- Read-only SQL query execution via the
mysql_querytool - All queries run within a READ ONLY transaction
- Automatic discovery of table schemas from database metadata
- JSON schema output including column names and data types
- Simple configuration for Claude Desktop integration
Use cases of MCP Server for MySQL based on NodeJS
- Allowing an LLM to explore a MySQL database schema before generating queries
- Enabling AI assistants to answer questions by querying a MySQL database
- Providing read-only data access for natural language to SQL workflows
- Automating database inspection and documentation
FAQ from MCP Server for MySQL based on NodeJS
Is this server read-only?
Yes. All queries are executed within a READ ONLY transaction. No write operations are supported.
What environment variables are required?
MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PASS, and MYSQL_DB must be set. MYSQL_DB can be left blank to retrieve all databases.
How do I troubleshoot connection errors?
If you see "Could not connect to MCP server", you may need to explicitly set the full path to the npx binary and include the PATH environment variable in the configuration.
What license does this server use?
This MCP server is licensed under the MIT License.