/ Annuaire / Playground / Portainer MCP
● Officiel portainer ⚡ Instantané

Portainer MCP

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

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

portainer-mcp.replay ▶ prêt
0/0

Installer

Choisissez votre client

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

Ouvrez Claude Desktop → Settings → Developer → Edit Config. Redémarrez après avoir enregistré.

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

Cursor utilise le même schéma mcpServers que Claude Desktop. La config projet l'emporte sur la globale.

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

Cliquez sur l'icône MCP Servers dans la barre latérale Cline, puis "Edit Configuration".

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

Même format que Claude Desktop. Redémarrez Windsurf pour appliquer.

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

Continue utilise un tableau d'objets serveur plutôt qu'une map.

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

Ajoutez dans context_servers. Zed recharge à chaud à la sauvegarde.

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

Une seule ligne. Vérifiez avec claude mcp list. Supprimez avec claude mcp remove.

Cas d'usage

Usages concrets : Portainer MCP

Triage which containers are unhealthy across the fleet

👤 DevOps / SRE ⏱ ~15 min intermediate

Quand l'utiliser : You manage many envs through Portainer and need a fleet-wide health snapshot.

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

Résultat : Fleet-wide triage in one chat, prioritized by impact.

Pièges
  • 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.

Combinaisons

Associez-le à d'autres MCPs pour un effet X10

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

Pair with filesystem for complementary capabilities

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

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
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

Coût et limites

Coût d'exécution

Quota d'API
See provider docs for rate limits
Tokens par appel
Varies by tool
Monétaire
See repo README for pricing details
Astuce
Cache tool results and avoid repeated identical calls.

Sécurité

Permissions, secrets, portée

Stockage des identifiants : Use environment variables; never commit secrets
Sortie de données : Tool calls go to the provider's API as documented

Dépannage

Erreurs courantes et correctifs

401 Unauthorized

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

Vérifier : list_environments returns a list
Endpoint not found

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

Vérifier : list_environments returns the target env

Alternatives

Portainer MCP vs autres

AlternativeQuand l'utiliserCompromis
Rancher MCPYou're a Rancher shopDifferent feature set; Portainer is broader on plain Docker

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills