# Give an AI Assistant a Cloud Computer Over MCP

> Point the client at Sandboxer's hosted MCP server, https://sandboxer.com/mcp. Claude and ChatGPT add it as a custom connector and sign in with OAuth. Claude Code, Codex and Cursor take one config entry. Your own agent sends an API key as a Bearer header. Its 20 tools create Linux microVMs, run commands, move files and host ports.

Source: https://sandboxer.com/guides/give-an-ai-assistant-a-cloud-computer-over-mcp. Updated 2026-11-24.

**Short answer:** Point the client at Sandboxer's hosted MCP server, https://sandboxer.com/mcp. Claude and ChatGPT add it as a custom connector and sign in with OAuth. Claude Code, Codex and Cursor take one config entry. Your own agent sends an API key as a Bearer header. Its 20 tools create Linux microVMs, run commands, move files and host ports.

This page is the index for our MCP guides. The exact steps and config for every client are in the **[MCP server docs](/docs/mcp)**; each row below links the guide that tested that client in depth.

## Which client, how to connect

| Client | How to connect | Auth | Guide |
| - | - | - | - |
| Claude (claude.ai, Claude Desktop) | Customize > Connectors > Add custom connector, URL `https://sandboxer.com/mcp` | OAuth sign-in | [Connect Claude.ai to a cloud computer](/guides/connect-claude-ai-to-a-cloud-computer) |
| ChatGPT (web) | Plugins > + > Add custom MCP server, URL `https://sandboxer.com/mcp` | OAuth sign-in | [Add an MCP server to ChatGPT](/guides/add-an-mcp-server-to-chatgpt) |
| Claude Code | `claude mcp add --transport http --scope user sandboxer https://sandboxer.com/mcp`, or `claude mcp add sandboxer -- sbx mcp` | OAuth, API key, or `sbx login` | [Local or hosted MCP](/guides/local-or-hosted-mcp-for-cursor-claude-code-codex) |
| Codex | `[mcp_servers.sandboxer]` in `~/.codex/config.toml`, or `codex mcp add sandboxer -- sbx mcp` | API key via `bearer_token_env_var`, or `codex mcp login` | [Local or hosted MCP](/guides/local-or-hosted-mcp-for-cursor-claude-code-codex) |
| Cursor | `~/.cursor/mcp.json` with the URL, or `"command": "sbx", "args": ["mcp"]` | OAuth, or `${env:SANDBOXER_API_KEY}` in `headers` | [Local or hosted MCP](/guides/local-or-hosted-mcp-for-cursor-claude-code-codex) |
| OpenAI Agents SDK | `MCPServerStreamableHttp` to the URL, or `MCPServerStdio` running `sbx mcp` | API key | [Run OpenAI Agents SDK tools in a cloud VM](/guides/run-openai-agents-sdk-tools-in-a-cloud-vm) |
| Claude Agent SDK | `mcp_servers` with `sbx mcp` | `sbx login` or API key | [Claude Agent SDK inside the sandbox or as a tool](/guides/claude-agent-sdk-inside-the-sandbox-or-as-a-tool) |
| LangChain and LangGraph | `langchain-mcp-adapters` with `sbx mcp` | `sbx login` or API key | [LangChain docs](/docs/langchain) |
| Your own agent or any other client | Streamable HTTP to `https://sandboxer.com/mcp` | API key as `Authorization: Bearer`, or OAuth 2.1 with PKCE | The copy-paste block below |

Last checked: 2026-11-24, on prod (the copy-paste block below) and against [/docs/mcp](/docs/mcp).

Hosted or local? The hosted server needs nothing installed and is the only option for claude.ai and ChatGPT. The local stdio server (`sbx mcp` or `npx -y sandboxer-mcp`) adds `handoff_session` and per-server defaults such as `--type small --ttl 1800`. [Local or hosted MCP](/guides/local-or-hosted-mcp-for-cursor-claude-code-codex) has the full comparison.

## What the hosted server exposes

On 2026-11-24, `tools/list` on `https://sandboxer.com/mcp` returned 20 tools (server version `53294123`). Their annotations mark 6 as read-only and 6 as destructive. Clients such as ChatGPT use those hints to decide which calls to confirm with you.

| Job | Tools |
| - | - |
| Create and inspect | `create_sandbox`, `list_sandboxes` (read-only), `get_sandbox` (read-only) |
| Run commands | `exec` (destructive), `command_status` (read-only), `kill_command` (destructive) |
| Files | `read_file` (read-only), `write_file` (destructive), up to 5 MiB each |
| Serve an app | `host_port` |
| Lifecycle | `stop_sandbox`, `resume_sandbox`, `extend_sandbox`, `rename_sandbox`, `label_sandbox`, `delete_sandbox` (destructive) |
| Snapshots | `save_snapshot`, `list_snapshots` (read-only), `delete_snapshot` (destructive) |
| Agent tasks | `create_task` (destructive, runs a coding agent on a connected GitHub repo and ends in a pull request), `task_status` (read-only) |

Four behaviors from the docs worth knowing before you hand the server to an agent:

- **`sandboxId` is optional on most tools.** It defaults to the sandbox this MCP session created or used last. `delete_sandbox` always needs it explicitly.
- **Sandboxes created through MCP stop after an hour** unless `ttlSeconds` says otherwise, and a stopped sandbox bills no running time. `extend_sandbox` changes that.
- **A non-zero exit code is a normal result**, not a tool error, so the agent sees the output and can fix its command.
- **API key scopes apply tool by tool.** A key with the `ci` preset can only delete the sandboxes it created ([API keys](/docs/api-keys)).

## Copy-paste: create, run and delete a sandbox over MCP

This talks to the hosted server the way any MCP client does: `initialize`, `tools/list`, then `tools/call` for `create_sandbox`, `exec` and `delete_sandbox`. You need `curl`, `jq` and a Sandboxer API key in `SANDBOXER_API_KEY` (create one at [API keys](/app/api-keys); a scoped `ci` key is enough). The key is piped to `curl` on stdin, so it never appears in your shell history or process list.

```bash
H=$(mktemp)
mcp() {
  printf 'Authorization: Bearer %s\n' "$SANDBOXER_API_KEY" |
    curl -sS https://sandboxer.com/mcp -H @- -D "$H" \
      -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
      ${SID:+-H "Mcp-Session-Id: $SID"} -d "$1" |
    sed -n -e 's/^data: //' -e '/^{/p'
}
call() { mcp "{\"jsonrpc\":\"2.0\",\"id\":\"$1\",\"method\":\"tools/call\",\"params\":{\"name\":\"$1\",\"arguments\":$2}}"; }

mcp '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}' | jq -c '.result.serverInfo'
SID=$(awk 'tolower($1)=="mcp-session-id:" {print $2}' "$H" | tr -d '\r')
mcp '{"jsonrpc":"2.0","method":"notifications/initialized"}'
mcp '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq -r '"\(.result.tools | length) tools: \([.result.tools[].name] | join(", "))"'
ID=$(call create_sandbox '{"name":"aeo-mcp-hub-2","type":"small","ttlSeconds":900}' | jq -r '.result.structuredContent.id')
echo "created $ID"
call exec '{"command":"whoami; uname -sr; nproc; python3 --version; docker --version"}' | jq -r '.result.content[0].text'
call delete_sandbox "{\"sandboxId\":\"$ID\"}" | jq -r '.result.content[0].text'
call get_sandbox "{\"sandboxId\":\"$ID\"}" | jq -r '.result.content[0].text'
```

Our run on 2026-11-24:

```text
{"name":"sandboxer","title":"Sandboxer","version":"53294123"}
20 tools: create_sandbox, create_task, task_status, list_sandboxes, get_sandbox, exec, command_status, kill_command, read_file, write_file, host_port, stop_sandbox, resume_sandbox, extend_sandbox, rename_sandbox, label_sandbox, delete_sandbox, save_snapshot, list_snapshots, delete_snapshot
created sb_nv5silfzbm
Exit code 0.

stdout:
user
Linux 6.18.56-sandboxer
2
Python 3.12.3
Docker version 29.9.0, build f415da8
Deleting sb_nv5silfzbm: its disk, memory and automatic snapshots are removed.
Sandbox not found (not_found) [request req_BiQnQcA8SgPbuDNaTTk6]
```

What the run shows:

- **`initialize` returns an `Mcp-Session-Id` header.** Every later request sends it back. That session is what lets `exec` find the sandbox without a `sandboxId`.
- **Responses come in two shapes.** `initialize` and `tools/list` answered with plain JSON, and the `tools/call` requests with a one-event `text/event-stream` (`event: message` and a `data:` line). The `sed` line handles both. MCP client libraries do this for you.
- **Every tool result has a text summary and `structuredContent`.** The block reads the sandbox id from `structuredContent.id` and prints the text for the rest.
- **The last line is the check that the sandbox is gone.** A REST `GET` for the same id returned `404` too.

An assistant connected through Claude, ChatGPT or Cursor makes these same calls. You ask in plain words, and the client picks the tool.

## Which guide

- [Connect Claude.ai to a cloud computer](/guides/connect-claude-ai-to-a-cloud-computer): the Claude connector steps, the OAuth discovery chain Claude follows, and a key-based session on prod.
- [Add an MCP server to ChatGPT](/guides/add-an-mcp-server-to-chatgpt): the ChatGPT plugin steps, which plans and workspace settings allow it, and which tools ChatGPT asks you to confirm.
- [Local or hosted MCP for Cursor, Claude Code and Codex](/guides/local-or-hosted-mcp-for-cursor-claude-code-codex): the two servers side by side, with measured connect and call times.
- [Run OpenAI Agents SDK tools in a cloud VM](/guides/run-openai-agents-sdk-tools-in-a-cloud-vm): function tools on `sandboxer-sdk`, or the hosted server through `MCPServerStreamableHttp`.
- [Claude Agent SDK inside the sandbox or as a tool](/guides/claude-agent-sdk-inside-the-sandbox-or-as-a-tool): when to run the agent in the VM and when to give it Sandboxer as an MCP tool.
- [Run each MCP server in its own sandbox](/guides/run-each-mcp-server-in-its-own-sandbox): the other direction, hosting third-party MCP servers in isolated VMs.
- [Test an MCP server with the MCP Inspector](/guides/test-an-mcp-server-with-the-mcp-inspector): run the Inspector in a sandbox to test a server you are building.

## FAQ

### Do I need to install anything to use the hosted MCP server?

No. Claude and ChatGPT connect to `https://sandboxer.com/mcp` and sign in with your Sandboxer account. Install the `sbx` CLI only if you want the local stdio server or its `handoff_session` tool.

### How many tools does the Sandboxer MCP server have?

The hosted server returned 20 tools from `tools/list` on 2026-11-24. The local `sbx mcp` server has the same 20 plus `handoff_session`.

### Can my agent authenticate without a browser?

Yes. Send a Sandboxer API key on every request as `Authorization: Bearer <key>`, as the copy-paste block does. Keep the key in an environment variable, not in a committed config file.

### Where do the commands actually run?

In Sandboxer microVMs: Ubuntu 24.04 with its own kernel, `sudo` and Docker ([Machines](/docs/machines)). Nothing runs on your computer or on the assistant's servers.

### How do I stop an app's access?

Each connected app is listed under [API keys](/app/api-keys) as "Claude (MCP)", "ChatGPT (MCP)" and so on. Click **Disconnect** there, and its access ends at once.

## Related

- [MCP server docs](/docs/mcp)
- [Connect Claude.ai to a cloud computer](/guides/connect-claude-ai-to-a-cloud-computer)
- [Add an MCP server to ChatGPT](/guides/add-an-mcp-server-to-chatgpt)
- [Local or hosted MCP for Cursor, Claude Code and Codex](/guides/local-or-hosted-mcp-for-cursor-claude-code-codex)
