reference changedagents-and-tools/mcp-tunnels/reference
Nearest release: v2.1.330, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+30added
Lines−30removed
From line
12
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits7to this page, all time
The whole hunk
from line 12, old and new numbered
/
from line 12
1212
1313The [proxy](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/concepts#components) reads its configuration from `/etc/mcp-gateway/config.yaml` (Compose) or the rendered ConfigMap (Helm, populated from `gateway.config.*`).
1414
15| Field | Description | Default |
16| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
17| `listen_addr` | Address and port to listen on. | Required |
18| `log_level` | Logging verbosity: `debug`, `info`, `warn`, or `error`. | `info` |
19| `shutdown_timeout` | How long to wait for in-flight requests during graceful shutdown. | `30s` |
20| `tunnel_domain` | Base domain assigned to the tunnel. When set, route lookup strips this suffix from incoming hostnames so `routes` keys can be bare subdomains (`wiki`). When empty, `routes` keys must be exact full hostnames. | Required when `routes` keys are bare subdomains |
21| `tls.cert_file` | Path to the server TLS certificate. | Required |
22| `tls.key_file` | Path to the server TLS private key. | Required |
23| `routes` | Map of subdomain or full hostname to upstream URL. See [Route matching](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/reference#route-matching). | Required |
24| `upstream.allowed_ips` | IPv4 CIDR ranges or single addresses the proxy is allowed to connect to. Mutually exclusive with `disable_ip_validation`. | RFC1918 private ranges |
25| `upstream.disable_ip_validation` | Disable upstream IP validation entirely. Mutually exclusive with `allowed_ips`. | `false` |
26| `upstream.tls.ca_file` | CA bundle for validating upstream TLS. | None |
27| `upstream.tls.include_system_cas` | Also trust the system CA bundle for upstream TLS. | `false` |
15| Field | Description | Default |
16| ----- | ----- | ----- |
17| `listen_addr` | Address and port to listen on. | Required |
18| `log_level` | Logging verbosity: `debug`, `info`, `warn`, or `error`. | `info` |
19| `shutdown_timeout` | How long to wait for in-flight requests during graceful shutdown. | `30s` |
20| `tunnel_domain` | Base domain assigned to the tunnel. When set, route lookup strips this suffix from incoming hostnames so `routes` keys can be bare subdomains (`wiki`). When empty, `routes` keys must be exact full hostnames. | Required when `routes` keys are bare subdomains |
21| `tls.cert_file` | Path to the server TLS certificate. | Required |
22| `tls.key_file` | Path to the server TLS private key. | Required |
23| `routes` | Map of subdomain or full hostname to upstream URL. See [Route matching](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/reference#route-matching). | Required |
24| `upstream.allowed_ips` | IPv4 CIDR ranges or single addresses the proxy is allowed to connect to. Mutually exclusive with `disable_ip_validation`. | RFC1918 private ranges |
25| `upstream.disable_ip_validation` | Disable upstream IP validation entirely. Mutually exclusive with `allowed_ips`. | `false` |
26| `upstream.tls.ca_file` | CA bundle for validating upstream TLS. | None |
27| `upstream.tls.include_system_cas` | Also trust the system CA bundle for upstream TLS. | `false` |
2828
2929For `https://` upstream routes, set at least one of `upstream.tls.ca_file` or `upstream.tls.include_system_cas`; otherwise the proxy has no trust anchor for the upstream certificate.
3030
from line 48
4848
4949Required headers on every request:
5050
51| Header | Value |
52| ------------------- | ------------------------------------------ |
53| `Authorization` | `Bearer <token>` (the WIF-exchanged token) |
54| `anthropic-version` | `2026-10-21` |
55| `anthropic-beta` | `mcp-tunnels-2026-06-22` |
51| Header | Value |
52| ----- | ----- |
53| `Authorization` | `Bearer <token>` (the WIF-exchanged token) |
54| `anthropic-version` | `2026-10-21` |
55| `anthropic-beta` | `mcp-tunnels-2026-06-22` |
5656
5757## Certificate requirements
5858
from line 90
9090
9191Attaches to an existing tunnel (or creates one when no tunnel ID is supplied), then generates a CA and server certificate, registers the CA, retrieves the tunnel token, and writes all outputs to the destination.
9292
93| Flag | Description | Default |
94| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
95| `--api-url` | Claude API base URL. Also read from `API_URL`. | Required |
96| `--tunnel-id` | Tunnel ID to attach to (`tnl_...`). Also read from `TUNNEL_ID`. When omitted, a new tunnel is created; a tunnel ID already stored in the output is reused on re-runs. | None (create a tunnel) |
97| `--output` | Output destination: `dir:/path` or `k8s-secret:NAME`. The Helm chart passes `k8s-secret:<release>`. | `k8s-secret:mcp-tunnel` (auto-detected when running in a Kubernetes pod; required otherwise) |
98| `--cert-duration` | Server certificate validity period. | `2160h` (90 days) |
99| `--token-version` | Change-detection string. A new value triggers token rotation on re-run. The Helm chart and the Compose example both pass `1` as the initial value. | None |
93| Flag | Description | Default |
94| ----- | ----- | ----- |
95| `--api-url` | Claude API base URL. Also read from `API_URL`. | Required |
96| `--tunnel-id` | Tunnel ID to attach to (`tnl_...`). Also read from `TUNNEL_ID`. When omitted, a new tunnel is created; a tunnel ID already stored in the output is reused on re-runs. | None (create a tunnel) |
97| `--output` | Output destination: `dir:/path` or `k8s-secret:NAME`. The Helm chart passes `k8s-secret:<release>`. | `k8s-secret:mcp-tunnel` (auto-detected when running in a Kubernetes pod; required otherwise) |
98| `--cert-duration` | Server certificate validity period. | `2160h` (90 days) |
99| `--token-version` | Change-detection string. A new value triggers token rotation on re-run. The Helm chart and the Compose example both pass `1` as the initial value. | None |
100100
101101The command authenticates through [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation). It reads `ANTHROPIC_FEDERATION_RULE_ID`, `ANTHROPIC_ORGANIZATION_ID`, `ANTHROPIC_WORKSPACE_ID` (optional), and exactly one of `ANTHROPIC_IDENTITY_TOKEN_FILE` or `ANTHROPIC_IDENTITY_TOKEN`. See the [WIF reference](https://platform.claude.com/docs/en/manage-claude/wif-reference) for the current semantics of these variables; the setup component derives the service account from the federation rule, so it does not require `ANTHROPIC_SERVICE_ACCOUNT_ID` separately.
102102
from line 104
104104
105105Issues a new server certificate signed by the stored CA. Makes no API calls.
106106
107| Flag | Description | Default |
108| ----------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
109| `--output` | Output destination: `dir:/path` or `k8s-secret:NAME`. The Helm chart passes `k8s-secret:<release>`. | `k8s-secret:mcp-tunnel` (auto-detected when running in a Kubernetes pod; required otherwise) |
110| `--cert-duration` | New certificate validity period. | `2160h` (90 days) |
111| `--renew-before` | Skip renewal if the existing certificate has more than this duration remaining. | `0` (always renew) |
107| Flag | Description | Default |
108| ----- | ----- | ----- |
109| `--output` | Output destination: `dir:/path` or `k8s-secret:NAME`. The Helm chart passes `k8s-secret:<release>`. | `k8s-secret:mcp-tunnel` (auto-detected when running in a Kubernetes pod; required otherwise) |
110| `--cert-duration` | New certificate validity period. | `2160h` (90 days) |
111| `--renew-before` | Skip renewal if the existing certificate has more than this duration remaining. | `0` (always renew) |
112112
113113Setting `--renew-before=720h` makes the command a no-op when more than 30 days of validity remain, so it’s safe to run on a fixed schedule.
114114
No line in this hunk matches that.