Was this page helpful?
MCP tunnels is a Research Preview feature. Request access to try it.
The tunnel architecture provides strong defaults (outbound-only connectivity, end-to-end encryption, and IP validation), but the overall security of your deployment also depends on how you configure and operate it. This page covers recommended hardening, breach response, and how to decommission a tunnel.
upstream.allowed_ips. Use the smallest CIDR ranges that cover your MCP servers. This is the proxy's primary SSRF defense.If you believe your tunnel token, TLS keys, or proxy host has been compromised:
Stop the deployment
Detach the tunneled servers
Remove the tunneled MCP servers from any Managed Agent sessions that use them, and stop passing their URLs in the mcp_servers block of Messages API requests.
Archive the tunnel
Archiving invalidates the tunnel token and detaches the domain. In the Console, archive the tunnel from the MCP tunnels list. To archive over the API instead, see Archive a tunnel.
Contact Anthropic
Report the suspected compromise to Anthropic support.
Rotate downstream credentials
Re-provision a fresh tunnel and rotate any OAuth tokens that the affected MCP servers issued.
Review logs before restoring service
Inspect proxy, cloudflared, and MCP server logs for the window of suspected compromise before bringing the new tunnel online.
Follow these steps to decommission a tunnel and remove all stored credentials.
Stop the deployment
Archive the tunnel
In the Console, archive the tunnel from the MCP tunnels list.
Remove stored credentials