Portainer Docker MCP Server
Published · Updated
At a glance
- Category
- Cloud & DevOps
- GitHub repository
- portainer/portainer-mcp
- Watch out for
- No longer supported by Portainer and not recommended for production; it may be archived.
Portainer MCP is Portainer's MCP server, generated from the Portainer OpenAPI spec with FastMCP, and published as mcp-portainer. Its README now starts with an important notice: it is no longer the supported way to use an LLM with Portainer. That role has moved to Portainer Command, available to Portainer Business Edition customers, including those on the free three-node licence.
The server remains available as is, without support, warranty or SLA, and Portainer says it is not recommended for production and may be archived. It is still useful for homelabs and test environments. It exposes the Portainer REST API as tools: listing and inspecting environments, managing GitOps workflows, and working with Docker and Kubernetes through Portainer, including proxying requests to the underlying Docker and Kubernetes APIs.
It has sensible defaults for a tool like this. Environment variable values are redacted by default, so container secrets set through environment variables do not end up in the model's context. Capabilities are grouped into profiles you can restrict or expand. In HTTP mode for a team, a shared PORTAINER_MCP_AUTH_TOKEN is required to reach the server, and each user's own Portainer API key decides what they can do.
How it connects
Your AI app
An assistant or agent that supports MCP
Portainer Docker MCP Server
Runs as
- Python (uv / pip)
Gives the agent
- Environments
- Docker and Kubernetes
- GitOps
- Redaction
- Profiles
Portainer
Signs in with
- API key
What it can do
- Environments
- List and inspect Portainer environments, settings and version information.
- Docker and Kubernetes
- Troubleshoot and manage Docker and Kubernetes resources through Portainer, including API proxying.
- GitOps
- Manage GitOps workflows defined in Portainer.
- Redaction
- Environment variable values are redacted by default.
- Profiles
- Restrict or expand the enabled capabilities with profiles, described in docs/profiles.md.
Setting it up
For a single user, create a Portainer API key under My Account, Access tokens, install uv, and run: claude mcp add portainer -e PORTAINER_URL=https://portainer.example.com -e PORTAINER_API_KEY=ptr_your_key -- uvx --from "mcp-portainer~=2.45.0" mcp-portainer, matching the version to your Portainer version as the compatibility section describes. For a team, run the container in HTTP mode with PORTAINER_MCP_AUTH_TOKEN set, and have each user connect with that token plus their own X-Portainer-API-Key header. An MCP bundle offers one-click install in supporting clients.
Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)
Where it helps
- Checking why a container keeps restarting in a homelab
- Listing stacks and environments across a Portainer installation
- Inspecting Kubernetes workloads through Portainer
- Reviewing GitOps stack configuration
Limitations and things to watch
- No longer supported by Portainer and not recommended for production; it may be archived.
- Portainer Command is the supported option for Business Edition users.
- The agent can change containers and stacks with your API key's permissions.
- Versions are tied to Portainer versions, so match them carefully.
Sources
Written from the project's own documentation, checked November 2026.
- github.com /portainer/portainer-mcp
- portainer.ai /products/portainer-command
- pypi.org /project/mcp-portainer
How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.