Repository Public
1---2title: Tunnels3url: https://platform.claude.com/docs/en/api/beta/tunnels4---56# Tunnels78## Create Tunnel910**POST** `/v1/tunnels`1112The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.1314Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; it is not idempotent. The new tunnel rejects MCP traffic until at least one CA certificate is added.1516### Headers1718- `"anthropic-beta": optional array of AnthropicBeta`1920 Optional header to specify the beta version(s) you want to use.2122 - `string`2324 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2526 - `"message-batches-2024-09-24"`2728 - `"prompt-caching-2024-07-31"`2930 - `"computer-use-2024-10-22"`3132 - `"computer-use-2025-01-24"`3334 - `"pdfs-2024-09-25"`3536 - `"token-counting-2024-11-01"`3738 - `"token-efficient-tools-2025-02-19"`3940 - `"output-128k-2025-02-19"`4142 - `"files-api-2025-04-14"`4344 - `"mcp-client-2025-04-04"`4546 - `"mcp-client-2025-11-20"`4748 - `"dev-full-thinking-2025-05-14"`4950 - `"interleaved-thinking-2025-05-14"`5152 - `"code-execution-2025-05-22"`5354 - `"extended-cache-ttl-2025-04-11"`5556 - `"context-1m-2025-08-07"`5758 - `"context-management-2025-06-27"`5960 - `"model-context-window-exceeded-2025-08-26"`6162 - `"skills-2025-10-02"`6364 - `"fast-mode-2026-02-01"`6566 - `"output-300k-2026-03-24"`6768 - `"user-profiles-2026-03-24"`6970 - `"user-profiles-2026-08-18"`7172 - `"user-profiles-2026-09-04"`7374 - `"advisor-tool-2026-03-01"`7576 - `"managed-agents-2026-04-01"`7778 - `"cache-diagnosis-2026-04-07"`7980 - `"dreaming-2026-04-21"`8182 - `"thinking-token-count-2026-05-13"`8384 - `"server-side-fallback-2026-06-01"`8586 - `"server-side-fallback-2026-07-01"`8788 - `"fallback-credit-2026-06-01"`8990 - `"fallback-credit-2026-07-01"`9192 - `"agent-memory-2026-07-22"`9394 - `"mid-conversation-tool-changes-2026-07-01"`9596 - `"compact-2026-01-12"`9798 - `"computer-use-2025-11-24"`99100 - `"mcp-tunnels-2026-06-22"`101102 - `"structured-outputs-2025-11-13"`103104 - `"task-budgets-2026-03-13"`105106 - `"thinking-display-updates-2026-08-18"`107108 - `"ce-user-management-2026-07-13"`109110 - `"mid-conversation-output-config-2026-07-01"`111112 - `"thinking-binding-controls-2026-08-01"`113114 - `"mid-conversation-system-clear-at-2026-08-21"`115116 - `"compact-2026-09-04"`117118- `"anthropic-workspace-id": optional string`119120### Body parameters121122- `display_name: optional string or null`123124 Optional human-readable name for the tunnel (1-255 characters).125126 minLength: 1, maxLength: 255127128### Returns129130- `BetaTunnel object`131132 An MCP tunnel.133134 - `type: "tunnel"`135136 - `id: string`137138 Unique identifier for the tunnel, prefixed with `tnl_`.139140 - `archived_at: string or null`141142 A timestamp in RFC 3339 format143144 format: date-time145146 - `created_at: string`147148 A timestamp in RFC 3339 format149150 format: date-time151152 - `display_name: string or null`153154 Human-readable name for the tunnel (1-255 characters). Null if unset.155156 - `domain: string`157158 Anthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.159160### Example161162```bash163curl https://api.anthropic.com/v1/tunnels \164 -H 'Content-Type: application/json' \165 -H 'anthropic-version: 2023-06-01' \166 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \167 -H "X-Api-Key: $ANTHROPIC_API_KEY" \168 -d '{}'169```170171#### Response (200)172173```json174{175 "id": "id",176 "archived_at": "2019-12-27T18:11:19.117Z",177 "created_at": "2019-12-27T18:11:19.117Z",178 "display_name": "display_name",179 "domain": "domain",180 "type": "tunnel"181}182```183184## Get Tunnel185186**GET** `/v1/tunnels/{tunnel_id}`187188The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.189190Fetches a tunnel by ID.191192### Path parameters193194- `tunnel_id: string`195196### Headers197198- `"anthropic-beta": optional array of AnthropicBeta`199200 Optional header to specify the beta version(s) you want to use.201202 - `string`203204 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`205206 - `"message-batches-2024-09-24"`207208 - `"prompt-caching-2024-07-31"`209210 - `"computer-use-2024-10-22"`211212 - `"computer-use-2025-01-24"`213214 - `"pdfs-2024-09-25"`215216 - `"token-counting-2024-11-01"`217218 - `"token-efficient-tools-2025-02-19"`219220 - `"output-128k-2025-02-19"`221222 - `"files-api-2025-04-14"`223224 - `"mcp-client-2025-04-04"`225226 - `"mcp-client-2025-11-20"`227228 - `"dev-full-thinking-2025-05-14"`229230 - `"interleaved-thinking-2025-05-14"`231232 - `"code-execution-2025-05-22"`233234 - `"extended-cache-ttl-2025-04-11"`235236 - `"context-1m-2025-08-07"`237238 - `"context-management-2025-06-27"`239240 - `"model-context-window-exceeded-2025-08-26"`241242 - `"skills-2025-10-02"`243244 - `"fast-mode-2026-02-01"`245246 - `"output-300k-2026-03-24"`247248 - `"user-profiles-2026-03-24"`249250 - `"user-profiles-2026-08-18"`251252 - `"user-profiles-2026-09-04"`253254 - `"advisor-tool-2026-03-01"`255256 - `"managed-agents-2026-04-01"`257258 - `"cache-diagnosis-2026-04-07"`259260 - `"dreaming-2026-04-21"`261262 - `"thinking-token-count-2026-05-13"`263264 - `"server-side-fallback-2026-06-01"`265266 - `"server-side-fallback-2026-07-01"`267268 - `"fallback-credit-2026-06-01"`269270 - `"fallback-credit-2026-07-01"`271272 - `"agent-memory-2026-07-22"`273274 - `"mid-conversation-tool-changes-2026-07-01"`275276 - `"compact-2026-01-12"`277278 - `"computer-use-2025-11-24"`279280 - `"mcp-tunnels-2026-06-22"`281282 - `"structured-outputs-2025-11-13"`283284 - `"task-budgets-2026-03-13"`285286 - `"thinking-display-updates-2026-08-18"`287288 - `"ce-user-management-2026-07-13"`289290 - `"mid-conversation-output-config-2026-07-01"`291292 - `"thinking-binding-controls-2026-08-01"`293294 - `"mid-conversation-system-clear-at-2026-08-21"`295296 - `"compact-2026-09-04"`297298- `"anthropic-workspace-id": optional string`299300### Returns301302- `BetaTunnel object`303304 An MCP tunnel.305306 - `type: "tunnel"`307308 - `id: string`309310 Unique identifier for the tunnel, prefixed with `tnl_`.311312 - `archived_at: string or null`313314 A timestamp in RFC 3339 format315316 format: date-time317318 - `created_at: string`319320 A timestamp in RFC 3339 format321322 format: date-time323324 - `display_name: string or null`325326 Human-readable name for the tunnel (1-255 characters). Null if unset.327328 - `domain: string`329330 Anthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.331332### Example333334```bash335curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID \336 -H 'anthropic-version: 2023-06-01' \337 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \338 -H "X-Api-Key: $ANTHROPIC_API_KEY"339```340341#### Response (200)342343```json344{345 "id": "id",346 "archived_at": "2019-12-27T18:11:19.117Z",347 "created_at": "2019-12-27T18:11:19.117Z",348 "display_name": "display_name",349 "domain": "domain",350 "type": "tunnel"351}352```353354## List Tunnels355356**GET** `/v1/tunnels`357358The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.359360Lists tunnels. Results are ordered by creation time, newest first; archived tunnels are excluded unless include_archived is set.361362### Query parameters363364- `include_archived: optional boolean`365366 Whether to include archived tunnels in the results. Defaults to false.367368- `limit: optional number`369370 Maximum number of tunnels to return per page. Defaults to 20, maximum 1000.371372 format: int32373374- `page: optional string`375376 Opaque pagination cursor from a previous `list_tunnels` response.377378### Headers379380- `"anthropic-beta": optional array of AnthropicBeta`381382 Optional header to specify the beta version(s) you want to use.383384 - `string`385386 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`387388 - `"message-batches-2024-09-24"`389390 - `"prompt-caching-2024-07-31"`391392 - `"computer-use-2024-10-22"`393394 - `"computer-use-2025-01-24"`395396 - `"pdfs-2024-09-25"`397398 - `"token-counting-2024-11-01"`399400 - `"token-efficient-tools-2025-02-19"`401402 - `"output-128k-2025-02-19"`403404 - `"files-api-2025-04-14"`405406 - `"mcp-client-2025-04-04"`407408 - `"mcp-client-2025-11-20"`409410 - `"dev-full-thinking-2025-05-14"`411412 - `"interleaved-thinking-2025-05-14"`413414 - `"code-execution-2025-05-22"`415416 - `"extended-cache-ttl-2025-04-11"`417418 - `"context-1m-2025-08-07"`419420 - `"context-management-2025-06-27"`421422 - `"model-context-window-exceeded-2025-08-26"`423424 - `"skills-2025-10-02"`425426 - `"fast-mode-2026-02-01"`427428 - `"output-300k-2026-03-24"`429430 - `"user-profiles-2026-03-24"`431432 - `"user-profiles-2026-08-18"`433434 - `"user-profiles-2026-09-04"`435436 - `"advisor-tool-2026-03-01"`437438 - `"managed-agents-2026-04-01"`439440 - `"cache-diagnosis-2026-04-07"`441442 - `"dreaming-2026-04-21"`443444 - `"thinking-token-count-2026-05-13"`445446 - `"server-side-fallback-2026-06-01"`447448 - `"server-side-fallback-2026-07-01"`449450 - `"fallback-credit-2026-06-01"`451452 - `"fallback-credit-2026-07-01"`453454 - `"agent-memory-2026-07-22"`455456 - `"mid-conversation-tool-changes-2026-07-01"`457458 - `"compact-2026-01-12"`459460 - `"computer-use-2025-11-24"`461462 - `"mcp-tunnels-2026-06-22"`463464 - `"structured-outputs-2025-11-13"`465466 - `"task-budgets-2026-03-13"`467468 - `"thinking-display-updates-2026-08-18"`469470 - `"ce-user-management-2026-07-13"`471472 - `"mid-conversation-output-config-2026-07-01"`473474 - `"thinking-binding-controls-2026-08-01"`475476 - `"mid-conversation-system-clear-at-2026-08-21"`477478 - `"compact-2026-09-04"`479480- `"anthropic-workspace-id": optional string`481482### Returns483484- `data: array of BetaTunnel`485486 List of tunnels, ordered by created_at descending.487488 - `type: "tunnel"`489490 - `id: string`491492 Unique identifier for the tunnel, prefixed with `tnl_`.493494 - `archived_at: string or null`495496 A timestamp in RFC 3339 format497498 format: date-time499500 - `created_at: string`501502 A timestamp in RFC 3339 format503504 format: date-time505506 - `display_name: string or null`507508 Human-readable name for the tunnel (1-255 characters). Null if unset.509510 - `domain: string`511512 Anthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.513514- `next_page: string or null`515516 Pagination cursor for the next page, or null if no more results.517518### Example519520```bash521curl https://api.anthropic.com/v1/tunnels \522 -H 'anthropic-version: 2023-06-01' \523 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \524 -H "X-Api-Key: $ANTHROPIC_API_KEY"525```526527#### Response (200)528529```json530{531 "data": [532 {533 "id": "id",534 "archived_at": "2019-12-27T18:11:19.117Z",535 "created_at": "2019-12-27T18:11:19.117Z",536 "display_name": "display_name",537 "domain": "domain",538 "type": "tunnel"539 }540 ],541 "next_page": "next_page"542}543```544545## Archive Tunnel546547**POST** `/v1/tunnels/{tunnel_id}/archive`548549The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.550551Archives a tunnel. Archival is irreversible: every non-archived certificate on the tunnel is archived in the same operation, the hostname is retired and never re-allocated, and the tunnel token is invalidated. Retrying against an already-archived tunnel returns the existing record unchanged.552553### Path parameters554555- `tunnel_id: string`556557### Headers558559- `"anthropic-beta": optional array of AnthropicBeta`560561 Optional header to specify the beta version(s) you want to use.562563 - `string`564565 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`566567 - `"message-batches-2024-09-24"`568569 - `"prompt-caching-2024-07-31"`570571 - `"computer-use-2024-10-22"`572573 - `"computer-use-2025-01-24"`574575 - `"pdfs-2024-09-25"`576577 - `"token-counting-2024-11-01"`578579 - `"token-efficient-tools-2025-02-19"`580581 - `"output-128k-2025-02-19"`582583 - `"files-api-2025-04-14"`584585 - `"mcp-client-2025-04-04"`586587 - `"mcp-client-2025-11-20"`588589 - `"dev-full-thinking-2025-05-14"`590591 - `"interleaved-thinking-2025-05-14"`592593 - `"code-execution-2025-05-22"`594595 - `"extended-cache-ttl-2025-04-11"`596597 - `"context-1m-2025-08-07"`598599 - `"context-management-2025-06-27"`600601 - `"model-context-window-exceeded-2025-08-26"`602603 - `"skills-2025-10-02"`604605 - `"fast-mode-2026-02-01"`606607 - `"output-300k-2026-03-24"`608609 - `"user-profiles-2026-03-24"`610611 - `"user-profiles-2026-08-18"`612613 - `"user-profiles-2026-09-04"`614615 - `"advisor-tool-2026-03-01"`616617 - `"managed-agents-2026-04-01"`618619 - `"cache-diagnosis-2026-04-07"`620621 - `"dreaming-2026-04-21"`622623 - `"thinking-token-count-2026-05-13"`624625 - `"server-side-fallback-2026-06-01"`626627 - `"server-side-fallback-2026-07-01"`628629 - `"fallback-credit-2026-06-01"`630631 - `"fallback-credit-2026-07-01"`632633 - `"agent-memory-2026-07-22"`634635 - `"mid-conversation-tool-changes-2026-07-01"`636637 - `"compact-2026-01-12"`638639 - `"computer-use-2025-11-24"`640641 - `"mcp-tunnels-2026-06-22"`642643 - `"structured-outputs-2025-11-13"`644645 - `"task-budgets-2026-03-13"`646647 - `"thinking-display-updates-2026-08-18"`648649 - `"ce-user-management-2026-07-13"`650651 - `"mid-conversation-output-config-2026-07-01"`652653 - `"thinking-binding-controls-2026-08-01"`654655 - `"mid-conversation-system-clear-at-2026-08-21"`656657 - `"compact-2026-09-04"`658659- `"anthropic-workspace-id": optional string`660661### Returns662663- `BetaTunnel object`664665 An MCP tunnel.666667 - `type: "tunnel"`668669 - `id: string`670671 Unique identifier for the tunnel, prefixed with `tnl_`.672673 - `archived_at: string or null`674675 A timestamp in RFC 3339 format676677 format: date-time678679 - `created_at: string`680681 A timestamp in RFC 3339 format682683 format: date-time684685 - `display_name: string or null`686687 Human-readable name for the tunnel (1-255 characters). Null if unset.688689 - `domain: string`690691 Anthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.692693### Example694695```bash696curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/archive \697 -X POST \698 -H 'anthropic-version: 2023-06-01' \699 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \700 -H "X-Api-Key: $ANTHROPIC_API_KEY"701```702703#### Response (200)704705```json706{707 "id": "id",708 "archived_at": "2019-12-27T18:11:19.117Z",709 "created_at": "2019-12-27T18:11:19.117Z",710 "display_name": "display_name",711 "domain": "domain",712 "type": "tunnel"713}714```715716## Reveal Tunnel Token717718**POST** `/v1/tunnels/{tunnel_id}/reveal_token`719720The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.721722Reveals a tunnel's connector token. The value is fetched live on each call; Anthropic does not store it. Repeated calls return the same value until the token is rotated. Exposed as POST so the token does not appear in intermediary access logs.723724### Path parameters725726- `tunnel_id: string`727728### Headers729730- `"anthropic-beta": optional array of AnthropicBeta`731732 Optional header to specify the beta version(s) you want to use.733734 - `string`735736 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`737738 - `"message-batches-2024-09-24"`739740 - `"prompt-caching-2024-07-31"`741742 - `"computer-use-2024-10-22"`743744 - `"computer-use-2025-01-24"`745746 - `"pdfs-2024-09-25"`747748 - `"token-counting-2024-11-01"`749750 - `"token-efficient-tools-2025-02-19"`751752 - `"output-128k-2025-02-19"`753754 - `"files-api-2025-04-14"`755756 - `"mcp-client-2025-04-04"`757758 - `"mcp-client-2025-11-20"`759760 - `"dev-full-thinking-2025-05-14"`761762 - `"interleaved-thinking-2025-05-14"`763764 - `"code-execution-2025-05-22"`765766 - `"extended-cache-ttl-2025-04-11"`767768 - `"context-1m-2025-08-07"`769770 - `"context-management-2025-06-27"`771772 - `"model-context-window-exceeded-2025-08-26"`773774 - `"skills-2025-10-02"`775776 - `"fast-mode-2026-02-01"`777778 - `"output-300k-2026-03-24"`779780 - `"user-profiles-2026-03-24"`781782 - `"user-profiles-2026-08-18"`783784 - `"user-profiles-2026-09-04"`785786 - `"advisor-tool-2026-03-01"`787788 - `"managed-agents-2026-04-01"`789790 - `"cache-diagnosis-2026-04-07"`791792 - `"dreaming-2026-04-21"`793794 - `"thinking-token-count-2026-05-13"`795796 - `"server-side-fallback-2026-06-01"`797798 - `"server-side-fallback-2026-07-01"`799800 - `"fallback-credit-2026-06-01"`801802 - `"fallback-credit-2026-07-01"`803804 - `"agent-memory-2026-07-22"`805806 - `"mid-conversation-tool-changes-2026-07-01"`807808 - `"compact-2026-01-12"`809810 - `"computer-use-2025-11-24"`811812 - `"mcp-tunnels-2026-06-22"`813814 - `"structured-outputs-2025-11-13"`815816 - `"task-budgets-2026-03-13"`817818 - `"thinking-display-updates-2026-08-18"`819820 - `"ce-user-management-2026-07-13"`821822 - `"mid-conversation-output-config-2026-07-01"`823824 - `"thinking-binding-controls-2026-08-01"`825826 - `"mid-conversation-system-clear-at-2026-08-21"`827828 - `"compact-2026-09-04"`829830- `"anthropic-workspace-id": optional string`831832### Returns833834- `BetaTunnelToken object`835836 A tunnel's connector token.837838 - `type: "tunnel_token"`839840 - `id: string`841842 Stable identifier for the current token value. Changes when the token is rotated.843844 - `tunnel_token: string`845846 The connector token used to run the tunnel. Treat as a credential.847848### Example849850```bash851curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/reveal_token \852 -X POST \853 -H 'anthropic-version: 2023-06-01' \854 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \855 -H "X-Api-Key: $ANTHROPIC_API_KEY"856```857858#### Response (200)859860```json861{862 "id": "id",863 "tunnel_token": "tunnel_token",864 "type": "tunnel_token"865}866```867868## Rotate Tunnel Token869870**POST** `/v1/tunnels/{tunnel_id}/rotate_token`871872The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.873874Rotates a tunnel's connector token. Rotation invalidates the current token for new connections and returns a fresh value; established connections are not severed. A connector restarted after rotation must use the new value.875876### Path parameters877878- `tunnel_id: string`879880### Headers881882- `"anthropic-beta": optional array of AnthropicBeta`883884 Optional header to specify the beta version(s) you want to use.885886 - `string`887888 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`889890 - `"message-batches-2024-09-24"`891892 - `"prompt-caching-2024-07-31"`893894 - `"computer-use-2024-10-22"`895896 - `"computer-use-2025-01-24"`897898 - `"pdfs-2024-09-25"`899900 - `"token-counting-2024-11-01"`901902 - `"token-efficient-tools-2025-02-19"`903904 - `"output-128k-2025-02-19"`905906 - `"files-api-2025-04-14"`907908 - `"mcp-client-2025-04-04"`909910 - `"mcp-client-2025-11-20"`911912 - `"dev-full-thinking-2025-05-14"`913914 - `"interleaved-thinking-2025-05-14"`915916 - `"code-execution-2025-05-22"`917918 - `"extended-cache-ttl-2025-04-11"`919920 - `"context-1m-2025-08-07"`921922 - `"context-management-2025-06-27"`923924 - `"model-context-window-exceeded-2025-08-26"`925926 - `"skills-2025-10-02"`927928 - `"fast-mode-2026-02-01"`929930 - `"output-300k-2026-03-24"`931932 - `"user-profiles-2026-03-24"`933934 - `"user-profiles-2026-08-18"`935936 - `"user-profiles-2026-09-04"`937938 - `"advisor-tool-2026-03-01"`939940 - `"managed-agents-2026-04-01"`941942 - `"cache-diagnosis-2026-04-07"`943944 - `"dreaming-2026-04-21"`945946 - `"thinking-token-count-2026-05-13"`947948 - `"server-side-fallback-2026-06-01"`949950 - `"server-side-fallback-2026-07-01"`951952 - `"fallback-credit-2026-06-01"`953954 - `"fallback-credit-2026-07-01"`955956 - `"agent-memory-2026-07-22"`957958 - `"mid-conversation-tool-changes-2026-07-01"`959960 - `"compact-2026-01-12"`961962 - `"computer-use-2025-11-24"`963964 - `"mcp-tunnels-2026-06-22"`965966 - `"structured-outputs-2025-11-13"`967968 - `"task-budgets-2026-03-13"`969970 - `"thinking-display-updates-2026-08-18"`971972 - `"ce-user-management-2026-07-13"`973974 - `"mid-conversation-output-config-2026-07-01"`975976 - `"thinking-binding-controls-2026-08-01"`977978 - `"mid-conversation-system-clear-at-2026-08-21"`979980 - `"compact-2026-09-04"`981982- `"anthropic-workspace-id": optional string`983984### Body parameters985986- `reason: optional string or null`987988 Optional free-text reason for the rotation, recorded for audit.989990 maxLength: 1024991992### Returns993994- `BetaTunnelToken object`995996 A tunnel's connector token.997998 - `type: "tunnel_token"`9991000 - `id: string`10011002 Stable identifier for the current token value. Changes when the token is rotated.10031004 - `tunnel_token: string`10051006 The connector token used to run the tunnel. Treat as a credential.10071008### Example10091010```bash1011curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/rotate_token \1012 -H 'Content-Type: application/json' \1013 -H 'anthropic-version: 2023-06-01' \1014 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \1015 -H "X-Api-Key: $ANTHROPIC_API_KEY" \1016 -d '{}'1017```10181019#### Response (200)10201021```json1022{1023 "id": "id",1024 "tunnel_token": "tunnel_token",1025 "type": "tunnel_token"1026}1027```10281029## Domain types10301031### Beta Tunnel10321033- `BetaTunnel object`10341035 An MCP tunnel.10361037 - `type: "tunnel"`10381039 - `id: string`10401041 Unique identifier for the tunnel, prefixed with `tnl_`.10421043 - `archived_at: string or null`10441045 A timestamp in RFC 3339 format10461047 format: date-time10481049 - `created_at: string`10501051 A timestamp in RFC 3339 format10521053 format: date-time10541055 - `display_name: string or null`10561057 Human-readable name for the tunnel (1-255 characters). Null if unset.10581059 - `domain: string`10601061 Anthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.10621063### Beta Tunnel Token10641065- `BetaTunnelToken object`10661067 A tunnel's connector token.10681069 - `type: "tunnel_token"`10701071 - `id: string`10721073 Stable identifier for the current token value. Changes when the token is rotated.10741075 - `tunnel_token: string`10761077 The connector token used to run the tunnel. Treat as a credential.10781079## Tunnels › Certificates10801081### Create Tunnel Certificate10821083**POST** `/v1/tunnels/{tunnel_id}/certificates`10841085The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.10861087Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's server certificate against this CA when it terminates the inner TLS session. A tunnel holds at most two non-archived certificates.10881089#### Path parameters10901091- `tunnel_id: string`10921093#### Headers10941095- `"anthropic-beta": optional array of AnthropicBeta`10961097 Optional header to specify the beta version(s) you want to use.10981099 - `string`11001101 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`11021103 - `"message-batches-2024-09-24"`11041105 - `"prompt-caching-2024-07-31"`11061107 - `"computer-use-2024-10-22"`11081109 - `"computer-use-2025-01-24"`11101111 - `"pdfs-2024-09-25"`11121113 - `"token-counting-2024-11-01"`11141115 - `"token-efficient-tools-2025-02-19"`11161117 - `"output-128k-2025-02-19"`11181119 - `"files-api-2025-04-14"`11201121 - `"mcp-client-2025-04-04"`11221123 - `"mcp-client-2025-11-20"`11241125 - `"dev-full-thinking-2025-05-14"`11261127 - `"interleaved-thinking-2025-05-14"`11281129 - `"code-execution-2025-05-22"`11301131 - `"extended-cache-ttl-2025-04-11"`11321133 - `"context-1m-2025-08-07"`11341135 - `"context-management-2025-06-27"`11361137 - `"model-context-window-exceeded-2025-08-26"`11381139 - `"skills-2025-10-02"`11401141 - `"fast-mode-2026-02-01"`11421143 - `"output-300k-2026-03-24"`11441145 - `"user-profiles-2026-03-24"`11461147 - `"user-profiles-2026-08-18"`11481149 - `"user-profiles-2026-09-04"`11501151 - `"advisor-tool-2026-03-01"`11521153 - `"managed-agents-2026-04-01"`11541155 - `"cache-diagnosis-2026-04-07"`11561157 - `"dreaming-2026-04-21"`11581159 - `"thinking-token-count-2026-05-13"`11601161 - `"server-side-fallback-2026-06-01"`11621163 - `"server-side-fallback-2026-07-01"`11641165 - `"fallback-credit-2026-06-01"`11661167 - `"fallback-credit-2026-07-01"`11681169 - `"agent-memory-2026-07-22"`11701171 - `"mid-conversation-tool-changes-2026-07-01"`11721173 - `"compact-2026-01-12"`11741175 - `"computer-use-2025-11-24"`11761177 - `"mcp-tunnels-2026-06-22"`11781179 - `"structured-outputs-2025-11-13"`11801181 - `"task-budgets-2026-03-13"`11821183 - `"thinking-display-updates-2026-08-18"`11841185 - `"ce-user-management-2026-07-13"`11861187 - `"mid-conversation-output-config-2026-07-01"`11881189 - `"thinking-binding-controls-2026-08-01"`11901191 - `"mid-conversation-system-clear-at-2026-08-21"`11921193 - `"compact-2026-09-04"`11941195- `"anthropic-workspace-id": optional string`11961197#### Body parameters11981199- `ca_certificate_pem: string`12001201 PEM-encoded X.509 CA certificate. Must contain exactly one certificate and no private-key material. Maximum 8KB.12021203 maxLength: 819212041205#### Returns12061207- `BetaTunnelCertificate object`12081209 A CA certificate attached to a tunnel.12101211 - `type: "tunnel_certificate"`12121213 - `id: string`12141215 Unique identifier for the certificate, prefixed with `tcrt_`.12161217 - `archived_at: string or null`12181219 A timestamp in RFC 3339 format12201221 format: date-time12221223 - `created_at: string`12241225 A timestamp in RFC 3339 format12261227 format: date-time12281229 - `expires_at: string or null`12301231 A timestamp in RFC 3339 format12321233 format: date-time12341235 - `fingerprint: string`12361237 Lowercase hex SHA-256 fingerprint of the certificate's DER encoding.12381239 - `tunnel_id: string`12401241 ID of the tunnel the certificate is registered against.12421243#### Example12441245```bash1246curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates \1247 -H 'Content-Type: application/json' \1248 -H 'anthropic-version: 2023-06-01' \1249 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \1250 -H "X-Api-Key: $ANTHROPIC_API_KEY" \1251 -d '{1252 "ca_certificate_pem": "ca_certificate_pem"1253 }'1254```12551256##### Response (200)12571258```json1259{1260 "id": "id",1261 "archived_at": "2019-12-27T18:11:19.117Z",1262 "created_at": "2019-12-27T18:11:19.117Z",1263 "expires_at": "2019-12-27T18:11:19.117Z",1264 "fingerprint": "fingerprint",1265 "tunnel_id": "tunnel_id",1266 "type": "tunnel_certificate"1267}1268```12691270### Get Tunnel Certificate12711272**GET** `/v1/tunnels/{tunnel_id}/certificates/{certificate_id}`12731274The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.12751276Fetches a tunnel certificate by ID.12771278#### Path parameters12791280- `tunnel_id: string`12811282- `certificate_id: string`12831284#### Headers12851286- `"anthropic-beta": optional array of AnthropicBeta`12871288 Optional header to specify the beta version(s) you want to use.12891290 - `string`12911292 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`12931294 - `"message-batches-2024-09-24"`12951296 - `"prompt-caching-2024-07-31"`12971298 - `"computer-use-2024-10-22"`12991300 - `"computer-use-2025-01-24"`13011302 - `"pdfs-2024-09-25"`13031304 - `"token-counting-2024-11-01"`13051306 - `"token-efficient-tools-2025-02-19"`13071308 - `"output-128k-2025-02-19"`13091310 - `"files-api-2025-04-14"`13111312 - `"mcp-client-2025-04-04"`13131314 - `"mcp-client-2025-11-20"`13151316 - `"dev-full-thinking-2025-05-14"`13171318 - `"interleaved-thinking-2025-05-14"`13191320 - `"code-execution-2025-05-22"`13211322 - `"extended-cache-ttl-2025-04-11"`13231324 - `"context-1m-2025-08-07"`13251326 - `"context-management-2025-06-27"`13271328 - `"model-context-window-exceeded-2025-08-26"`13291330 - `"skills-2025-10-02"`13311332 - `"fast-mode-2026-02-01"`13331334 - `"output-300k-2026-03-24"`13351336 - `"user-profiles-2026-03-24"`13371338 - `"user-profiles-2026-08-18"`13391340 - `"user-profiles-2026-09-04"`13411342 - `"advisor-tool-2026-03-01"`13431344 - `"managed-agents-2026-04-01"`13451346 - `"cache-diagnosis-2026-04-07"`13471348 - `"dreaming-2026-04-21"`13491350 - `"thinking-token-count-2026-05-13"`13511352 - `"server-side-fallback-2026-06-01"`13531354 - `"server-side-fallback-2026-07-01"`13551356 - `"fallback-credit-2026-06-01"`13571358 - `"fallback-credit-2026-07-01"`13591360 - `"agent-memory-2026-07-22"`13611362 - `"mid-conversation-tool-changes-2026-07-01"`13631364 - `"compact-2026-01-12"`13651366 - `"computer-use-2025-11-24"`13671368 - `"mcp-tunnels-2026-06-22"`13691370 - `"structured-outputs-2025-11-13"`13711372 - `"task-budgets-2026-03-13"`13731374 - `"thinking-display-updates-2026-08-18"`13751376 - `"ce-user-management-2026-07-13"`13771378 - `"mid-conversation-output-config-2026-07-01"`13791380 - `"thinking-binding-controls-2026-08-01"`13811382 - `"mid-conversation-system-clear-at-2026-08-21"`13831384 - `"compact-2026-09-04"`13851386- `"anthropic-workspace-id": optional string`13871388#### Returns13891390- `BetaTunnelCertificate object`13911392 A CA certificate attached to a tunnel.13931394 - `type: "tunnel_certificate"`13951396 - `id: string`13971398 Unique identifier for the certificate, prefixed with `tcrt_`.13991400 - `archived_at: string or null`14011402 A timestamp in RFC 3339 format14031404 format: date-time14051406 - `created_at: string`14071408 A timestamp in RFC 3339 format14091410 format: date-time14111412 - `expires_at: string or null`14131414 A timestamp in RFC 3339 format14151416 format: date-time14171418 - `fingerprint: string`14191420 Lowercase hex SHA-256 fingerprint of the certificate's DER encoding.14211422 - `tunnel_id: string`14231424 ID of the tunnel the certificate is registered against.14251426#### Example14271428```bash1429curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates/$CERTIFICATE_ID \1430 -H 'anthropic-version: 2023-06-01' \1431 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \1432 -H "X-Api-Key: $ANTHROPIC_API_KEY"1433```14341435##### Response (200)14361437```json1438{1439 "id": "id",1440 "archived_at": "2019-12-27T18:11:19.117Z",1441 "created_at": "2019-12-27T18:11:19.117Z",1442 "expires_at": "2019-12-27T18:11:19.117Z",1443 "fingerprint": "fingerprint",1444 "tunnel_id": "tunnel_id",1445 "type": "tunnel_certificate"1446}1447```14481449### List Tunnel Certificates14501451**GET** `/v1/tunnels/{tunnel_id}/certificates`14521453The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.14541455Lists the certificates registered on a tunnel. Archived certificates are excluded unless include_archived is set.14561457#### Path parameters14581459- `tunnel_id: string`14601461#### Query parameters14621463- `include_archived: optional boolean`14641465 Whether to include archived certificates in the results. Defaults to false.14661467- `limit: optional number`14681469 Maximum number of certificates to return per page. Defaults to 20, maximum 1000.14701471 format: int3214721473- `page: optional string`14741475 Opaque pagination cursor from a previous `list_tunnel_certificates` response.14761477#### Headers14781479- `"anthropic-beta": optional array of AnthropicBeta`14801481 Optional header to specify the beta version(s) you want to use.14821483 - `string`14841485 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`14861487 - `"message-batches-2024-09-24"`14881489 - `"prompt-caching-2024-07-31"`14901491 - `"computer-use-2024-10-22"`14921493 - `"computer-use-2025-01-24"`14941495 - `"pdfs-2024-09-25"`14961497 - `"token-counting-2024-11-01"`14981499 - `"token-efficient-tools-2025-02-19"`15001501 - `"output-128k-2025-02-19"`15021503 - `"files-api-2025-04-14"`15041505 - `"mcp-client-2025-04-04"`15061507 - `"mcp-client-2025-11-20"`15081509 - `"dev-full-thinking-2025-05-14"`15101511 - `"interleaved-thinking-2025-05-14"`15121513 - `"code-execution-2025-05-22"`15141515 - `"extended-cache-ttl-2025-04-11"`15161517 - `"context-1m-2025-08-07"`15181519 - `"context-management-2025-06-27"`15201521 - `"model-context-window-exceeded-2025-08-26"`15221523 - `"skills-2025-10-02"`15241525 - `"fast-mode-2026-02-01"`15261527 - `"output-300k-2026-03-24"`15281529 - `"user-profiles-2026-03-24"`15301531 - `"user-profiles-2026-08-18"`15321533 - `"user-profiles-2026-09-04"`15341535 - `"advisor-tool-2026-03-01"`15361537 - `"managed-agents-2026-04-01"`15381539 - `"cache-diagnosis-2026-04-07"`15401541 - `"dreaming-2026-04-21"`15421543 - `"thinking-token-count-2026-05-13"`15441545 - `"server-side-fallback-2026-06-01"`15461547 - `"server-side-fallback-2026-07-01"`15481549 - `"fallback-credit-2026-06-01"`15501551 - `"fallback-credit-2026-07-01"`15521553 - `"agent-memory-2026-07-22"`15541555 - `"mid-conversation-tool-changes-2026-07-01"`15561557 - `"compact-2026-01-12"`15581559 - `"computer-use-2025-11-24"`15601561 - `"mcp-tunnels-2026-06-22"`15621563 - `"structured-outputs-2025-11-13"`15641565 - `"task-budgets-2026-03-13"`15661567 - `"thinking-display-updates-2026-08-18"`15681569 - `"ce-user-management-2026-07-13"`15701571 - `"mid-conversation-output-config-2026-07-01"`15721573 - `"thinking-binding-controls-2026-08-01"`15741575 - `"mid-conversation-system-clear-at-2026-08-21"`15761577 - `"compact-2026-09-04"`15781579- `"anthropic-workspace-id": optional string`15801581#### Returns15821583- `data: array of BetaTunnelCertificate`15841585 List of certificates, ordered by created_at descending.15861587 - `type: "tunnel_certificate"`15881589 - `id: string`15901591 Unique identifier for the certificate, prefixed with `tcrt_`.15921593 - `archived_at: string or null`15941595 A timestamp in RFC 3339 format15961597 format: date-time15981599 - `created_at: string`16001601 A timestamp in RFC 3339 format16021603 format: date-time16041605 - `expires_at: string or null`16061607 A timestamp in RFC 3339 format16081609 format: date-time16101611 - `fingerprint: string`16121613 Lowercase hex SHA-256 fingerprint of the certificate's DER encoding.16141615 - `tunnel_id: string`16161617 ID of the tunnel the certificate is registered against.16181619- `next_page: string or null`16201621 Pagination cursor for the next page, or null if no more results.16221623#### Example16241625```bash1626curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates \1627 -H 'anthropic-version: 2023-06-01' \1628 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \1629 -H "X-Api-Key: $ANTHROPIC_API_KEY"1630```16311632##### Response (200)16331634```json1635{1636 "data": [1637 {1638 "id": "id",1639 "archived_at": "2019-12-27T18:11:19.117Z",1640 "created_at": "2019-12-27T18:11:19.117Z",1641 "expires_at": "2019-12-27T18:11:19.117Z",1642 "fingerprint": "fingerprint",1643 "tunnel_id": "tunnel_id",1644 "type": "tunnel_certificate"1645 }1646 ],1647 "next_page": "next_page"1648}1649```16501651### Archive Tunnel Certificate16521653**POST** `/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive`16541655The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.16561657Archives a tunnel certificate, removing it from the set Anthropic trusts for the tunnel. The certificate record is retained. Archiving the last non-archived certificate is permitted; the tunnel rejects MCP traffic until a new certificate is added.16581659#### Path parameters16601661- `tunnel_id: string`16621663- `certificate_id: string`16641665#### Headers16661667- `"anthropic-beta": optional array of AnthropicBeta`16681669 Optional header to specify the beta version(s) you want to use.16701671 - `string`16721673 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`16741675 - `"message-batches-2024-09-24"`16761677 - `"prompt-caching-2024-07-31"`16781679 - `"computer-use-2024-10-22"`16801681 - `"computer-use-2025-01-24"`16821683 - `"pdfs-2024-09-25"`16841685 - `"token-counting-2024-11-01"`16861687 - `"token-efficient-tools-2025-02-19"`16881689 - `"output-128k-2025-02-19"`16901691 - `"files-api-2025-04-14"`16921693 - `"mcp-client-2025-04-04"`16941695 - `"mcp-client-2025-11-20"`16961697 - `"dev-full-thinking-2025-05-14"`16981699 - `"interleaved-thinking-2025-05-14"`17001701 - `"code-execution-2025-05-22"`17021703 - `"extended-cache-ttl-2025-04-11"`17041705 - `"context-1m-2025-08-07"`17061707 - `"context-management-2025-06-27"`17081709 - `"model-context-window-exceeded-2025-08-26"`17101711 - `"skills-2025-10-02"`17121713 - `"fast-mode-2026-02-01"`17141715 - `"output-300k-2026-03-24"`17161717 - `"user-profiles-2026-03-24"`17181719 - `"user-profiles-2026-08-18"`17201721 - `"user-profiles-2026-09-04"`17221723 - `"advisor-tool-2026-03-01"`17241725 - `"managed-agents-2026-04-01"`17261727 - `"cache-diagnosis-2026-04-07"`17281729 - `"dreaming-2026-04-21"`17301731 - `"thinking-token-count-2026-05-13"`17321733 - `"server-side-fallback-2026-06-01"`17341735 - `"server-side-fallback-2026-07-01"`17361737 - `"fallback-credit-2026-06-01"`17381739 - `"fallback-credit-2026-07-01"`17401741 - `"agent-memory-2026-07-22"`17421743 - `"mid-conversation-tool-changes-2026-07-01"`17441745 - `"compact-2026-01-12"`17461747 - `"computer-use-2025-11-24"`17481749 - `"mcp-tunnels-2026-06-22"`17501751 - `"structured-outputs-2025-11-13"`17521753 - `"task-budgets-2026-03-13"`17541755 - `"thinking-display-updates-2026-08-18"`17561757 - `"ce-user-management-2026-07-13"`17581759 - `"mid-conversation-output-config-2026-07-01"`17601761 - `"thinking-binding-controls-2026-08-01"`17621763 - `"mid-conversation-system-clear-at-2026-08-21"`17641765 - `"compact-2026-09-04"`17661767- `"anthropic-workspace-id": optional string`17681769#### Returns17701771- `BetaTunnelCertificate object`17721773 A CA certificate attached to a tunnel.17741775 - `type: "tunnel_certificate"`17761777 - `id: string`17781779 Unique identifier for the certificate, prefixed with `tcrt_`.17801781 - `archived_at: string or null`17821783 A timestamp in RFC 3339 format17841785 format: date-time17861787 - `created_at: string`17881789 A timestamp in RFC 3339 format17901791 format: date-time17921793 - `expires_at: string or null`17941795 A timestamp in RFC 3339 format17961797 format: date-time17981799 - `fingerprint: string`18001801 Lowercase hex SHA-256 fingerprint of the certificate's DER encoding.18021803 - `tunnel_id: string`18041805 ID of the tunnel the certificate is registered against.18061807#### Example18081809```bash1810curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates/$CERTIFICATE_ID/archive \1811 -X POST \1812 -H 'anthropic-version: 2023-06-01' \1813 -H 'anthropic-beta: mcp-tunnels-2026-06-22' \1814 -H "X-Api-Key: $ANTHROPIC_API_KEY"1815```18161817##### Response (200)18181819```json1820{1821 "id": "id",1822 "archived_at": "2019-12-27T18:11:19.117Z",1823 "created_at": "2019-12-27T18:11:19.117Z",1824 "expires_at": "2019-12-27T18:11:19.117Z",1825 "fingerprint": "fingerprint",1826 "tunnel_id": "tunnel_id",1827 "type": "tunnel_certificate"1828}1829```1830