The MySQL MCP Server enables secure interaction with MySQL databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface. This facilitates safer database
Here's a summary of the README content, maintaining the original structure and technical details:
The MySQL MCP Server facilitates secure interaction with MySQL databases, enabling AI assistants to list tables, read data, and execute SQL queries through a controlled Model Context Protocol (MCP) interface. Key features include listing available MySQL tables as resources, reading table contents, executing SQL queries with error handling, secure database access via environment variables, and comprehensive logging.
Installation can be done manually using pip install mysql-mcp-server
or automatically via Smithery. Configuration requires setting environment variables for database host, port, user, password, and database name. It can be used with Claude Desktop by adding a configuration block to claude_desktop_config.json
or as a standalone server.
Development involves cloning the repository, creating a virtual environment, installing dependencies, and running tests. Security considerations include avoiding committing credentials, using a database user with minimal permissions, and implementing query whitelisting. The project is licensed under the MIT License, and contributions are welcome via pull requests.
designcomputer/mysql_mcp_server
December 3, 2024
March 28, 2025
Python