mysql_mcp_server  by designcomputer

MCP server for secure MySQL interaction with AI apps

created 8 months ago
740 stars

Top 47.8% on sourcepulse

GitHubView on GitHub
Project Summary

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

  • Install via pip: pip install mysql-mcp-server
  • Configuration requires setting environment variables: MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE.
  • Integration examples are provided for Claude Desktop and VS Code.
  • For debugging, pip install -r requirements.txt is needed.
  • Official documentation and integration guides are available within the README.

Highlighted Details

  • Enables AI applications to list MySQL tables as resources.
  • Supports reading table contents and executing SQL queries with error handling.
  • Facilitates secure database access via environment variables.
  • Includes comprehensive logging for audit purposes.

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.

Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
4
Issues (30d)
5
Star History
315 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.