/ Diretório / Playground / Portainer MCP
● Oficial portainer ⚡ Instantâneo

Portainer MCP

por portainer · portainer/portainer-mcp

Manage Docker, Kubernetes, and Swarm via Portainer through MCP.

The official Portainer MCP exposes container, image, volume, and Kubernetes management against any Portainer Business or Community instance. Use Claude to inspect running stacks, restart unhealthy containers, or pull logs from any environment Portainer manages.

Por que usar

Principais recursos

Demo ao vivo

Como fica na prática

portainer-mcp.replay ▶ pronto
0/0

Instalar

Escolha seu cliente

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "portainer-mcp": {
      "command": "uvx",
      "args": [
        "portainer-mcp"
      ]
    }
  }
}

Abra Claude Desktop → Settings → Developer → Edit Config. Reinicie após salvar.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "portainer-mcp": {
      "command": "uvx",
      "args": [
        "portainer-mcp"
      ]
    }
  }
}

Cursor usa o mesmo esquema mcpServers que o Claude Desktop. Config de projeto vence a global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "portainer-mcp": {
      "command": "uvx",
      "args": [
        "portainer-mcp"
      ]
    }
  }
}

Clique no ícone MCP Servers na barra lateral do Cline, depois "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "portainer-mcp": {
      "command": "uvx",
      "args": [
        "portainer-mcp"
      ]
    }
  }
}

Mesmo formato do Claude Desktop. Reinicie o Windsurf para aplicar.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "portainer-mcp",
      "command": "uvx",
      "args": [
        "portainer-mcp"
      ]
    }
  ]
}

O Continue usa um array de objetos de servidor em vez de um map.

~/.config/zed/settings.json
{
  "context_servers": {
    "portainer-mcp": {
      "command": {
        "path": "uvx",
        "args": [
          "portainer-mcp"
        ]
      }
    }
  }
}

Adicione em context_servers. Zed recarrega automaticamente ao salvar.

claude mcp add portainer-mcp -- uvx portainer-mcp

Uma linha só. Verifique com claude mcp list. Remova com claude mcp remove.

Casos de uso

Usos do mundo real: Portainer MCP

Triage which containers are unhealthy across the fleet

👤 DevOps / SRE ⏱ ~15 min intermediate

Quando usar: You manage many envs through Portainer and need a fleet-wide health snapshot.

Pré-requisitos
  • Server/skill installed and authenticated — See repo README
Fluxo
  1. Inventory
    List every environment Portainer manages. For each, count running, exited, and unhealthy containers.✓ Copiado
    → Per-env health table
  2. Drill in
    For the env with the most unhealthy containers, show the last 50 log lines from each and tell me what's failing.✓ Copiado
    → Root-cause hypothesis per container

Resultado: Fleet-wide triage in one chat, prioritized by impact.

Armadilhas
  • Granting an API token full admin to give Claude broad access is risky — Granting an API token full admin to give Claude broad access is risky — scope to read-only first, then escalate per-task.

Combinações

Combine com outros MCPs para 10× de alavancagem

portainer-mcp + kubernetes-mcp-server

Pair with kubernetes-mcp-server for complementary capabilities

Use this server together with kubernetes-mcp-server to complete a multi-step task.✓ Copiado
portainer-mcp + filesystem

Pair with filesystem for complementary capabilities

Use this server together with filesystem to complete a multi-step task.✓ Copiado

Ferramentas

O que este MCP expõe

FerramentaEntradasQuando chamarCusto
list_environments (none) Discover which clusters Portainer manages 1 API call
list_containers environment_id, filter Inventory running containers in one env 1 API call
container_logs environment_id, container_id, lines Triage a misbehaving container 1 API call
container_restart environment_id, container_id Bounce an unhealthy container 1 API call

Custo e limites

O que custa rodar

Cota de API
See provider docs for rate limits
Tokens por chamada
Varies by tool
Monetário
See repo README for pricing details
Dica
Cache tool results and avoid repeated identical calls.

Segurança

Permissões, segredos, alcance

Armazenamento de credenciais: Use environment variables; never commit secrets
Saída de dados: Tool calls go to the provider's API as documented

Solução de problemas

Erros comuns e correções

401 Unauthorized

Create an API token in Portainer (User settings → Access tokens) and set PORTAINER_API_KEY.

Verificar: list_environments returns a list
Endpoint not found

Token must have access to the requested environment. Check team/endpoint permissions in Portainer.

Verificar: list_environments returns the target env

Alternativas

Portainer MCP vs. outros

AlternativaQuando usarTroca
Rancher MCPYou're a Rancher shopDifferent feature set; Portainer is broader on plain Docker

Mais

Recursos

📖 Leia o README oficial no GitHub

🐙 Ver issues abertas

🔍 Ver todos os 400+ servidores MCP e Skills