/ Directorio / 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 qué usarlo

Características clave

Demo en vivo

Cómo se ve en la práctica

portainer-mcp.replay ▶ listo
0/0

Instalar

Elige tu cliente

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

Abre Claude Desktop → Settings → Developer → Edit Config. Reinicia después de guardar.

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

Cursor usa el mismo esquema mcpServers que Claude Desktop. La configuración del proyecto prevalece sobre la global.

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

Haz clic en el icono MCP Servers de la barra lateral de Cline y luego en "Edit Configuration".

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

Mismo formato que Claude Desktop. Reinicia Windsurf para aplicar.

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

Continue usa un array de objetos de servidor en lugar de un mapa.

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

Añádelo a context_servers. Zed recarga en caliente al guardar.

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

Un solo comando. Verifica con claude mcp list. Quita con claude mcp remove.

Casos de uso

Usos del mundo real: Portainer MCP

Triage which containers are unhealthy across the fleet

👤 DevOps / SRE ⏱ ~15 min intermediate

Cuándo usarlo: You manage many envs through Portainer and need a fleet-wide health snapshot.

Requisitos previos
  • Server/skill installed and authenticated — See repo README
Flujo
  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.

Errores comunes
  • 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.

Combinaciones

Combínalo con otros MCPs para multiplicar por 10

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

Herramientas

Lo que expone este MCP

HerramientaEntradasCuándo llamarCoste
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

Coste y límites

Lo que cuesta ejecutarlo

Cuota de API
See provider docs for rate limits
Tokens por llamada
Varies by tool
Monetario
See repo README for pricing details
Consejo
Cache tool results and avoid repeated identical calls.

Seguridad

Permisos, secretos, alcance

Almacenamiento de credenciales: Use environment variables; never commit secrets
Salida de datos: Tool calls go to the provider's API as documented

Resolución de problemas

Errores comunes y soluciones

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 otros

AlternativaCuándo usarlaContrapartida
Rancher MCPYou're a Rancher shopDifferent feature set; Portainer is broader on plain Docker

Más

Recursos

📖 Lee el README oficial en GitHub

🐙 Ver issues abiertas

🔍 Ver todos los 400+ servidores MCP y Skills