Skip to main content
MCP tunnels are in research preview and are available to organizations on the Claude Enterprise plan by request. To request access, contact your Anthropic account team.
This page covers the full setup of an MCP tunnel for a claude.ai Enterprise organization, from creating the API key that provisioning uses to members calling a tunneled MCP server from Claude. You need the Owner or Primary Owner role in claude.ai, and someone who can deploy containers to a Kubernetes cluster or a Docker host inside your network. Read MCP tunnels first if the tunnel stack, the tunnel domain, and routes are unfamiliar. The deployment steps on this page are reference deployments. You are responsible for adapting them to your organization’s security requirements. For the full set of proxy options, certificate requirements, and hardening guidance, see the MCP tunnels reference and MCP tunnels security pages in the Claude Platform docs. Those pages describe the Claude Console flow, which authenticates the setup component differently. For a claude.ai organization, follow the authentication steps on this page.

Create a Tunnels API key

The setup component that runs alongside the tunnel stack needs a short-lived credential to create the tunnel, register its certificate authority (CA) certificate with Anthropic, and fetch the tunnel token. In claude.ai that credential is a Tunnels API key.
  1. In claude.ai, go to Organization settings > Tunnels. This page appears once Anthropic has enabled MCP tunnels for your organization.
  2. Open Tunnels API and create a key.
  3. Copy the key somewhere safe for the next section. You pass it to the setup component once.
The tunnel stack does not use the key at runtime. Revoke the key as soon as setup completes, and create a fresh one later when you rotate the tunnel token.

Deploy the tunnel stack

Choose Helm if you run Kubernetes. The chart provisions the tunnel, stores the credentials in a Secret, and renews the server certificate automatically. Choose Docker Compose for a single host or a VM, where you run the setup component and certificate renewal yourself. Both paths need at least one route. A route maps a subdomain of your tunnel domain to the internal URL of an MCP server, in the form scheme://host:port with no path. The examples use docs pointing at http://docs-mcp.example.corp:8080. Replace them with your own servers.
1

Fetch the default values

The file includes comments explaining each field.
2

Configure routes

Edit values.yaml and add a routes entry under gateway.config for each MCP server. Leave tunnel.id empty so the setup component creates the tunnel during install.
values.yaml
With these routes, Claude reaches the servers at docs.<your-tunnel-domain> and search.<your-tunnel-domain>. If a route targets an address outside the RFC 1918 private ranges (some managed Kubernetes distributions allocate Service IPs elsewhere), add the range under gateway.config.upstream.allowed_ips as described in Troubleshooting.
3

Review the rendered manifests

Render the chart with a placeholder key and review the output according to your organization’s practices for third-party manifests. Rendering makes no API calls.
4

Install

Read the Tunnels API key into an environment variable so it stays out of your shell history and values file, then install into a dedicated namespace.
The setup component runs as a pre-install hook, so helm install blocks until the tunnel is created, the CA is registered, and the credentials are stored in the mcp-tunnel Secret. If the install fails with a hook error, see Troubleshooting.
Revoke the Tunnels API key in Organization settings > Tunnels > Tunnels API as soon as the install completes. Helm records --set values in its release history Secrets, and Kubernetes Secrets are not encrypted at rest by default, so the key remains recoverable from the cluster until you revoke it.
5

Read the tunnel domain

You need the tunnel domain to add connectors later.
The value looks like abc123.tunnel.anthropic.com.
To restrict the pod’s egress at the network level, set networkPolicy.enabled: true in values.yaml and list your MCP servers under networkPolicy.mcpServers. The policy already allows cloudflared to reach the tunnel edge. Your cluster’s network plugin must support NetworkPolicy.For later configuration changes such as routes or replica count, edit values.yaml and run helm upgrade with the same --version and -f values.yaml, without the API key. Keep a complete values.yaml rather than relying on --reuse-values, because Helm’s deep merge can silently keep a route you deleted.

Verify the connection

Check the logs on your side first. cloudflared logs four Registered tunnel connection lines when it has reached the tunnel edge, and the proxy logs one route configured line per route.
The containers take a few seconds to start, so rerun the commands if they come back empty. If cloudflared never registers, see Troubleshooting. The end-to-end check happens from Claude, in the next section.

Add tunneled servers as connectors

Each route becomes a custom connector for your organization. The connector URL is the route’s tunnel hostname plus the path your MCP server serves. Many servers serve at /mcp, and the proxy forwards the path unchanged.
  1. In claude.ai, go to Organization settings > Connectors.
  2. Select Add, then Custom. If Claude asks for the connector type, choose Web.
  3. Enter the server URL, for example https://docs.abc123.tunnel.anthropic.com/mcp.
  4. Configure authentication for the server. If its OAuth authorization server is also inside your network, turn on Tunnel OAuth configuration and follow Authenticate to MCP servers behind a tunnel.
  5. Select Add.
Members then find the connector in their own connector settings and select Connect to sign in, as described in Third party connectors with remote MCP. To confirm the tunnel end to end, connect the server yourself and ask Claude to use one of its tools while you watch the proxy logs for the request.

Add more servers later

Add a route for the new server, apply the change, and register the new hostname as another custom connector. No certificate or cloudflared changes are needed, because the server certificate covers every subdomain of your tunnel domain.

Rotate credentials

Three credentials are involved, and each rotates differently. Tunnels API key. Used only while the setup component runs. Revoke it after every use and create a new one in Organization settings > Tunnels > Tunnels API when you next need to run setup. Tunnel token. Authenticates cloudflared’s outbound connection. Rotate it on your regular schedule and immediately if you suspect exposure. Rotation does not sever connections that are already established, so you can rotate, restart cloudflared with the new value, and let the old connections drain.
Increment tunnel.tokenVersion in values.yaml, create a fresh Tunnels API key, and upgrade. The setup component re-runs, rotates the token, and updates the Secret.
Revoke the API key once the upgrade completes.
Server certificate. The certificate the proxy presents is valid for 90 days, and you are responsible for renewing it before it expires. Renewal is local. It signs a new certificate with the CA already stored in your deployment, makes no API calls, and needs no API key. The proxy reloads the certificate file automatically, so no restart is required.
The chart deploys a CronJob that runs daily and renews the certificate once it is within 30 days of expiry. Monitor the CronJob and the certificate’s expiry date to confirm renewal completes.

Remove a tunnel

Decommission a tunnel when you no longer need it, or as the first steps of responding to a suspected compromise. Archiving a tunnel invalidates its token, detaches its domain, and is permanent.
1

Record the tunnel ID

2

Stop the tunnel stack

If you are responding to a suspected compromise, use docker compose down --timeout 0 to sever the connection immediately.
3

Remove the connectors

In Organization settings > Connectors, remove each custom connector that points at the tunnel’s hostnames.
4

Archive the tunnel

Create a fresh Tunnels API key and call the archive endpoint of the Tunnels API. Revoke the key when you are done.
5

Delete the stored credentials

If you archived the tunnel because of a suspected compromise, also notify your Anthropic account team, rotate any OAuth tokens or secrets your MCP servers issued, and review the proxy, cloudflared, and MCP server logs for the affected period before you provision a replacement tunnel.