From de4c50c8ee1ab2710741d8ab1033f9299745539c Mon Sep 17 00:00:00 2001 From: tobjend Date: Sun, 21 Jun 2026 18:00:58 +0200 Subject: [PATCH] fix: rename pipeline to steps for Woodpecker v3 syntax --- .woodpecker.yml | 2 +- portainer/Dockerfile | 14 ++++++++++++++ portainer/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 portainer/Dockerfile create mode 100644 portainer/README.md diff --git a/.woodpecker.yml b/.woodpecker.yml index bdb6c06..5264d8e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,7 +1,7 @@ when: branch: main -pipeline: +steps: build-forgejo: image: docker:latest volumes: diff --git a/portainer/Dockerfile b/portainer/Dockerfile new file mode 100644 index 0000000..2f7ceb8 --- /dev/null +++ b/portainer/Dockerfile @@ -0,0 +1,14 @@ +FROM node:22-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + python3 python3-pip python3-venv \ + && rm -rf /var/lib/apt/lists/* + +RUN pip3 install --no-cache-dir portainer-mcp && \ + npm install -g mcp-proxy@6.5.2 + +ENV PORTAINER_VERIFY_SSL=false + +EXPOSE 8110 + +CMD ["mcp-proxy", "--port", "8110", "--host", "0.0.0.0", "--", "portainer-mcp"] diff --git a/portainer/README.md b/portainer/README.md new file mode 100644 index 0000000..8a94523 --- /dev/null +++ b/portainer/README.md @@ -0,0 +1,44 @@ +# 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