34 lines
No EOL
1.4 KiB
Markdown
34 lines
No EOL
1.4 KiB
Markdown
# portainer-mcp
|
|
|
|
MCP server for Portainer (Docker/K8s management). Uses API key authentication.
|
|
|
|
Source: [`mcp-portainer`](https://pypi.org/project/mcp-portainer/) (v2.42.0)
|
|
|
|
## Environment Variables
|
|
|
|
| Variable | Required | Description |
|
|
|----------|----------|-------------|
|
|
| `PORTAINER_URL` | Yes | Base URL of the Portainer instance (e.g. `https://portainer.corentic.eu`) |
|
|
| `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`) |
|
|
| `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 \
|
|
-e PORTAINER_API_KEY=ptr_xxx \
|
|
-e PORTAINER_TLS_VERIFY=false \
|
|
forgejo.corentic.eu/corentic/mcp-fleet-portainer:latest
|
|
```
|
|
|
|
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).
|
|
|
|
## Tools
|
|
|
|
Auth, endpoints, containers (list, inspect, start/stop/restart, logs, exec, stats), stacks (deploy, update, delete), images, networks, volumes, users (193+ tools). |