railway-sandbox-mcp
Provides tools for creating and managing Railway Sandboxes, including running commands, reading and writing files, listing files, taking checkpoints, and destroying sandboxes as isolated development/execution environments.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@railway-sandbox-mcpcreate a sandbox and runpython3 --version"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
|
|
|
| Node MCP server backed by the Railway Sandbox SDK |
|
|
|
| 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 InternetNeither Railway service needs a public domain.
Related MCP server: Railway MCP Server
Config as code
Deployment behavior is committed to this repository:
/railway.jsondefines the MCP service builder, watch paths, start command, health check, and restart policy./tunnel-client/railway.jsondefines the tunnel-client Docker build, watch paths, readiness check, and restart policy./tunnel-client/Dockerfileselects the official OpenAI tunnel-client image and adapts its health listener to Railway's injectedPORT./.github/workflows/ci.ymlvalidates 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-mcpBranch:
mainRoot directory:
/Config file path:
/railway.jsonGitHub autodeploy: enabled
Wait for CI: enabled
tunnel-client
Source repository:
erwinkn/railway-sandbox-mcpBranch:
mainRoot directory:
/tunnel-clientConfig file path:
/tunnel-client/railway.jsonGitHub 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/mcpCONTROL_PLANE_TUNNEL_ID=tunnel_...CONTROL_PLANE_API_KEY=...: restricted OpenAI runtime key with Tunnel Read + Use permissions.LOG_LEVEL=infoLOG_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_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