railway-sandbox-mcp
railway-sandbox-mcp
ChatGPT が Railway Sandbox を分離された開発・実行環境として操作できるようにする、小さな MCP ブリッジです。
アーキテクチャ
長時間稼働する 2 つの Railway サービスは、どちらも Railway の GitHub インテグレーションを通じて、この GitHub リポジトリからデプロイされます。
Railway サービス | GitHub ブランチ | Railway ルートディレクトリ | コードとしての設定ファイル | 用途 |
|
|
|
| Railway Sandbox SDK をバックエンドとする Node MCP サーバー |
|
|
|
| OpenAI Secure MCP Tunnel クライアント |
tunnel-client の Dockerfile は公式の ghcr.io/openai/tunnel-client:latest イメージを継承し、そのエントリポイントをラップしているだけなので、上流のヘルス/レディネスサーバーが Railway から注入された PORT にバインドされます。デプロイのライフサイクルは Railway が管理し、上流のイメージプロバイダーは OpenAI のままです。
ChatGPT
|
v
OpenAI Secure MCP Tunnel
^
| outbound HTTPS
|
tunnel-client (Railway)
|
| Railway private network
v
sandbox-mcp:8080/mcp (Railway)
|
v
Railway Sandbox SDK
|
v
Ephemeral isolated Linux sandboxes with outbound Internetどちらの Railway サービスもパブリックドメインは必要ありません。
Related MCP server: Railway MCP Server
コードとしての設定
デプロイ動作はこのリポジトリにコミットされています。
/railway.jsonは、MCP サービスのビルダー、監視パス、起動コマンド、ヘルスチェック、再起動ポリシーを定義します。/tunnel-client/railway.jsonは、tunnel-client の Docker ビルド、監視パス、レディネスチェック、再起動ポリシーを定義します。/tunnel-client/Dockerfileは、公式の OpenAI tunnel-client イメージを選択し、そのヘルスリスナーを Railway から注入されたPORTに適合させます。/.github/workflows/ci.ymlは、プッシュとプルリクエストの際に Node サービスと Railway 設定ファイルを検証し、tunnel-client イメージをビルドします。
コードとしてコミットされた Railway 設定は、各デプロイのダッシュボード上のビルド/デプロイ設定値よりも優先されます。
一度だけ行う Railway サービスの接続設定
ソースの関連付け、トリガーブランチ、カスタム設定ファイルのパスは、railway.json 内のフィールドではなく Railway サービスのメタデータであるため、これらは Railway で一度だけ設定します。
sandbox-mcp
ソースリポジトリ:
erwinkn/railway-sandbox-mcpブランチ:
mainルートディレクトリ:
/設定ファイルのパス:
/railway.jsonGitHub 自動デプロイ: 有効
CI 待機: 有効
tunnel-client
ソースリポジトリ:
erwinkn/railway-sandbox-mcpブランチ:
mainルートディレクトリ:
/tunnel-client設定ファイルのパス:
/tunnel-client/railway.jsonGitHub 自動デプロイ: 有効
CI 待機: 有効
カスタム起動コマンドなし。リポジトリの Dockerfile エントリポイントを継承
サービス固有の監視パスにより、MCP のみの変更ではトンネルクライアントは再ビルドされず、トンネルのみの変更では MCP サーバーは再ビルドされません。
必要な環境変数
sandbox-mcp
RAILWAY_API_TOKEN: Sandbox が有効な環境へのアクセス権を持つ Railway API トークン。RAILWAY_ENVIRONMENT_ID: Railway によって自動的に注入されます。
tunnel-client
MCP_SERVER_URL=http://sandbox-mcp.railway.internal:8080/mcpCONTROL_PLANE_TUNNEL_ID=tunnel_...CONTROL_PLANE_API_KEY=...: Tunnel Read + Use 権限を持つ制限付き OpenAI ランタイムキー。LOG_LEVEL=infoLOG_FORMAT=json
tunnel-client は /healthz、/readyz、/metrics を Railway から注入されたポートで公開します。Railway はデプロイのヘルスチェックとして /readyz を使用するため、tunnel-client のデプロイが成功すれば、トンネルの起動と下流の MCP のレディネスの両方が検証されたことになります。
デプロイの流れ
プッシュにより GitHub Actions が実行されます。Railway の Wait for CI を有効にすると、Railway は CI の成功を待ってから、変更されたファイルに一致する監視パターンを持つサービスのみを自動デプロイします。
MCP ツール
sandbox_createsandbox_listsandbox_getsandbox_execsandbox_read_filesandbox_list_filessandbox_write_filesandbox_write_filessandbox_checkpointsandbox_destroy
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables spawning ephemeral Linux sandbox containers using Docker and executing commands through an interactive TTY interface. Supports collaborative terminal sessions where both AI clients and humans can simultaneously interact with the same container.27MIT- AlicenseAqualityDmaintenanceEnables management of Railway.app infrastructure through natural language, including deploying services from GitHub repos or Docker images, managing environment variables, monitoring deployments, and configuring networking and volumes.3649MIT
- AlicenseAqualityDmaintenanceEnables management of Railway.app infrastructure through natural language, including deploying services, managing environment variables, monitoring deployments, and handling databases and volumes.3649MIT
- AlicenseAqualityDmaintenanceEnables AI systems like Claude and Cursor to directly manage Railway projects, deployments, services, environment variables, and monitor logs through natural language commands.97MIT
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/erwinkn/railway-sandbox-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server