トンネルを作成
POST/v1/tunnels
Tunnels API はリサーチプレビュー段階です。anthropic-beta: mcp-tunnels-2026-06-22 ヘッダーが必要であり、非推奨期間を設けずに変更される可能性があります。この API は /v1/organizations/tunnels の Admin API エンドポイントに代わるものですが、移行期間中は従来のエンドポイントも引き続き利用できます。
トンネルを作成します。作成時に新しいホスト名が割り当てられ、トンネルがプロビジョニングされます。この操作はべき等ではありません。新しいトンネルは、少なくとも 1 つの CA 証明書が追加されるまで MCP トラフィックを拒否します。
Parameters
Returns
トンネルを作成
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.tunnels.BetaTunnel;
import com.anthropic.models.beta.tunnels.TunnelCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
BetaTunnel betaTunnel = client.beta().tunnels().create();
}
}Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"display_name": "display_name",
"domain": "domain",
"type": "tunnel"
}Returns Examples
Response 200
{
"id": "id",
"archived_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"display_name": "display_name",
"domain": "domain",
"type": "tunnel"
}