Skip to main content
Glama
erwinkn

railway-sandbox-mcp

by erwinkn

railway-sandbox-mcp

A small MCP bridge that lets ChatGPT drive Railway Sandboxes as an isolated development/execution environment.

Architecture

Both long-running Railway services are deployed from this GitHub repository through Railway's GitHub integration:

Railway service

GitHub branch

Railway root directory

Config-as-code file

Purpose

sandbox-mcp

main

/

/railway.json

Node MCP server backed by the Railway Sandbox SDK

tunnel-client

main

/tunnel-client

/tunnel-client/railway.json

OpenAI Secure MCP Tunnel client

The tunnel-client Dockerfile inherits the official ghcr.io/openai/tunnel-client:latest image and only wraps its entrypoint so the upstream health/readiness server binds to Railway's injected PORT. Railway owns the deployment lifecycle while OpenAI remains the upstream image provider.

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

Neither Railway service needs a public domain.

Related MCP server: Railway MCP Server

Config as code

Deployment behavior is committed to this repository:

  • /railway.json defines the MCP service builder, watch paths, start command, health check, and restart policy.

  • /tunnel-client/railway.json defines the tunnel-client Docker build, watch paths, readiness check, and restart policy.

  • /tunnel-client/Dockerfile selects the official OpenAI tunnel-client image and adapts its health listener to Railway's injected PORT.

  • /.github/workflows/ci.yml validates the Node service and Railway config files and builds the tunnel-client image on pushes and pull requests.

Railway configuration committed in code overrides equivalent dashboard build/deploy values for each deployment.

One-time Railway service wiring

Source association, trigger branch, and the custom config-file path are Railway service metadata rather than fields inside railway.json, so configure these once in Railway:

sandbox-mcp

  • Source repository: erwinkn/railway-sandbox-mcp

  • Branch: main

  • Root directory: /

  • Config file path: /railway.json

  • GitHub autodeploy: enabled

  • Wait for CI: enabled

tunnel-client

  • Source repository: erwinkn/railway-sandbox-mcp

  • Branch: main

  • Root directory: /tunnel-client

  • Config file path: /tunnel-client/railway.json

  • GitHub autodeploy: enabled

  • Wait for CI: enabled

  • No custom start command; inherit the repository Dockerfile entrypoint

The service-specific watch paths mean MCP-only changes do not rebuild the tunnel client, and tunnel-only changes do not rebuild the MCP server.

Required environment variables

sandbox-mcp

  • RAILWAY_API_TOKEN: Railway API token with access to the environment where Sandboxes are enabled.

  • RAILWAY_ENVIRONMENT_ID: injected automatically by Railway.

tunnel-client

  • MCP_SERVER_URL=http://sandbox-mcp.railway.internal:8080/mcp

  • CONTROL_PLANE_TUNNEL_ID=tunnel_...

  • CONTROL_PLANE_API_KEY=...: restricted OpenAI runtime key with Tunnel Read + Use permissions.

  • LOG_LEVEL=info

  • LOG_FORMAT=json

tunnel-client exposes /healthz, /readyz, and /metrics on Railway's injected port. Railway uses /readyz as the deployment health check, so a successful tunnel-client deployment verifies both tunnel startup and downstream MCP readiness.

Deployment flow

A push to main runs GitHub Actions. With Railway's Wait for CI enabled, Railway waits for CI to pass, then autodeploys only the services whose watch patterns match the changed files.

MCP tools

  • 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