MCP server for secure MySQL interaction with AI apps
Top 47.8% on sourcepulse
This project provides a Model Context Protocol (MCP) server for secure MySQL database interaction, aimed at AI applications and developers needing structured, safe access to relational data. It acts as a controlled intermediary, enabling AI models to explore tables, read data, and execute SQL queries without direct, potentially risky database exposure.
How It Works
The server implements the MCP, a protocol designed for AI-database communication. It exposes MySQL tables as discoverable resources and allows SQL query execution through a defined interface. This approach abstracts direct database access, enforcing security and structured interaction via environment variables for credentials and a controlled query execution mechanism.
Quick Start & Requirements
pip install mysql-mcp-server
MYSQL_HOST
, MYSQL_USER
, MYSQL_PASSWORD
, MYSQL_DATABASE
.pip install -r requirements.txt
is needed.Highlighted Details
Maintenance & Community
The repository is hosted on GitHub. Contribution guidelines are provided, encouraging forks and pull requests. No specific community channels (like Discord/Slack) or notable contributors are mentioned in the README.
Licensing & Compatibility
Released under the MIT License, permitting commercial use and integration with closed-source applications.
Limitations & Caveats
The server is explicitly not designed for standalone use and requires integration with an MCP-compatible client like Claude Desktop or VS Code. Direct command-line execution with Python is not supported. The README mentions the need to install uv
for VS Code integration.
1 month ago
1 day