railway-sandbox-mcp
railway-sandbox-mcp
一个小型 MCP 桥接器,让 ChatGPT 可以将 Railway Sandboxes 作为隔离的开发/执行环境来驱动。
架构
两个长期运行的 Railway 服务均通过 Railway 的 GitHub 集成从本 GitHub 仓库部署:
Railway 服务 | GitHub 分支 | Railway 根目录 | 配置即代码文件 | 用途 |
|
|
|
| 由 Railway Sandbox SDK 提供支持的 Node MCP 服务器 |
|
|
|
| OpenAI 安全 MCP 隧道客户端 |
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 服务元数据,而不是 railway.json 中的字段,因此请在 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:具有访问已启用 Sandboxes 的环境权限的 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=...:具有隧道读取和使用权限的受限 OpenAI 运行时密钥。LOG_LEVEL=infoLOG_FORMAT=json
tunnel-client 在 Railway 注入的端口上暴露 /healthz、/readyz 和 /metrics。Railway 使用 /readyz 作为部署健康检查,因此成功的 tunnel-client 部署既验证了隧道启动,也验证了下游 MCP 的就绪状态。
部署流程
推送到 main 会运行 GitHub Actions。启用 Railway 的 等待 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