2026-06-21 18:00:58 +02:00
# portainer-mcp
2026-06-23 15:09:54 +02:00
MCP server for Portainer (Docker/K8s management). Uses API key authentication.
2026-06-21 18:00:58 +02:00
2026-06-23 15:09:54 +02:00
Source: [`mcp-portainer` ](https://pypi.org/project/mcp-portainer/ ) (v2.42.0)
2026-06-21 18:00:58 +02:00
## Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| `PORTAINER_URL` | Yes | Base URL of the Portainer instance (e.g. `https://portainer.corentic.eu` ) |
2026-06-23 15:09:54 +02:00
| `PORTAINER_API_KEY` | Yes | Portainer API key (generate in Portainer UI: user avatar → Account Settings → Access Tokens → Add token) |
| `PORTAINER_TLS_VERIFY` | No | Verify SSL certificate (`true` /`false` , default: `true` ) |
2026-06-21 18:00:58 +02:00
| `PORTAINER_DEFAULT_ENDPOINT` | No | Default endpoint ID (default: `1` ) |
| `PORTAINER_TIMEOUT` | No | Request timeout in seconds (default: `30` ) |
| `PORTAINER_LONG_TIMEOUT` | No | Long request timeout in seconds (default: `300` ) |
## Usage
```bash
docker run -d \
--name portainer-mcp \
-p 8110:8110 \
-e PORTAINER_URL=https://portainer.corentic.eu \
2026-06-23 15:09:54 +02:00
-e PORTAINER_API_KEY=ptr_xxx \
-e PORTAINER_TLS_VERIFY=false \
2026-06-21 18:00:58 +02:00
forgejo.corentic.eu/corentic/mcp-fleet-portainer:latest
```
2026-06-23 15:09:54 +02:00
To get an API key: Portainer web UI → click your avatar → Account Settings → Access Tokens → Add token. Give it a name and copy the token immediately (shown once).
2026-06-21 18:23:29 +02:00
2026-06-23 15:09:54 +02:00
## Tools
2026-06-21 18:23:29 +02:00
2026-06-23 15:09:54 +02:00
Auth, endpoints, containers (list, inspect, start/stop/restart, logs, exec, stats), stacks (deploy, update, delete), images, networks, volumes, users (193+ tools).