mcp-mgccli
Exposes 7 read-only MCP tools for Magalu Cloud products (block storage, virtual machines, Kubernetes, etc.) using authenticated mgc CLI commands, enabling natural language queries about cloud resources.
README
mcp-mgccli
MCP server para consultas de leitura na Magalu Cloud via mgc CLI.
Expõe 7 tools MCP (um por produto), cobrindo operações list e get. Toda autenticação é feita via API key — nenhuma credencial no código.
Requisitos
- Python 3.11+
mgcCLI v0.54.0+ no PATH- API key Magalu Cloud com permissões de leitura
Instalação
pip install -e /caminho/para/mcp-mgccli
Configuração
Copie o arquivo de exemplo e preencha sua API key:
cp .env.example .env
.env:
MGC_API_KEY=sua-api-key-aqui
MGC_REGION=br-ne1 # opcional — br-ne1 ou br-se1
MGC_TIMEOUT=30 # opcional — timeout em segundos (default: 30)
Integração com Claude Code
O servidor já é iniciado automaticamente via start-mcp.sh, que carrega o .env. Para registrar:
claude mcp add --scope user mgc /caminho/para/mcp-mgccli/start-mcp.sh
Ou adicione manualmente em ~/.claude.json:
{
"mcpServers": {
"mgc": {
"command": "/caminho/para/mcp-mgccli/start-mcp.sh"
}
}
}
Integração com Claude Desktop
Edite ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) ou %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"mgc": {
"command": "/caminho/para/mcp-mgccli/start-mcp.sh"
}
}
}
Tools Disponíveis
| Tool | Recursos |
|---|---|
block_storage |
volumes, snapshots, volume-types, schedulers |
virtual_machine |
instances, images, machine-types, snapshots |
kubernetes |
cluster, nodepool, flavor, version |
dbaas |
instances, clusters, replicas, snapshots, engines, instance-types, parameter-groups |
network |
vpcs, security-groups, public-ips, ports, subnetpools, subnets¹, rules¹ |
container_registry |
registries, repositories, images, proxy-caches |
audit |
events, event-types |
¹ subnets e rules são subrecursos — exigem parent_id para list:
subnets list:parent_id=<vpc-id>rules list:parent_id=<security-group-id>
Parâmetros comuns
| Parâmetro | Tipo | Descrição |
|---|---|---|
resource |
string | Recurso a consultar (ver tabela acima) |
action |
list | get |
Operação |
id |
string | ID do recurso (obrigatório para get) |
region |
string | br-ne1 ou br-se1 — sobrescreve MGC_REGION |
parent_id |
string | ID do recurso pai (apenas network com subnets/rules) |
Inferência de região
O Claude infere a região automaticamente a partir de linguagem natural:
| Menção | Região |
|---|---|
| "nordeste", "ne", "NE1" | br-ne1 |
| "sudeste", "se", "SE1" | br-se1 |
Se a região não for mencionada e MGC_REGION não estiver definido, o Claude pergunta antes de executar.
Exemplos de uso
"Liste minhas VMs no nordeste"
"Quais volumes existem no sudeste?"
"Mostre detalhes do cluster Kubernetes abc-123"
"Liste os security groups da região br-ne1"
"Quais subnets existem na VPC 7211a812-f159-4757-a6ba-c09933a5f6d8?"
"Liste as regras do security group bf8743af-f14b-4f31-917e-8e8160cff838"
Desenvolvimento
# instalar em modo editável
pip install -e .
# rodar testes
python -m pytest tests/ -v
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
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.
E2B
Using MCP to run code via e2b.