cc-mysql-mcp
by howtobearealprogrammer
Overview
A Model Context Protocol (MCP) server enabling Claude Code to directly interact with local MySQL or MariaDB databases, primarily designed for Windows environments.
Installation
node src/dist/index.jsEnvironment Variables
- MYSQL_HOST
- MYSQL_PORT
- MYSQL_USER
- MYSQL_PASSWORD
Security Notes
The server directly executes arbitrary SQL queries provided via the `execute_query` tool without any internal sanitization or validation. This poses a significant SQL injection vulnerability if the input is not strictly controlled by a trusted source. The `mysql2` library's `connection.query` is called with a raw query string, allowing for any SQL statement (including destructive ones like `DROP TABLE` or `DELETE FROM`) to be executed. The README explicitly warns about 'No safety rails' and recommends using a restricted database user, which is crucial but does not mitigate the code's inherent vulnerability to malicious or erroneous AI-generated SQL. No hardcoded secrets were found; configuration uses environment variables.
Similar Servers
mcp-manager
A web GUI to easily manage and configure Model Context Protocol (MCP) servers for the Claude Desktop app on MacOS, generating terminal commands for installation and setup.
Delphi-MCP-Server
Implements the Model Context Protocol (MCP) in Delphi to enable AI-powered development workflows and integrate with clients like Claude Code.
mcp-mysql-server
Provides an MCP-compliant interface for AI models to securely interact with a MySQL database for CRUD operations, schema inspection, and performance analysis.
MCPServer
Provides a Model Context Protocol (MCP) server for Claude Code integration, offering custom tools including advanced Windows OutputDebugString capture and analysis.