A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases. This server allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.
pip install mysql-mcp-server
Set the following environment variables:
MYSQL_HOST=localhost # Database host
MYSQL_PORT=3306 # Optional: Database port (defaults to 3306 if not specified)
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_database
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"mysql": {
"command": "uv",
"args": [
"--directory",
"path/to/mysql_mcp_server",
"run",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}
## Install dependencies
pip install -r requirements.txt
## Run the server
python -m mysql_mcp_server
## Clone the repository
git clone https://github.com/yourusername/mysql_mcp_server.git
cd mysql_mcp_server
## Create virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
## Install development dependencies
pip install -r requirements-dev.txt
## Run tests
pytest
This MCP server requires database access to function. For security:
See MySQL Security Configuration Guide for detailed instructions on:
⚠️ IMPORTANT: Always follow the principle of least privilege when configuring database access.
MIT License - see LICENSE file for details.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Enhanced FileSystem MCP server
A Python-based MCP (Model Context Protocol) server that predicts the origin
This Model Context Protocol (MCP) server enables LLMs like Claude to perform internet research using the Perplexity API. It provides real-time, up-to-date information with source citations.