/ Verzeichnis / Playground / Portainer MCP
● Offiziell portainer ⚡ Sofort

Portainer MCP

von 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.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

portainer-mcp.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

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

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

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

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

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

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

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

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

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

Continue nutzt ein Array von Serverobjekten statt einer Map.

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

In context_servers hinzufügen. Zed lädt beim Speichern neu.

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

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: Portainer MCP

Triage which containers are unhealthy across the fleet

👤 DevOps / SRE ⏱ ~15 min intermediate

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

Voraussetzungen
  • Server/skill installed and authenticated — See repo README
Ablauf
  1. Inventory
    List every environment Portainer manages. For each, count running, exited, and unhealthy containers.✓ Kopiert
    → 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.✓ Kopiert
    → Root-cause hypothesis per container

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

Fallstricke
  • 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.
Kombinieren mit: kubernetes-mcp-server · filesystem

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

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.✓ Kopiert
portainer-mcp + filesystem

Pair with filesystem for complementary capabilities

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

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
See provider docs for rate limits
Tokens pro Aufruf
Varies by tool
Kosten in €
See repo README for pricing details
Tipp
Cache tool results and avoid repeated identical calls.

Sicherheit

Rechte, Secrets, Reichweite

Credential-Speicherung: Use environment variables; never commit secrets
Datenabfluss: Tool calls go to the provider's API as documented

Fehlerbehebung

Häufige Fehler und Lösungen

401 Unauthorized

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

Prüfen: list_environments returns a list
Endpoint not found

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

Prüfen: list_environments returns the target env

Alternativen

Portainer MCP vs. andere

AlternativeWann stattdessenKompromiss
Rancher MCPYou're a Rancher shopDifferent feature set; Portainer is broader on plain Docker

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen