This release includes 1 breaking change for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
Affected surfaces
ReleasePort's take
Moderate signalPortainer MCP 2.42.1 adds several security‑focused features (auth token, allowlist, audit logging) and changes the development workflow to require PORTAINER_MCP_AUTH_TOKEN for local HTTP requests.
Why it matters: Required bearer auth via PORTAINER_MCP_AUTH_TOKEN now triggers on every HTTP transport request; developers must set this env var for `make dev` or fail authentication.
Summary
AI summaryHTTP transport now mandates bearer-token authentication.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Breaking | High |
Breaks `make dev` to now require PORTAINER_MCP_AUTH_TOKEN for local HTTP loop. Breaks `make dev` to now require PORTAINER_MCP_AUTH_TOKEN for local HTTP loop. Source: llm_adapter@2026-05-26 Confidence: high |
— |
| Feature | High |
Adds required HTTP bearer auth via PORTAINER_MCP_AUTH_TOKEN for http transport. Adds required HTTP bearer auth via PORTAINER_MCP_AUTH_TOKEN for http transport. Source: llm_adapter@2026-05-26 Confidence: high |
— |
| Feature | Medium |
Adds container image docker.io/portainer/portainer-mcp for every release tag. Adds container image docker.io/portainer/portainer-mcp for every release tag. Source: llm_adapter@2026-05-26 Confidence: high |
— |
| Feature | Medium |
Adds DNS‑rebinding allowlist via PORTAINER_MCP_ALLOWED_HOSTS for HTTP transport. Adds DNS‑rebinding allowlist via PORTAINER_MCP_ALLOWED_HOSTS for HTTP transport. Source: llm_adapter@2026-05-26 Confidence: high |
— |
| Feature | Medium |
Adds auth audit log under portainer_mcp.audit for every HTTP auth attempt. Adds auth audit log under portainer_mcp.audit for every HTTP auth attempt. Source: llm_adapter@2026-05-26 Confidence: high |
— |
| Feature | Medium |
Adds selectable log format via PORTAINER_MCP_LOG_FORMAT (text|json). Adds selectable log format via PORTAINER_MCP_LOG_FORMAT (text|json). Source: llm_adapter@2026-05-26 Confidence: high |
— |
| Feature | Low |
Consolidates operator config reference into docs/configuration.md. Consolidates operator config reference into docs/configuration.md. Source: llm_adapter@2026-05-26 Confidence: high |
— |
Full changelog
PyPI: https://pypi.org/project/mcp-portainer/2.42.1/
Docker Hub: https://hub.docker.com/r/portainer/portainer-mcp/tags?name=2.42.1
Targets Portainer 2.42.x. First build to ship a container image alongside the PyPI wheel, and the first release with a bearer-gated HTTP transport.
Added
- Container image at
docker.io/portainer/portainer-mcp, published on everyX.Y.Ztag push from.github/workflows/release-docker.yml. TaggedX.Y.ZandX.Yper release; nolatest. Seedocs/docker.md. - HTTP bearer auth. New
PORTAINER_MCP_AUTH_TOKENenv, required whenPORTAINER_MCP_TRANSPORT=httpand ignored for stdio. Strict validation at startup (min 32 chars, ASCII printable, no whitespace — loud-fail on any defect); constant-time comparison viahmac.compare_digest; masked fingerprint in the startup log, full value never logged. Wired through FastMCP'sTokenVerifierprotocol — FastMCP renders the 401 +WWW-Authenticateresponse on failure. - DNS-rebinding allowlist for the HTTP transport.
PORTAINER_MCP_ALLOWED_HOSTS(default127.0.0.1:*,localhost:*,[::1]:*) validates theHostheader on every request; mismatches return 421 with a body that names the env var. TheOriginallowlist is hardcoded to localhost — programmatic MCP clients omitOriginand pass through. A startup WARNING fires when the bind host is non-loopback while the allowlist is still the localhost defaults, so the "deployed-then-it-421s" case self-diagnoses. - Auth audit log. Every HTTP auth attempt emits a structured record under the
portainer_mcp.auditsub-logger withoutcome,client_ip,user_agent, and the MCPsession_id— joinable against the FastMCP-layerrequest_start/request_successrecords bysession_id. The attempted token is never written. - Selectable log shape.
PORTAINER_MCP_LOG_FORMAT=text|json(defaulttext; container image overrides tojson). Injsonmode, records whose message is itself a JSON object are merged into the envelope, so audit and request records become first-class fields rather than nested strings. - Consolidated operator config reference at
docs/configuration.md, grouped by concern (transport, hardening, profiles, behaviour, logging) with the audit and traceability story documented end-to-end.
Changed
make devnow requiresPORTAINER_MCP_AUTH_TOKEN. Local HTTP dev loop is no longer auth-less — add the token to.envand pass it viaclaude mcp add … --header "Authorization: Bearer <token>".
Full Changelog: https://github.com/portainer/portainer-mcp/compare/2.42.0...2.42.1
Breaking Changes
- When `PORTAINER_MCP_TRANSPORT=http`, the new env var `PORTAINER_MCP_AUTH_TOKEN` is required; missing or invalid token causes startup failure.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
Related context
Beta — feedback welcome: [email protected]