Provides read-only access to MySQL databases, allowing inspection of database schemas and execution of read-only SQL queries against the connected database.
MCP Server for MySQL based on NodeJS

A Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Components
Tools
mysql_query
Execute read-only SQL queries against the connected database
Input:
sql(string): The SQL query to executeAll queries are executed within a READ ONLY transaction
Resources
The server provides schema information for each table in the database:
Table Schemas
JSON schema information for each table
Includes column names and data types
Automatically discovered from database metadata
Related MCP server: MCP Server for MySQL
Usage with Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:
Replace /db_name with your database name or leave it blank to retrieve all databases.
Troubleshooting
If you encounter an error "Could not connect to MCP server mcp-server-mysql", you may need to explicitly set the path of all required binaries such as the configuration below:
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.