Runtime Cloud — MCP server for Claude Code: setup guide
Runtime Cloud gives AI agents isolated Linux sandboxes for commands, processes, files, and persistent state. Connect it to your coding agent to run workloads in the cloud.
claude mcp add --transport http runtime https://api.withruntime.com/mcpWhat Runtime Cloud does
Runtime Cloud exposes Linux sandboxes to AI agents through MCP. An agent can execute shell commands, manage background processes, transfer files, use an interactive terminal, and access TCP ports. Sandboxes can be paused and resumed while retaining memory and running processes. Idle instances pause automatically after 300 seconds without activity.
Connection options are available for Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, and Gemini CLI. The hosted MCP endpoint is https://api.withruntime.com/mcp; a local process can be started with npx -y withruntime. The SDK requires Node.js 22.12 or later, or Bun. For servers and CI runners, authentication can use RUNTIME_API_KEY; local clients can also rely on a connection previously approved through the CLI.
The JavaScript SDK creates environments with Sandbox.create() and can retrieve an existing environment by name with Sandbox.getOrCreate(name). It also supports snapshots, image changes, and mounting S3, R2, or Google Cloud Storage buckets as directories. Features such as domains, ports, addresses, tunnel, and network require a paid account. Projects migrating from E2B, Daytona, or Vercel Sandbox can use dedicated compatibility imports; unsupported E2B operations raise NotSupportedError.
What it helps with
- Run agent-generated commands inside an isolated Linux environment
- Execute background jobs and inspect their results
- Transfer project files to a cloud sandbox and retrieve outputs
- Pause an environment while preserving its running processes
- Expose TCP ports and mount cloud storage as directories
Example prompts for the agent
- Run the project tests in a Runtime Cloud Linux sandbox and report the exit code.
- Upload the project directory, execute its script in the sandbox, and return the generated files.
- Pause the Runtime Cloud sandbox after the task while preserving its current state.
How to install Runtime Cloud
1Platform CLI: remote server
claude mcp add --transport http runtime https://api.withruntime.com/mcp2Platform CLI
claude mcp add cloud-sdk -- npx -y withruntime1Platform CLI: remote server
codex mcp add cloud-sdk --url https://api.withruntime.com/mcp2Platform CLI
codex mcp add cloud-sdk -- npx -y withruntimeConfig file
{
"mcpServers": {
"cloud-sdk": {
"url": "https://api.withruntime.com/mcp"
}
}
}{
"mcpServers": {
"cloud-sdk": {
"command": "npx",
"args": [
"-y",
"withruntime"
]
}
}
}Config file
{
"servers": {
"cloud-sdk": {
"type": "http",
"url": "https://api.withruntime.com/mcp"
}
}
}{
"servers": {
"cloud-sdk": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"withruntime"
]
}
}
}1Platform CLI: remote server
gemini mcp add -t http cloud-sdk https://api.withruntime.com/mcp2Platform CLI
gemini mcp add cloud-sdk npx -y withruntimeStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Runtime Cloud
How do I install Runtime Cloud in Claude Code?
For the HTTP endpoint, run claude mcp add --transport http runtime https://api.withruntime.com/mcp. Add the second HTTP entry with claude mcp add --transport http cloud-sdk https://api.withruntime.com/mcp. To use a local process instead, run claude mcp add cloud-sdk -- npx -y withruntime.
What does Runtime Cloud do?
It gives coding agents cloud-hosted Linux environments where they can run commands and manage files or processes. Environments can be paused and resumed without discarding their retained state.
Which runtime does the Runtime Cloud SDK require?
Use Node.js 22.12 or newer, or Bun. Server deployments and CI runners can authenticate with RUNTIME_API_KEY, while a local client can use an existing CLI-approved connection.