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.
How OAuth works through a tunnel
Two different parties make requests during an OAuth sign-in, and they reach your authorization server by different paths.- The member’s browser is redirected to the authorization endpoint to sign in and approve access. This request comes from the member’s device, so the authorization endpoint must be a URL their browser can load, either on the public internet or on your corporate network. It can’t be a
tunnel.anthropic.comhostname, because tunnel hostnames accept connections only from Claude. - Claude’s servers fetch the authorization server’s metadata, register an OAuth client if the server supports dynamic registration, and exchange the authorization code for tokens at the token endpoint. These requests come from Anthropic’s network, so the endpoints must be reachable from there, either publicly or through the tunnel.
Route the authorization server through the tunnel
Add a route for the authorization server to the proxy configuration, next to the routes for your MCP servers, and apply it as described in Add more servers later.abc123.tunnel.anthropic.com, Claude can now reach the authorization server at https://auth.abc123.tunnel.anthropic.com. For an https:// upstream like this one, also set upstream.tls.ca_file or upstream.tls.include_system_cas in the proxy configuration so the proxy can verify the server’s certificate. See the proxy configuration reference.
Set the Tunnel OAuth configuration
When you add the tunneled MCP server as a custom connector in Organization settings > Connectors, turn on Tunnel OAuth configuration in the connector dialog. The values you enter replace the ones Claude would otherwise read from the authorization server’s metadata. Anthropic enables this option for each organization in the research preview on request, so if the toggle does not appear in the dialog, contact your Anthropic account team.
The paths after the hostname (
/authorize, /oauth/token, and so on) are whatever your authorization server uses. Copy them from its metadata document, usually served at /.well-known/oauth-authorization-server or /.well-known/openid-configuration, and change only the scheme and host.
After you save the connector, connect it yourself from your own connector settings. Your browser should land on your sign-in page, and after you approve access the connector should show as connected. If either step fails, see Troubleshooting.
Publish split metadata instead
If you operate the authorization server and can change the metadata it publishes, you can get the same result without the connector settings by advertising the split yourself. Pointauthorization_endpoint at the browser-reachable hostname and every other endpoint at the tunnel hostname in the authorization server’s /.well-known/oauth-authorization-server document:
/.well-known/oauth-protected-resource document name the tunnel hostname as its authorization server: