Skip to content

docs(examples): add Traefik Hub Gateway with the Traefik MCP server as a sidecar - #2007

Merged
traefiker merged 12 commits into
traefik:masterfrom
emilevauge:docs/mcp-server-sidecar
Oct 15, 2026
Merged

traefiker merged 12 commits into
traefik:masterfrom
emilevauge:docs/mcp-server-sidecar

Conversation

@emilevauge

@emilevauge emilevauge commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Adds an example to EXAMPLES.md showing how to run the Traefik MCP server (traefik/mcp-server on Docker Hub and GHCR) as a sidecar of the Traefik pod with deployment.additionalContainers, and how to publish it through the Traefik Hub MCP Gateway (hub.mcpgateway.enabled) with a JWT middleware for authentication and an MCP middleware for per-tool authorization.

The example covers the Helm values, the extra Service for port 8090, the two middlewares, the IngressRoute, a quick check, and a warning on why the sidecar must carry no readiness or liveness probe.

Motivation

The MCP server gives an AI agent a live, read-only view of a running Traefik or Traefik Hub gateway. The sidecar behind the MCP Gateway is the deployment model that lets agents reach it without a kubeconfig, with declarative, per-tool authorization. The chart already has everything needed (additionalContainers, hub.token, hub.mcpgateway), so an example is all that is missing.

Verified on kind (Kubernetes v1.36.1) with chart 41.4.0, Traefik Hub v3.21 and traefik/mcp-server:v0.0.1, using exactly the values and manifests of the example: the sidecar accepts the licence from the chart's hub-token volume and reads the live routers over loopback; through the gateway, no token gets 401 with WWW-Authenticate, a foreign group gets Forbidden, traefik-support lists every tool but list_certificates, and traefik-operators can see and call it.

More

  • Yes, I updated the tests accordingly (documentation only)
  • Yes, I updated the schema accordingly (documentation only)
  • Yes, I ran make test and all the tests passed (documentation only; markdownlint on EXAMPLES.md passes with the repo config)

Comment thread EXAMPLES.md Outdated
Comment thread EXAMPLES.md Outdated
Comment thread EXAMPLES.md Outdated
@emilevauge emilevauge changed the title docs(examples): add Traefik Hub MCP Gateway with the Traefik MCP server as a sidecar docs(examples): add Traefik Hub Gateway with the Traefik MCP server as a sidecar Sep 22, 2026
Comment thread EXAMPLES.md Outdated
Comment thread EXAMPLES.md
Comment thread EXAMPLES.md Outdated
Comment thread EXAMPLES.md Outdated
Comment thread EXAMPLES.md Outdated
Comment thread EXAMPLES.md Outdated

@darkweaver87 darkweaver87 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mloiseleur mloiseleur added bot/no-merge area/documentation Improvements or additions to documentation labels Oct 8, 2026
@mloiseleur
mloiseleur force-pushed the docs/mcp-server-sidecar branch from 70e3df2 to 26de68e Compare October 15, 2026 15:16
@traefiker
traefiker merged commit af1aa9e into traefik:master Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants