Claude Platform Docs

隧道

创建隧道
client.beta.tunnels.create(params, options?): BetaTunnel
POST/v1/tunnels

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

获取隧道
client.beta.tunnels.retrieve(tunnelID, params?, options?): BetaTunnel
GET/v1/tunnels/{tunnel_id}

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

列出隧道
client.beta.tunnels.list(params?, options?): PageCursor<BetaTunnel>
GET/v1/tunnels

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

归档隧道
client.beta.tunnels.archive(tunnelID, params?, options?): BetaTunnel
POST/v1/tunnels/{tunnel_id}/archive

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

显示隧道令牌
client.beta.tunnels.revealToken(tunnelID, params?, options?): BetaTunnelToken
POST/v1/tunnels/{tunnel_id}/reveal_token

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

轮换隧道令牌
client.beta.tunnels.rotateToken(tunnelID, params, options?): BetaTunnelToken
POST/v1/tunnels/{tunnel_id}/rotate_token

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

Models
interface BetaTunnel { type: "tunnel"; id; archived_at; /* 3 more */ }

An MCP tunnel.

type: "tunnel"
id: string

Unique identifier for the tunnel, prefixed with tnl_.

archived_at: string | null

RFC 3339 datetime string indicating when the tunnel was archived. Null if it is not archived.

formatdate-time
created_at: string

RFC 3339 datetime string indicating when the tunnel was created.

formatdate-time
display_name: string | null

Human-readable name for the tunnel (1-255 characters). Null if unset.

domain: string

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.

interface BetaTunnelToken { type: "tunnel_token"; id; tunnel_token }

A tunnel's connector token.

type: "tunnel_token"
id: string

Stable identifier for the current token value. Changes when the token is rotated.

tunnel_token: string

The connector token used to run the tunnel. Treat as a credential.

隧道证书

创建隧道证书
client.beta.tunnels.certificates.create(tunnelID, params, options?): BetaTunnelCertificate
POST/v1/tunnels/{tunnel_id}/certificates

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

获取隧道证书
client.beta.tunnels.certificates.retrieve(certificateID, params, options?): BetaTunnelCertificate
GET/v1/tunnels/{tunnel_id}/certificates/{certificate_id}

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

列出隧道证书
client.beta.tunnels.certificates.list(tunnelID, params?, options?): PageCursor<BetaTunnelCertificate>
GET/v1/tunnels/{tunnel_id}/certificates

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。

归档隧道证书
client.beta.tunnels.certificates.archive(certificateID, params, options?): BetaTunnelCertificate
POST/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive

Tunnels API 目前处于研究预览阶段。它需要 anthropic-beta: mcp-tunnels-2026-06-22 请求头,并且可能在没有弃用期的情况下发生变更。它取代了位于 /v1/organizations/tunnels 的 Admin API 端点,这些端点在迁移窗口期内仍然可用。