mysql-mcp-server-sse

mysql-mcp-server-sse

33

This project is a MySQL query server using the MCP framework for secure data access with real-time operations and comprehensive protection mechanisms. It is suitable for development, testing, and production environments with features like high concurrency support and extensive MySQL metadata access.

Overview

This project is a MySQL query server built on the MCP framework, offering high-performance asynchronous capabilities. It supports real-time database operations via SSE protocol, provides a robust security mechanism, and is equipped with logging, configuration, and sensitive information protection. Key features include:

  • Based on FastMCP framework with high-performance async operations.
  • High concurrency connection pool with adjustable parameters.
  • SSE real-time push support.
  • Comprehensive MySQL metadata and schema query APIs.
  • Automatic transaction management with rollback.
  • Multi-level SQL risk control and injection protection.
  • Docker support for quick deployment.

Project Structure

  • src/: Contains server, configuration, and tool scripts for database operations, security, and utilities.
  • tests/: Contains test cases.

Environment Variables & Configuration

Key configurations include server host and port settings, MySQL connection details, connection pool settings, and security configurations.

Automation & Resource Management

Features automatic tool registration and a connection pool with auto-recycling for resource management.

Security Mechanisms

Provides multi-level SQL risk management and SQL injection protection.

Logging & Error Handling

Configurable log levels, detailed logging of operation status, and robust error handling.

Contribution Guide

Contributions through issues and pull requests are welcome.

License

Released under the MIT License, without any warranty.