45 lines
1.6 KiB
Markdown
45 lines
1.6 KiB
Markdown
|
|
# portainer-mcp
|
||
|
|
|
||
|
|
MCP server for interacting with Portainer (Docker/K8s management).
|
||
|
|
|
||
|
|
Source: [`portainer-mcp`](https://pypi.org/project/portainer-mcp/)
|
||
|
|
|
||
|
|
## Environment Variables
|
||
|
|
|
||
|
|
| Variable | Required | Description |
|
||
|
|
|----------|----------|-------------|
|
||
|
|
| `PORTAINER_URL` | Yes | Base URL of the Portainer instance (e.g. `https://portainer.corentic.eu`) |
|
||
|
|
| `PORTAINER_USERNAME` | Yes | Portainer username (use `admin` if using API key) |
|
||
|
|
| `PORTAINER_PASSWORD` | Yes | Portainer password or API key |
|
||
|
|
| `PORTAINER_VERIFY_SSL` | 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_USERNAME=admin \
|
||
|
|
-e PORTAINER_PASSWORD=your_api_key_or_password \
|
||
|
|
-e PORTAINER_VERIFY_SSL=false \
|
||
|
|
forgejo.corentic.eu/corentic/mcp-fleet-portainer:latest
|
||
|
|
```
|
||
|
|
|
||
|
|
## Tools
|
||
|
|
|
||
|
|
- `check_connection` — Verify connection to Portainer
|
||
|
|
- `list_endpoints` — List all environments (Docker/K8s endpoints)
|
||
|
|
- `list_containers` — List Docker containers
|
||
|
|
- `list_images` — List Docker images
|
||
|
|
- `list_volumes` — List Docker volumes
|
||
|
|
- `list_networks` — List Docker networks
|
||
|
|
- `list_stacks` — List Docker stacks (compose)
|
||
|
|
- `system_status` — Portainer system status
|
||
|
|
- Container exec, logs, inspect
|
||
|
|
- Stack create/update/delete
|
||
|
|
- User management
|