Portainer MCP Server for Claude
Manage Docker and Kubernetes infrastructure from Claude — list environments, inspect containers, manage GitOps workflows, troubleshoot resources, and proxy Docker/K8s API calls — with the official Portainer MCP server generated from the Portainer OpenAPI spec.
Open the source and read safety notes before installing.
Safety notes
- The server exposes the full Portainer REST API — including container start/stop/delete, stack deployment, and Kubernetes resource management.
- The API proxy tools forward requests directly to your Docker/Kubernetes API — review before executing any destructive operations.
- For team deployments over HTTP, the container requires TLS (either BYO certificates or a TLS-terminated reverse proxy) — do not expose plaintext on the public internet.
Privacy notes
- Container names, environment configurations, Docker/Kubernetes resource details, and GitOps credentials from your Portainer instance are surfaced in Claude's context.
- Your Portainer API key grants the same access as your Portainer user account — treat it as a secret.
Prerequisites
- A running Portainer instance (CE or Business Edition).
- A Portainer API key: My Account → Access tokens → Add access token.
- Python with `uv` installed: `pip install uv` or `brew install uv`.
- Match the MCP server minor version to your Portainer instance minor version (e.g., `mcp-portainer~=2.42.0` for Portainer 2.42.x).
- Set `PORTAINER_TLS_VERIFY=0` if your Portainer instance uses self-signed TLS certificates.
Schema details
- Install type
- cli
- Troubleshooting
- No
- Scope
- Source repo
- Estimated setup
- 10 minutes
- Difficulty
- intermediate
- Website
- https://portainer.io
Full copyable content
{
"mcpServers": {
"portainer": {
"command": "uvx",
"args": ["--from", "mcp-portainer~=2.42.0", "mcp-portainer"],
"env": {
"PORTAINER_URL": "https://portainer.example.com",
"PORTAINER_API_KEY": "ptr_xxxxx"
}
}
}
}About this resource
Overview
The Portainer MCP Server is the official Model Context Protocol server from
Portainer, the container management platform. Generated directly
from the Portainer OpenAPI specification via FastMCP, it exposes the full Portainer REST API
as MCP tools — environments, containers, stacks, GitOps, Kubernetes resources, and Docker/K8s
API proxy access. Supports both single-user stdio mode via uvx and multi-user container
deployment. Licensed under MIT.
Match the MCP server minor version to your Portainer instance (e.g., mcp-portainer~=2.42.0
for Portainer 2.42.x).
Key capabilities
- Environments — list and inspect Docker and Kubernetes environments managed by Portainer.
- Container management — list, inspect, start/stop/restart containers; view logs.
- GitOps workflows — review and manage GitOps stack configurations.
- Kubernetes resources — inspect namespaces, pods, services, and deployments.
- API proxy — proxy requests directly to the underlying Docker or Kubernetes API of any Portainer-managed environment for advanced troubleshooting.
- Team deployment — deploy as a container with a shared gate secret and per-user Portainer API keys for multi-user access.
How it compares
| Server | Docker/K8s environments | GitOps | API proxy | Multi-user | Auth |
|---|---|---|---|---|---|
| Portainer MCP | Yes | Yes | Yes | Yes | API key |
| Docker MCP | Docker only | No | Partial | No | Socket |
| Kubernetes MCP | K8s only | No | No | No | kubeconfig |
| Rancher MCP | Yes | No | No | No | API key |
Portainer's API proxy capability is unique — it lets Claude make arbitrary Docker and Kubernetes API calls through Portainer's authenticated proxy, enabling deep troubleshooting without direct socket or cluster access.
Installation
Single user (stdio via uvx)
claude mcp add portainer \
-e PORTAINER_URL=https://portainer.example.com \
-e PORTAINER_API_KEY=ptr_xxxxx \
-- uvx --from "mcp-portainer~=2.42.0" mcp-portainer
Create an API key in Portainer: My Account → Access tokens → Add access token.
Team deployment (container via HTTP)
TOKEN=$(openssl rand -hex 32)
docker run -d --name portainer-mcp -p 17717:17717 \
-v /etc/portainer-mcp/tls:/tls:ro \
-e PORTAINER_URL=https://portainer.example.com \
-e PORTAINER_MCP_AUTH_TOKEN="$TOKEN" \
-e PORTAINER_MCP_ALLOWED_HOSTS=mcp.example.com:17717 \
-e PORTAINER_MCP_TLS_CERT=/tls/cert.pem \
-e PORTAINER_MCP_TLS_KEY=/tls/key.pem \
portainer/portainer-mcp:2.42
claude mcp add portainer --transport http https://mcp.example.com:17717/mcp \
--header "Authorization: Bearer <gate-token>" \
--header "X-Portainer-API-Key: <ptr_user_key>"
Requirements
- A running Portainer instance with API token authentication.
- Python with
uvinstalled. - An MCP client (Claude Code or Claude Desktop).
- Minor version match between
mcp-portainerand your Portainer instance.
Security
- Use least-privilege API keys for each user.
- For team deployments, always use TLS (BYO certificates or reverse proxy) — never expose the container directly on plaintext in production.
- The
PORTAINER_MCP_ALLOWED_HOSTSallowlist prevents DNS-rebinding attacks.
Source Verification Notes
Verified on 2026-06-18:
- Official GitHub repository
portainer/portainer-mcp(MIT) documents themcp-portainerpip package,PORTAINER_URL/PORTAINER_API_KEY/PORTAINER_TLS_VERIFYconfiguration, the version-matching requirement, the Claude Codeclaude mcp addinstall command, the Docker container deployment mode withPORTAINER_MCP_AUTH_TOKEN/PORTAINER_MCP_ALLOWED_HOSTS, and the HTTP team deployment pattern with per-userX-Portainer-API-Keyheaders. - Claude Code MCP documentation at
code.claude.com/docs/en/mcpdescribes the stdio and HTTP connector patterns used above.
Source citations
Add this badge to your README
How it compares
Portainer MCP Server for Claude side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | Portainer MCP Server for Claude Manage Docker and Kubernetes infrastructure from Claude — list environments, inspect containers, manage GitOps workflows, troubleshoot resources, and proxy Docker/K8s API calls — with the official Portainer MCP server generated from the Portainer OpenAPI spec. Open dossier | Fly.io MCP Server for Claude Manage Fly.io applications, machines, volumes, secrets, certificates, and organizations from Claude — with the official Fly.io MCP server built into the flyctl CLI. Open dossier | Argo CD MCP Server Argo Project Labs MCP server for connecting Claude to Argo CD applications, clusters, managed resources, workload logs, events, sync operations, and resource actions through stdio or HTTP stream transports. Open dossier | ConfigCat MCP Server for Claude Manage ConfigCat feature flags from Claude — create, update, and delete flags and targeting rules, manage environments, find and clean up stale flags, and audit change history — with the official ConfigCat MCP server and its 52 tools for the full ConfigCat Management API. Open dossier |
|---|---|---|---|---|
| Trust | ||||
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Category | mcp | mcp | mcp | mcp |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | Portainer | Fly.io | Argo Project Labs | ConfigCat |
| Added | 2026-06-18 | 2026-06-18 | 2026-06-06 | 2026-06-18 |
| Platforms | Claude CodeCodexCursorClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop | Claude CodeClaude Desktop |
| Source repo | — | — | — | — |
| Safety notes | ✓The server exposes the full Portainer REST API — including container start/stop/delete, stack deployment, and Kubernetes resource management. The API proxy tools forward requests directly to your Docker/Kubernetes API — review before executing any destructive operations. For team deployments over HTTP, the container requires TLS (either BYO certificates or a TLS-terminated reverse proxy) — do not expose plaintext on the public internet. | ✓The Fly.io MCP server runs locally with full access to your authenticated Fly.io account — it can create, delete, and modify apps, machines, and secrets. Fly.io warns that running the server remotely can give others access to run commands on your behalf; keep it bound to localhost unless you intend remote access. Destructive operations (machine deletion, secret updates) are available — review Claude's proposed commands before executing in production environments. | ✓Argo CD MCP can inspect clusters, applications, resource trees, managed resources, workload logs, and resource events. By default all tools are available; setting MCP_READ_ONLY to true disables create_application, update_application, delete_application, sync_application, and run_resource_action. sync_application can apply changes to Kubernetes resources and may prune resources depending on options. delete_application can remove Argo CD applications and may cascade deletion to child resources depending on options. run_resource_action can trigger actions on resources managed by an application. Disabling TLS certificate validation with NODE_TLS_REJECT_UNAUTHORIZED weakens transport security and should be limited to reviewed development contexts. | ✓Tools can create, update, and delete feature flags, targeting rules, environments, and segments — changes affect live feature flag configuration. Use `list-staleflags` before deleting flags to identify zombie flags and avoid breaking active SDKs. |
| Privacy notes | ✓Container names, environment configurations, Docker/Kubernetes resource details, and GitOps credentials from your Portainer instance are surfaced in Claude's context. Your Portainer API key grants the same access as your Portainer user account — treat it as a secret. | ✓App names, machine IDs, secret names (not values unless explicitly requested), and log content may be surfaced into Claude's context. Fly.io API tokens (`FLY_ACCESS_TOKEN`) grant full account access — store them in your environment, not in repositories. | ✓Argo CD application specs, cluster names, repository URLs, revisions, namespaces, Kubernetes manifests, resource events, and workload logs can reveal secrets, internal topology, deployment history, incident details, or customer data. ARGOCD_BASE_URL, ARGOCD_API_TOKEN, stateless HTTP request headers, cluster names, namespace names, and application names should stay out of prompts, issues, logs, screenshots, and committed files. Workload logs and resource events may include credentials, tokens, environment variables, error traces, or production incident context. HTTP transport should be authenticated and network-restricted so Argo CD tools are not reachable by untrusted clients. | ✓Feature flag configurations, targeting rules, audience segments, SDK keys, and audit log entries from your ConfigCat account are surfaced in Claude's context. `CONFIGCAT_API_USER` and `CONFIGCAT_API_PASS` are Management API credentials — keep them in the MCP config env and never commit them to version control. |
| Prerequisites |
|
|
|
|
| Install | | | | |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.