mysql-mcp-server
Enables monitoring and administration of MySQL databases through natural language, supporting multiple simultaneous connections, health checks, and full DDL/DML/DCL operations.
README
🚀 MySQL Node MCP Server
Um servidor MCP (Model Context Protocol) para monitoramento e interação com MySQL Database, desenvolvido em Node.js com suporte a múltiplas conexões simultâneas.
✨ Funcionalidades Principais
- 🔗 Múltiplas Conexões - Conecte-se a vários bancos MySQL simultaneamente
- 📊 Monitoramento - Saúde do banco, performance e métricas em tempo real
- 🛡️ Segurança - Validação de scripts de migração e operações seguras
- ⚡ Performance - Pool de conexões otimizado para cada ambiente
- 🔧 Administração - DDL, DML e DCL operations completas
- 📱 Integração - Compatível com Cursor IDE e Claude Desktop
🚀 Início Rápido
1. Instalação
npm install -g mysql-mcp-server-v1
2. Configuração MCP (Cursor/Claude Desktop)
Adicione a seguinte configuração ao seu arquivo mcp.json:
{
"mcpServers": {
"mysql-monitor": {
"command": "npx",
"args": ["mysql-mcp-server-v1@latest"],
"env": {
"MCP_SERVER_NAME": "mysql-monitor",
"MCP_SERVER_VERSION": "1.0.0",
"LOG_LEVEL": "info",
"MYSQL_CONNECTIONS": "{\"connections\":{\"prod\":{\"host\":\"localhost\",\"port\":3306,\"user\":\"seu_usuario\",\"password\":\"sua_senha\",\"database\":\"seu_banco\",\"description\":\"Production Database\"}},\"defaultConnection\":\"prod\"}"
}
}
}
}
Para múltiplas conexões:
{
"mcpServers": {
"mysql-monitor": {
"command": "npx",
"args": ["mysql-mcp-server-v1@latest"],
"env": {
"MCP_SERVER_NAME": "mysql-monitor",
"MCP_SERVER_VERSION": "1.0.0",
"LOG_LEVEL": "info",
"MYSQL_CONNECTIONS": "{\"connections\":{\"hml\":{\"host\":\"servidor_hml\",\"port\":3306,\"user\":\"usuario_hml\",\"password\":\"senha_hml\",\"database\":\"hml_db\",\"description\":\"Homologação Database\"},\"prod\":{\"host\":\"servidor_prod\",\"port\":3306,\"user\":\"usuario_prod\",\"password\":\"senha_prod\",\"database\":\"prod_db\",\"description\":\"Production Database\"}},\"defaultConnection\":\"prod\"}"
}
}
}
}
3. Configuração Automática (Opcional)
# Configurar Cursor IDE automaticamente
npx mysql-mcp-server-v1 setup-cursor
# Diagnosticar problemas de conectividade
npx mysql-mcp-server-v1 diagnose
# Testar conexão MySQL
npx mysql-mcp-server-v1 test-connection
🛠️ Ferramentas Disponíveis
🔗 Múltiplas Conexões
list_connections- Lista todas as conexõestest_connection- Testa conexão específicatest_all_connections- Testa todas as conexõesget_connections_status- Status das conexões ativas
📊 Monitoramento
check_database_health- Verifica saúde do bancomonitor_schema_changes- Monitora mudanças em esquemascheck_sensitive_tables- Verifica tabelas sensíveisdetect_suspicious_activity- Detecta atividades suspeitas
🔧 Administração
- DDL:
create_table,alter_table,drop_table - DML:
select_data,insert_data,update_data,delete_data - DCL:
create_user,grant_privileges,revoke_privileges
🔍 Análise
get_table_info- Informações detalhadas da tabelaget_constraints- Lista constraintsget_foreign_keys- Lista chaves estrangeirasget_indexes- Lista índicesanalyze_table- Analisa tabela e gera estatísticas
📋 Pré-requisitos
- Node.js 18.0.0 ou superior
- MySQL 5.7 ou superior / MariaDB 10.3 ou superior
- Acesso ao banco com privilégios adequados
🤝 Contribuição
Contribuições são bem-vindas! Consulte o arquivo CONTRIBUTING.md para mais detalhes.
📄 Licença
Este projeto está licenciado sob a Licença MIT - veja o arquivo LICENSE para detalhes.
🆘 Suporte
Para suporte e dúvidas:
- Consulte a documentação completa
- Abra uma issue no GitHub
- Verifique os logs para erros específicos
Desenvolvido com ❤️ por Leandro Ferreira
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.