docker_proxyLABSCO SUMMARY
Decide what the agent may see before you decide what it may do.
Two switches carry most of the safety here. PORTAINER_PROFILES scopes which parts of Portainer exist at all — an Edge fleet operator never sees user administration — and PORTAINER_READ_ONLY registers only GET and HEAD operations, which also restricts the proxy tools. Together they make an audit persona that can see everything and change nothing. Two defaults worth knowing: environment values in stack and container responses are redacted unless you opt in, and responses are capped so a large listing degrades into a hint rather than blowing the client's output limit.
What it is
Portainer's official MCP server, generated from the Portainer OpenAPI spec. The spec holds more than 400 operations across more than 40 tags, which would be unusable as a flat tool list, so the server registers a named bundle of tags — a profile — and you decide which bundles to turn on.
What you get
- BASE — server identity, login, settings and status; assumed present by most workflows
- DOCKER — Docker workloads on managed environments: endpoints, stacks and GitOps sources
- KUBERNETES — Kubernetes workloads including Helm releases, sharing endpoints and stacks with DOCKER
- GITOPS — registering, listing and testing git sources and browsing refs, for a source-management-only role
- EDGE — Portainer Edge fleet management: edge stacks, jobs, groups, configs and update schedules
- ADMIN — platform administration: users, teams, roles, LDAP, licence, backup, registries, endpoint groups and resource controls
- docker_proxy and kubernetes_proxy, escape hatches that pass a raw API call through when no generated tool fits
- Tags that belong to no profile can be added individually with PORTAINER_TAGS_EXTRA — observability for container and pod logs, custom_templates, webhooks, useractivity and others
- get_guidance serves the operating guide; the first call from a caller is answered with it before real work starts
Requirements
A Portainer instance at PORTAINER_URL, and a version match — the server's minor tracks the Portainer minor it was built against. Under stdio it carries one identity: PORTAINER_API_KEY, sent as X-API-KEY upstream. The container image runs HTTP instead, where each client presents two things — a shared gate secret in PORTAINER_MCP_AUTH_TOKEN, and its own Portainer key in an X-Portainer-API-Key header that is validated once and then forwarded, so users keep their own permissions. Over HTTP one TLS posture must be declared and the server refuses to start with none or both: either its own certificate through PORTAINER_MCP_TLS_CERT and PORTAINER_MCP_TLS_KEY, or a trusted terminating proxy through PORTAINER_MCP_TRUST_PROXY_TLS with PORTAINER_MCP_FORWARDED_ALLOW_IPS.
Setup effort
One command plus a key — uvx --from "mcp-portainer~=2.44.0" mcp-portainer, then supply credentials
USE CASES
Working out why a container is unhealthy
Find the environment and stack, then read the container's state — adding the observability tag when you also need its logs.
Deploying a git-backed stack
Register and test the git source, browse its refs, and deploy the stack from it.
Giving an agent a look-but-don't-touch view
Enable every profile and set the server read-only, so it can inventory the whole estate and change nothing.
Running an Edge fleet
Turn on just the base and edge profiles so edge stacks, jobs and update schedules are the whole tool list.
Sharing one deployment across a team
Run the container over HTTP so each person's own Portainer key is what authorises their calls, not a shared service account.
3 tools
Listed in project docs. Your client may show a different list.
kubernetes_proxyget_guidanceBEFORE YOU INSTALL
What to know first
Tools you get
3 tools named in the project's documentation.
Requires
- uvx on PATH
- PORTAINER_API_KEY in your environment
- PORTAINER_URL in your environment
INSTALLATION
Connect your client
Server setup
uvx --from "mcp-portainer~=2.44.0" mcp-portainerMCP Clients
Claude Code — stdio
claude mcp add portainer \
-e PORTAINER_URL=<YOUR_PORTAINER_URL> \
-e PORTAINER_API_KEY=<YOUR_PORTAINER_API_KEY> \
-- uvx --from "mcp-portainer~=2.44.0" mcp-portainerClaude Code — HTTP
claude mcp add portainer --transport http <YOUR_SERVER_URL>:17717/mcp \
--header "Authorization: Bearer <YOUR_GATE_TOKEN>" \
--header "X-Portainer-API-Key: <YOUR_PORTAINER_API_KEY>"