Claude Platform Docs

通道

建立通道
BetaTunnel Beta.Tunnels.Create(parameters, cancellationToken = default)
POST/v1/tunnels

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

取得通道
BetaTunnel Beta.Tunnels.Retrieve(parameters, cancellationToken = default)
GET/v1/tunnels/{tunnel_id}

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

列出通道
TunnelListPage Beta.Tunnels.List(parameters, cancellationToken = default)
GET/v1/tunnels

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

封存通道
BetaTunnel Beta.Tunnels.Archive(parameters, cancellationToken = default)
POST/v1/tunnels/{tunnel_id}/archive

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

顯示通道權杖
BetaTunnelToken Beta.Tunnels.RevealToken(parameters, cancellationToken = default)
POST/v1/tunnels/{tunnel_id}/reveal_token

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

輪替通道權杖
BetaTunnelToken Beta.Tunnels.RotateToken(parameters, cancellationToken = default)
POST/v1/tunnels/{tunnel_id}/rotate_token

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

Models
class BetaTunnel { Type = "tunnel"; ID; ArchivedAt; /* 3 more */ }

An MCP tunnel.

JsonElement Type = "tunnel"
required string ID

Unique identifier for the tunnel, prefixed with tnl_.

required DateTimeOffset? ArchivedAt

A timestamp in RFC 3339 format

formatdate-time
required DateTimeOffset CreatedAt

A timestamp in RFC 3339 format

formatdate-time
required string? DisplayName

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

required string Domain

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.

class BetaTunnelToken { Type = "tunnel_token"; ID; TunnelToken; }

A tunnel's connector token.

JsonElement Type = "tunnel_token"
required string ID

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

required string TunnelToken

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

通道憑證

建立通道憑證
BetaTunnelCertificate Beta.Tunnels.Certificates.Create(parameters, cancellationToken = default)
POST/v1/tunnels/{tunnel_id}/certificates

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

取得通道憑證
BetaTunnelCertificate Beta.Tunnels.Certificates.Retrieve(parameters, cancellationToken = default)
GET/v1/tunnels/{tunnel_id}/certificates/{certificate_id}

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

列出通道憑證
CertificateListPage Beta.Tunnels.Certificates.List(parameters, cancellationToken = default)
GET/v1/tunnels/{tunnel_id}/certificates

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。

封存通道憑證
BetaTunnelCertificate Beta.Tunnels.Certificates.Archive(parameters, cancellationToken = default)
POST/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive

Tunnels API 目前為研究預覽版。它需要 anthropic-beta: mcp-tunnels-2026-06-22 標頭,且可能在沒有棄用期的情況下變更。它取代了位於 /v1/organizations/tunnels 的 Admin API 端點,這些端點在遷移期間內仍可使用。