mysql_mcp_servers
0
The MySQL MCP Server project provides a server to communicate with MySQL databases using the Model Context Protocol, specifically designed for use in WSL environments. It allows users to perform various SQL operations such as retrieving table lists and executing queries, with support for both direct and Docker-based execution.
Overview
This project provides a server to interact with MySQL databases using the Model Context Protocol (MCP). It offers an interface for accessing MySQL databases within a WSL environment.
Features
- Retrieve a list of tables in a MySQL database
- Read data from a table (up to 100 rows)
- Execute SQL queries such as SELECT, SHOW TABLES, INSERT, UPDATE, DELETE
Installation and Execution
Prerequisites
- Python 3.11+
- MySQL server (local or remote)
- Virtual environment (virtualenv)
- Docker (if using Docker)
Setup Instructions
- Clone the repository.
- Create and activate a virtual environment.
- Install dependencies.
- Run setup script to configure execution rights.
Execution Options
- Direct execution
- Module execution
- Docker container execution
Environment Variables
- MYSQL_HOST
- MYSQL_PORT
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_DATABASE
MCP Protocol Endpoints
- list_resources
- read_resource
- list_tools
- call_tool
Development
Nox Sessions
- Testing, formatting, and linting sessions available.
Direct Testing Execution
- Use Pytest for testing and checking code coverage.
License
Released under the MIT License.