Potencialize seu agente
Instalação do publicador. Não é um endpoint do PlugMCP.
Host a copy with our keys and logs.
Ainda não há uma versão empacotada no registro. Siga o README do repositório.
URL remota ou um comando na sua máquina? Como as duas instalações diferem
Rodar no PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirA production-ready Model Context Protocol (MCP) server for MySQL database operations. Provides secure HTTP endpoints for executing read-only queries, analyzing database performance, and monitoring MySQL server status.
# Clone and start with Docker Compose
git clone <repository-url>
cd mcp-mysql-server
cp .env.example .env
docker-compose up -d
# Test the server
curl http://localhost:3000/health
# Install and run locally
pip install -e .
python server.py
# Test the server
curl http://localhost:3000/health
/health endpoint with metrics# Server Configuration
PORT=3000 # Server port
HOST=0.0.0.0 # Server host
AUTH_MODE=none # none, bearer, api_key
AUTH_TOKEN=your-token # Authentication token
# MySQL Configuration
MYSQL_HOST=localhost # MySQL server host
MYSQL_PORT=3306 # MySQL server port
MYSQL_USER=root # MySQL username
MYSQL_PASSWORD=password # MySQL password
MYSQL_DATABASE=test # Default database
# Rate Limiting
RATE_LIMIT_REQUESTS_PER_MINUTE=60 # Requests per minute per IP
RATE_LIMIT_BURST=10 # Burst allowance
# Security
REQUEST_TIMEOUT_SECONDS=30 # Request timeout
MAX_REQUEST_SIZE_MB=10 # Max request size
GET /health
{
"status": "ok",
"version": "0.1.0",
"uptime_seconds": 3600,
"tools": ["ping", "mysql_query", "mysql_status", "mysql_innodb_metrics"],
"metrics": {
"total_requests": 150,
"total_errors": 2,
"recent_errors": []
}
}
GET /tools
{
"ping": {
"description": "Health/ping utility returning timestamp and echo text",
"input_schema": {...},
"output_schema": {...}
}
}
POST /invoke
Content-Type: application/json
Authorization: Bearer your-token # If auth enabled
{
"tool": "mysql_query",
"args": {
"query": "SELECT COUNT(*) as user_count FROM users"
}
}
{
"columns": ["user_count"],
"rows": [[42]],
"row_count": 1,
"execution_time_ms": 15
}
docker-compose up -d
# Build production image
docker build -t mcp-mysql-server .
# Run with custom configuration
docker run -d \
-p 3000:3000 \
-e AUTH_MODE=bearer \
-e AUTH_TOKEN=your-secure-token \
-e MYSQL_HOST=your-mysql-host \
mcp-mysql-server
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run with coverage
pytest --cov=. --cov-report=html
# Run specific test categories
pytest tests/test_ping.py -v
pytest tests/test_http.py -v
pytest tests/test_auth.py -v
Install required packages:
pip install -r requirements.txt
Or install key dependencies separately:
pip install "mcp[cli]"
pip install mysql-connector-python
Configure via environment variables:
Example (Linux/macOS):
export MYSQL_HOST=localhost
export MYSQL_PORT=3306
export MYSQL_USER=myuser
export MYSQL_PASSWORD=mypassword
export MYSQL_DATABASE=mydatabase
Example (Windows PowerShell):
$env:MYSQL_HOST = "localhost"
$env:MYSQL_PORT = "3306"
$env:MYSQL_USER = "myuser"
$env:MYSQL_PASSWORD = "mypassword"
$env:MYSQL_DATABASE = "mydatabase"
Run the server:
python mysql_server.py
python mysql_server.py --transport sse
Get help:
python mysql_server.py --help
To integrate with Claude Desktop, update your config file (%APPDATA%/Claude/claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"mysql": {
"command": "python",
"args": ["path/to/mysql_server.py"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "your_username",
"MYSQL_PASSWORD": "your_password",
"MYSQL_DATABASE": "your_database"
}
}
}
}
list_tables tool or access mysql://tables resource.describe_table tool or mysql://schema/{table_name}.execute_sql for select or data modification queries.The server includes a rich set of tools such as:
Project structure:
mcp-mysql-server/
├── mysql_server.py # Core server code with tools and protocols
├── requirements.txt # Python dependencies
├── README.md # This documentation
└── pyproject.toml # Optional project metadata
python mysql_server.pymcp dev mysql_server.pyMIT License — Open source and free to use
A comprehensive Model Context Protocol (MCP) server for MySQL databases with 200+ tools for advanced database management, diagnostics, performance analysis, security auditing, and AI-powered database
Visão geral
A comprehensive Model Context Protocol (MCP) server for MySQL databases with 200+ tools for advanced database management, diagnostics, performance analysis, security auditing, and AI-powered database interactions.
Ferramentas
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Este registro não lista nenhuma variável de ambiente obrigatória.
Mysql roda localmente via stdio.
Última verificação: 2026-10-28. A comprehensive Model Context Protocol (MCP) server for MySQL databases with 200+ tools for advanced database management, diagnostics, performance analysis, security auditing, and AI-powered database interactions.