🏎️ ☁️/🏠 - Interact with Portainer instances: container management, deployment operations and infrastructure…
Portainer MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
MCP server for Portainer, generated from the Portainer OpenAPI spec via FastMCP.
> [!IMPORTANT]
> **Portainer MCP is no longer the supported way to use an LLM with Portainer.** That is Portainer Command, available to Portainer Business Edition customers (including the free 3-node license).
>
> This server remains available as-is for people who want to keep using it, but it is provided without support, warranty or SLA, and is **not recommended for production environments**. This repository may be archived in the future.
Overview
This MCP server exposes the Portainer REST API as MCP tools: list and inspect environments, manage GitOps workflows, troubleshoot Docker and Kubernetes resources. It also supports proxying requests to the underlying Docker and K8s APIs of each environment.
Match the MCP server's minor version to your Portainer instance's minor — e.g. MCP server 2.45.x with Portainer 2.45.x. See Version compatibility for details.
Intended use
Portainer MCP is intended for evaluation, homelabs, and other non-production use. It is not supported in business, production, or any other environment where uptime, security posture, or data integrity matter. There is no SLA, no guaranteed response to issues, no further feature development, and no roadmap commitment. If you run it, you are choosing to self-support.
For a supported way to use an LLM with Portainer, use Portainer Command (Business Edition, including the free 3-node license).
Getting started
The MCP server supports different deployment scenarios:
* execute it locally via uvx
* install it as a MCP bundle
* deploy it as a container
Use the uvx approach or the MCP bundle to explore the MCP capabilities locally and deploy it inside your infrastructure as a container for a team based deployment setup.
> [!NOTE]
> Before using the MCP, make sure to generate an API key in Portainer under **My Account → Access tokens** first as both paths need it.
MCP bundle (one-click install)
A convenient way to try the MCP server locally. Your client must support MCP bundles:
1. Fetch the self-contained .mcpb bundle for your platform from the latest release
2. Double-click to install
3. Enter your Portainer URL and API key.
Single user (stdio via uvx)
The other way to test the MCP server locally. Runs as a stdio process on your machine and connects directly to the Portainer instance.
> [!NOTE]
> uv must be installed and available on PATH.
> See the uv install docs.
>
> Set PORTAINER_TLS_VERIFY=0 if your Portainer instance uses self-signed TLS certificates.
Register with Claude Code:
For other clients, see
docs/distribution/.
Team deployment (container)
A way to have multiple users interacting with your Portainer instance via MCP. Deployed as a container inside your infrastructure, accessed by users from their workstations over HTTPS. A shared secret gates the MCP server and every client also forwards its own Portainer API key so that each user acts under their own Portainer identity.
> [!IMPORTANT]
> Both the gate secret and each user Portainer API key are sent across the wire. The container deployment requires you to declare a transport posture: bring your own TLS certificates, attest a TLS-terminating reverse proxy setup or explicitly opt-in to plaintext.
>
> Plaintext is a deliberate, dangerous choice — see the three options below.
>
> It is **NOT** recommended to expose this MCP server on the public internet, host it inside your private infrastructure even behind a TLS proxy.
See more info below about the different deployment scenarios. For any of these scenarios: