MCP Server for Traefik edge routing, traffic splitting, and NGINX migrations
568
Let your AI assistant manage Traefik v3 on Kubernetes: configure IngressRoutes, weighted canary splits, traffic mirroring, middlewares, TLS options, and TCP/UDP routes, diagnose 404/502/TLS errors, and audit your edge security posture.
latest, 0.2.1linux/amd64, linux/arm64talkops-traefik-mcp-servertraefik:// for structured context discovery/app/skills (browse on GitHub)kubectl inside a minimal non-root image (linux/amd64, linux/arm64). Runs over stdio transport.MCP_ALLOW_WRITE=true.stdio)Use this configuration in Claude Desktop, Cursor, Windsurf, or VS Code (mcp.json / claude_desktop_config.json):
{
"mcpServers": {
"traefik": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/your/kubeconfig:/app/.kube/config:ro",
"-e",
"TRAEFIK_NAMESPACE",
"talkopsai/traefik-mcp-server:latest"
],
"env": {
"TRAEFIK_NAMESPACE": "traefik"
}
}
}
}
Using Claude Code? Register it in one command:
claude mcp add traefik -e TRAEFIK_NAMESPACE=traefik -- docker run -i --rm -v ~/.kube/config:/app/.kube/config:ro -e TRAEFIK_NAMESPACE talkopsai/traefik-mcp-server:latest
Tip: If your kubeconfig references external client certificate files (for example with
minikubeorkind), mount the full~/.kubedirectory (-v /path/to/.kube:/app/.kube:ro) so those files are reachable inside the container.
Restart your MCP client and try asking:
https://shop.example.com/api return a 404?"checkout to the canary service, but show me the preview first."Note: Traefik MCP Server runs over
stdiotransport only (docker run -i --rm).
Out of the box, the container runs in read-only mode (MCP_ALLOW_WRITE=false). To allow mutations (creating, updating, or deleting routes, weighted services, middlewares, and TLS resources), pass -e MCP_ALLOW_WRITE=true to docker run. Even with writes enabled, changes support dry-run previews and destructive operations require explicit confirmation.
| Variable | Container Default | Description |
|---|---|---|
K8S_KUBECONFIG | /app/.kube/config | Path to mounted kubeconfig inside the container |
K8S_CONTEXT | current context | Kubernetes context name to target |
TRAEFIK_NAMESPACE | traefik | Namespace where Traefik runs |
TRAEFIK_API_URL | via Kubernetes | Optional direct URL to the Traefik dashboard/API |
PROMETHEUS_URL | http://prometheus:9090 | Optional Prometheus URL for route traffic metrics |
MCP_ALLOW_WRITE | false | Set to true to enable cluster mutations |
MCP_ALLOWED_NAMESPACES | all | Comma-separated allowlist of namespaces where writes are permitted |
MCP_PROTECTED_NAMESPACES | kube-system,traefik | Namespaces requiring explicit confirmation before changes |
MCP_TOOLSETS | all | Filter tools: traffic, policies, diagnostics, readonly |
| Tool | Access | Description |
|---|---|---|
traefik_analyze_logs | Read | Parse and aggregate Traefik pod access logs (JSON or CLF) or controller logs with automatic secret/token redaction, status/router/latency filtering, and grouped counts. |
traefik_audit_configuration | Read | Run 20 deterministic security, TLS, reliability, hygiene, v3_migration, and gateway_api checks across Traefik static configuration, routes, policies, certificates, and Gateway API... |
traefik_compare_traffic_metrics | Read | Query Prometheus for Traefik service, router, or entrypoint request rate, 4xx/5xx error rate, P50/P95/P99 latency, and open connections across baseline and comparison windows, or c... |
traefik_configure_http_route | Write | Create or update a Traefik v3 HTTP IngressRoute (<= 8 parameters). |
traefik_configure_middleware | Write | Create or update a Traefik v3 HTTP Middleware or TCP MiddlewareTCP (<= 8 parameters). |
traefik_configure_servers_transport | Write | Create or update a Traefik ServersTransport or ServersTransportTCP CRD (<= 8 parameters). |
traefik_configure_tcp_udp_route | Write | Create or update a Traefik IngressRouteTCP or IngressRouteUDP (<= 8 parameters). |
traefik_configure_tls_policy | Write (destructive) | Create or update a Traefik TLSOption policy or default TLSStore (<= 8 parameters). |
traefik_configure_traffic_mirroring | Write (destructive) | Enable, update, or disable shadow traffic mirroring via a TraefikService (<= 8 parameters). |
traefik_configure_weighted_service | Write | Create or update a weighted TraefikService for canary or blue-green traffic splitting, and optionally expose it via an IngressRoute in one call (<= 8 parameters). |
traefik_delete_resource | Write (destructive) | Delete a Traefik custom resource (IngressRoute, IngressRouteTCP, IngressRouteUDP, TraefikService, Middleware, MiddlewareTCP, TLSOption, TLSStore, ServersTransport, ServersTransport... |
traefik_diagnose_route | Read | Perform deep end-to-end health diagnosis of an IngressRoute, IngressRouteTCP, IngressRouteUDP, TraefikService, Ingress, HTTPRoute, GRPCRoute, TLSRoute, TCPRoute, or Gateway across... |
traefik_set_traffic_weights | Write | Shift traffic weights on an existing weighted TraefikService (<= 8 parameters). |
traefik_trace_request | Read | Evaluate which Traefik router matches a synthetic HTTP/TCP request by priority, trace the ordered middleware chain and backend service tree, identify shadowed routers and near-miss... |
traefik_update_route | Write (destructive) | Patch an existing IngressRoute, IngressRouteTCP, or Kubernetes Ingress without restating the full resource (<= 8 parameters). |
This image also ships step-by-step operational playbooks (SKILL.md) under /app/skills:
adopting-traefik-nginx-ingress-providerauditing-traefik-security-postureconfiguring-traefik-middlewaresmanaging-traefik-traffic-routingrouting-traefik-tcp-and-udpsecuring-traefik-tls-and-certificatestroubleshooting-traefik-routingTo copy the skills onto your workstation for Claude Code or Cursor:
docker run --rm --entrypoint tar talkopsai/traefik-mcp-server:latest -C /app/skills -cf - . | tar -xf - -C ~/.claude/skills/
Content type
Image
Digest
sha256:e77beace7…
Size
94.1 MB
Last updated
3 days ago
docker pull talkopsai/traefik-mcp-server