Skip to main content
Glama
erwinkn

railway-sandbox-mcp

by erwinkn

railway-sandbox-mcp

ChatGPT が Railway Sandbox を分離された開発・実行環境として操作できるようにする、小さな MCP ブリッジです。

アーキテクチャ

長時間稼働する 2 つの Railway サービスは、どちらも Railway の GitHub インテグレーションを通じて、この GitHub リポジトリからデプロイされます。

Railway サービス

GitHub ブランチ

Railway ルートディレクトリ

コードとしての設定ファイル

用途

sandbox-mcp

main

/

/railway.json

Railway Sandbox SDK をバックエンドとする Node MCP サーバー

tunnel-client

main

/tunnel-client

/tunnel-client/railway.json

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.json

  • GitHub 自動デプロイ: 有効

  • CI 待機: 有効

tunnel-client

  • ソースリポジトリ: erwinkn/railway-sandbox-mcp

  • ブランチ: main

  • ルートディレクトリ: /tunnel-client

  • 設定ファイルのパス: /tunnel-client/railway.json

  • GitHub 自動デプロイ: 有効

  • 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/mcp

  • CONTROL_PLANE_TUNNEL_ID=tunnel_...

  • CONTROL_PLANE_API_KEY=...: Tunnel Read + Use 権限を持つ制限付き OpenAI ランタイムキー。

  • LOG_LEVEL=info

  • LOG_FORMAT=json

tunnel-client/healthz/readyz/metrics を Railway から注入されたポートで公開します。Railway はデプロイのヘルスチェックとして /readyz を使用するため、tunnel-client のデプロイが成功すれば、トンネルの起動と下流の MCP のレディネスの両方が検証されたことになります。

デプロイの流れ

プッシュにより GitHub Actions が実行されます。Railway の Wait for CI を有効にすると、Railway は CI の成功を待ってから、変更されたファイルに一致する監視パターンを持つサービスのみを自動デプロイします。

MCP ツール

  • sandbox_create

  • sandbox_list

  • sandbox_get

  • sandbox_exec

  • sandbox_read_file

  • sandbox_list_files

  • sandbox_write_file

  • sandbox_write_files

  • sandbox_checkpoint

  • sandbox_destroy

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    27
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables 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.
    36
    49
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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