Skip to content
Guides · Integrations

Sandboxer's 20 MCP Tools Explained, With One Example Call Each

Updated November 25, 2026 .md

Short answer: The hosted server at https://sandboxer.com/mcp has 20 tools. They create and inspect sandboxes, run commands in the foreground or background, read and write files, put a port on an HTTPS URL, stop, resume, label and delete sandboxes, save snapshots, and start agent tasks. Below is one real call for each, run on prod.

Part of Give an AI Assistant a Cloud Computer Over MCP.

The hub covers how to connect each client. This page is the tool reference an agent builder needs next: what each tool takes, what it answers, and which ones a client should confirm with you first. The argument tables in the MCP server docs are the source of truth; everything below came from tools/list and tools/call on prod.

All 20 tools at a glance#

On 2026-11-25, initialize returned server version cd8d76dc, and tools/list returned these 20 tools. The "Hint" column is the server's own annotation: readOnlyHint: true or destructiveHint: true. Every tool also carries openWorldHint: true. Clients such as ChatGPT use these hints to decide which calls to confirm.

Job Tool Hint Required arguments Called on prod
Create and inspect create_sandbox none Yes
list_sandboxes read-only none Yes
get_sandbox read-only none Yes
Run commands exec destructive command Yes
command_status read-only processId Yes
kill_command destructive processId Yes
Files write_file destructive path, content Yes
read_file read-only path Yes
Serve an app host_port port Yes
Lifecycle extend_sandbox none Yes
rename_sandbox name Yes
label_sandbox labels Yes
stop_sandbox none Yes
resume_sandbox none Yes
delete_sandbox destructive sandboxId Yes
Snapshots save_snapshot name Yes
list_snapshots read-only none Yes
delete_snapshot destructive name Yes
Agent tasks create_task destructive repo, prompt No (needs a connected GitHub repo)
task_status read-only taskId Yes, with an unknown id

Last checked: 2026-11-25, on prod, with the copy-paste block at the end of this page.

So 6 tools are read-only, 6 are destructive, and 8 carry neither hint. The local stdio server (sbx mcp) has the same 20 plus handoff_session (Local or hosted MCP).

Each example below shows the arguments object of a tools/call request, then the text result the server sent back. Every result also carries the same data as structuredContent, which is where a program should read ids and URLs from. Hosted-URL tokens are replaced with <redacted>.

Create and inspect#

create_sandbox creates an Ubuntu microVM and waits until it is ready. All arguments are optional: type, ttlSeconds, name, region, from, fromLabels, labels, env, noEnv, idleStopMinutes. After this call, the other tools use the new sandbox when you leave out sandboxId.

{"name":"aeo-mcp-tools-1","type":"small","ttlSeconds":1800,"noEnv":true,"labels":{"guide":"mcp-tools"}}
Sandbox sb_ekcvvsanuy is ready. URL: https://fond-frosty-cobble.box.sandboxer.com. Stops automatically at 2026-11-25T11:40:22.860426Z. Labels: guide=mcp-tools.

noEnv: true keeps your account's secrets out of the VM, which is the safe default for code you don't trust. Without ttlSeconds, a sandbox created over MCP stops after an hour.

list_sandboxes (read-only) lists your sandboxes. Filter it with labels or state, so an agent only sees its own work:

{"labels":{"guide":"mcp-tools"}}
sb_ekcvvsanuy  ready  aeo-mcp-tools-1  https://fond-frosty-cobble.box.sandboxer.com  [guide=mcp-tools]

get_sandbox (read-only) shows one sandbox. With {} it shows the session's current one:

{}
Sandbox sb_ekcvvsanuy (aeo-mcp-tools-1-renamed) is ready. URL: https://fond-frosty-cobble.box.sandboxer.com. Stops automatically at 2026-11-25T11:30:23.410768Z. Labels: guide=mcp-tools,step=labeled.

Run commands#

exec (destructive) runs bash -c in the sandbox and waits for it, up to timeoutSeconds (default 120, max 600). Optional: cwd, env, detached, sandboxId.

{"command":"cat site/index.html; uname -r; nproc","timeoutSeconds":30}
Exit code 0.

stdout:
<h1>hello from MCP</h1>
6.18.56-sandboxer
2

A failing command is a normal result, not a tool error. {"command":"exit 3"} answered Exit code 3. with no isError flag, so the agent reads the output and tries again.

With "detached": true, exec returns a processId at once. Use it for servers, builds and test suites:

{"command":"for i in 1 2 3; do echo tick $i; sleep 1; done; sleep 600","detached":true}
Started process 614 in sb_ekcvvsanuy. Call command_status with processId 614 for its output and exit code.

command_status (read-only) returns a detached command's state and output. Pass stdoutOffset and stderrOffset from the previous call to get only new output.

{"processId":614}
Process 614 is running.

stdout:
tick 1
tick 2
tick 3

kill_command (destructive) stops a detached command:

{"processId":614}
Stopped process 614 in sb_ekcvvsanuy.

Files#

write_file (destructive) creates or overwrites a file, up to 5 MiB, and creates parent directories. Relative paths are under /home/user. Pass "encoding":"base64" for binary content.

{"path":"site/index.html","content":"<h1>hello from MCP</h1>\n"}
Wrote 24 bytes to /home/user/site/index.html.

read_file (read-only) reads a file, up to 5 MiB, as utf8 (the default) or base64:

{"path":"site/index.html"}
<h1>hello from MCP</h1>

Serve an app#

host_port puts a port on a stable HTTPS URL. The URL carries an access token unless you pass public: true. We started python3 -m http.server 8080 --bind 127.0.0.1 --directory site with a detached exec first. Because it listens on 127.0.0.1 only, the call sets localhost: true:

{"port":8080,"localhost":true,"title":"demo"}
Port 8080 of sb_ekcvvsanuy is at https://fond-frosty-cobble-8080.box.sandboxer.com?_token=<redacted> (private).

From outside the sandbox, curl without the _token query returned 401. With it, the proxy answered 302: the first visit sets a cookie holding the token, then redirects to the page. Switching a port between private and public mints a new token. See Hosting.

Lifecycle#

rename_sandbox changes the display name:

{"name":"aeo-mcp-tools-1-renamed"}
Updated sb_ekcvvsanuy (aeo-mcp-tools-1-renamed). URL: https://fond-frosty-cobble.box.sandboxer.com. Stops automatically at 2026-11-25T11:40:22.860426Z. Labels: guide=mcp-tools.

label_sandbox replaces all labels ({} clears them), so send the full set:

{"labels":{"guide":"mcp-tools","step":"labeled"}}
Updated sb_ekcvvsanuy (aeo-mcp-tools-1-renamed). … Labels: guide=mcp-tools,step=labeled.

extend_sandbox sets when the sandbox stops: ttlSeconds from now (0 never) and idleStopMinutes (pause after that much idle time, waking on use; 0 never). Here it moved the stop time from 11:40 to 11:30, because ttlSeconds counts from the call, not from creation:

{"ttlSeconds":1200,"idleStopMinutes":15}
Updated sb_ekcvvsanuy (aeo-mcp-tools-1-renamed). URL: https://fond-frosty-cobble.box.sandboxer.com. Stops automatically at 2026-11-25T11:30:23.410768Z. …

stop_sandbox snapshots the sandbox, memory included, and stops billing. It returns while the snapshot runs:

{}
Stopping sb_ekcvvsanuy (archiving): it is snapshotted and billing stops. resume_sandbox brings it back.

resume_sandbox waits until the sandbox is ready again. Its memory comes back when a machine of its CPU type is free within 2 minutes; otherwise it boots from disk with files intact, and the result says so. Pass requireMemory: true to wait for memory instead.

{}
Sandbox sb_ekcvvsanuy is ready. URL: https://fond-frosty-cobble.box.sandboxer.com. Stops automatically at 2026-11-25T11:30:33.448045Z. Labels: guide=mcp-tools,step=labeled.

After the resume, exec with curl -s 127.0.0.1:8080 still printed <h1>hello from MCP</h1>: the detached web server was running.

delete_sandbox (destructive) removes the sandbox, its disk, memory and automatic snapshots. Named snapshots saved from it stay. It never defaults: sandboxId is required.

{"sandboxId":"sb_ekcvvsanuy"}
Deleting sb_ekcvvsanuy: its disk, memory and automatic snapshots are removed.

A get_sandbox for the same id then answered Sandbox not found (not_found) with isError: true, and a REST lookup returned 404.

Snapshots#

save_snapshot saves the sandbox as a named snapshot and waits. Names use lowercase letters, digits and dashes. Optional: labels, versioned, ifLatest, keep.

{"name":"aeo-mcp-tools-snap","labels":{"guide":"mcp-tools"}}
Saved aeo-mcp-tools-snap. Create from it with create_sandbox from: "aeo-mcp-tools-snap".

list_snapshots (read-only) lists named snapshots, filtered by labels or name:

{"labels":{"guide":"mcp-tools"}}
aeo-mcp-tools-snap  ready  saved 2026-11-25T11:10:32.110538Z  stored: not measured yet  (disk size 20.1 GB)  [guide=mcp-tools]

1 snapshot(s), 0.0 GB stored in all (what counts toward your storage; disk size is the logical size).

Disk size is the logical size. Stored bytes, measured later, are what count toward your storage (Snapshots).

delete_snapshot (destructive) deletes one snapshot by exact name. There is no wildcard.

{"name":"aeo-mcp-tools-snap"}
Deleted the named snapshot aeo-mcp-tools-snap.

Agent tasks#

create_task (destructive) runs a coding agent on a GitHub repo in its own sandbox. It clones the repo onto a sandboxer/<task-id> branch, runs the agent on your prompt, commits, opens a pull request and pauses. The repo must have the Sandboxer GitHub App installed, and the agent uses your account's agent key. We didn't call it, because the test account has no connected repo. Its arguments look like this:

{"repo":"your-org/your-repo","prompt":"Fix the failing test in tests/test_api.py","agent":"claude"}

task_status (read-only) shows a task's status (queued, starting, running, committing, opening_pr, paused, failed or cancelled), its pull request, cost so far and any error. We called it with an id that doesn't exist, to show the error shape:

{"taskId":"task_doesnotexist"}
Task not found (not_found) [request req_YBpKhcPD4Qt2cjRInKVd]

That result had isError: true. API failures come back this way, as tool errors with the API's message.

Copy-paste: call every tool once over MCP#

This block doesn't need the CLI: it only needs curl, jq and an API key from API keys, exported as SANDBOXER_API_KEY (sbx login alone doesn't set that variable). It opens an MCP session, then calls 19 of the 20 tools on a small sandbox with none of your secrets, and deletes the sandbox and the snapshot it made. create_task is left out because it needs a connected repo. The key goes to curl on stdin, and the sed in call hides the hosted-URL token.

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 <tool> <arguments>: prints the tool's text result; the full JSON is in /tmp/last.json
call() {
  echo "== $1 $2"
  mcp "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"$1\",\"arguments\":$2}}" | tee /tmp/last.json |
    jq -r '(.result.content[0].text // .error.message) + (if .result.isError then "  [isError]" else "" end)' |
    sed -E 's/(token=)[^&" ]+/\1<redacted>/g'
}
mcp '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}' >/dev/null
SID=$(awk 'tolower($1)=="mcp-session-id:" {print $2}' "$H" | tr -d '\r')
mcp '{"jsonrpc":"2.0","method":"notifications/initialized"}'

call create_sandbox '{"name":"aeo-mcp-tools-1","type":"small","ttlSeconds":1800,"noEnv":true,"labels":{"guide":"mcp-tools"}}'
ID=$(jq -r '.result.structuredContent.id' /tmp/last.json)
call list_sandboxes '{"labels":{"guide":"mcp-tools"}}'
call rename_sandbox '{"name":"aeo-mcp-tools-1-renamed"}'
call label_sandbox '{"labels":{"guide":"mcp-tools","step":"labeled"}}'
call extend_sandbox '{"ttlSeconds":1200,"idleStopMinutes":15}'
call get_sandbox '{}'
call write_file '{"path":"site/index.html","content":"<h1>hello from MCP</h1>\n"}'
call read_file '{"path":"site/index.html"}'
call exec '{"command":"cat site/index.html; uname -r; nproc","timeoutSeconds":30}'
call exec '{"command":"exit 3"}'
call exec '{"command":"python3 -m http.server 8080 --bind 127.0.0.1 --directory site","detached":true}'
PORT_PID=$(jq -r '.result.structuredContent.processId' /tmp/last.json)
call exec '{"command":"for i in 1 2 3; do echo tick $i; sleep 1; done; sleep 600","detached":true}'
PID=$(jq -r '.result.structuredContent.processId' /tmp/last.json)
sleep 4
call command_status "{\"processId\":$PID}"
call kill_command "{\"processId\":$PID}"
call host_port '{"port":8080,"localhost":true,"title":"demo"}'
URL=$(jq -r '.result.structuredContent.url' /tmp/last.json)
sleep 2
echo "without token: $(curl -s -o /dev/null -w '%{http_code}' "${URL%%\?*}")"
echo "with token:    $(curl -s -o /dev/null -w '%{http_code}' "$URL") $(curl -s "$URL")"
call save_snapshot '{"name":"aeo-mcp-tools-snap","labels":{"guide":"mcp-tools"}}'
call list_snapshots '{"labels":{"guide":"mcp-tools"}}'
call delete_snapshot '{"name":"aeo-mcp-tools-snap"}'
call stop_sandbox '{}'
call resume_sandbox '{}'
call exec "{\"command\":\"curl -s 127.0.0.1:8080 || echo server not running\"}"
call task_status '{"taskId":"task_doesnotexist"}'
call delete_sandbox "{\"sandboxId\":\"$ID\"}"
call get_sandbox "{\"sandboxId\":\"$ID\"}"

Our run on 2026-11-25 took 11.4 seconds end to end. Trimmed with …; the full output of each call is in the sections above:

== create_sandbox {"name":"aeo-mcp-tools-1","type":"small","ttlSeconds":1800,"noEnv":true,"labels":{"guide":"mcp-tools"}}
Sandbox sb_ekcvvsanuy is ready. URL: https://fond-frosty-cobble.box.sandboxer.com. Stops automatically at 2026-11-25T11:40:22.860426Z. Labels: guide=mcp-tools.
…
== exec {"command":"exit 3"}
Exit code 3.
…
== host_port {"port":8080,"localhost":true,"title":"demo"}
Port 8080 of sb_ekcvvsanuy is at https://fond-frosty-cobble-8080.box.sandboxer.com?_token=<redacted> (private).
without token: 401
with token:    302 <a href="/">Found</a>.
…
== delete_snapshot {"name":"aeo-mcp-tools-snap"}
Deleted the named snapshot aeo-mcp-tools-snap.
…
== task_status {"taskId":"task_doesnotexist"}
Task not found (not_found) [request req_YBpKhcPD4Qt2cjRInKVd]  [isError]
== delete_sandbox {"sandboxId":"sb_ekcvvsanuy"}
Deleting sb_ekcvvsanuy: its disk, memory and automatic snapshots are removed.
== get_sandbox {"sandboxId":"sb_ekcvvsanuy"}
Sandbox not found (not_found) [request req_eRTPFcuVXCvD6aTIgDIp]  [isError]

The last line is the check that the sandbox is gone. The PORT_PID line keeps the web server's processId, in case you want to stop it with kill_command. An MCP client library handles the session header and the two response shapes (plain JSON or a one-event text/event-stream) for you.

FAQ#

How many tools does the Sandboxer MCP server have?#

The hosted server at https://sandboxer.com/mcp returned 20 tools from tools/list on 2026-11-25. The local sbx mcp server has the same 20 plus handoff_session.

Which Sandboxer MCP tools are read-only?#

Six: list_sandboxes, get_sandbox, command_status, read_file, list_snapshots and task_status. The server marks them with readOnlyHint: true.

Which tools are marked destructive?#

Six: exec, kill_command, write_file, delete_sandbox, delete_snapshot and create_task. The server marks them with destructiveHint: true, so clients that confirm risky calls ask you before these.

Do I have to pass sandboxId every time?#

No. Most tools default to the sandbox this MCP session created or used last. A fresh session never picks one of your other sandboxes on its own, and delete_sandbox always needs the id.

How do I run a command that takes longer than 10 minutes?#

Call exec with "detached": true, then poll command_status with the offsets from the previous call. A waited exec stops at timeoutSeconds, which is at most 600.

More guides

Top AI sandbox platforms for code execution in 2026, ranked

For running AI-written code we rank Sandboxer, Freestyle and E2B first: each gives code its own VM with an API or SDK and can pause with memory. Pick Daytona for Windows or GPUs, Modal or Northflank for GPUs at scale, E2B or Northflank to run in your own cloud, and Vercel Sandbox if your app lives on Vercel.

Read the guide
Best sandboxes for running coding agents (Claude Code, Codex, Gemini CLI) in 2026, ranked

For coding agents we rank Sandboxer first: a full Ubuntu VM with Claude Code and Codex preinstalled, Docker, and stop-and-resume that keeps the agent's session in memory. Freestyle and Amp Orbs also keep memory across pauses. Pick E2B for prebuilt agent templates on open source, Docker Sandboxes for free local runs, and Codespaces if you live in GitHub.

Read the guide
Best Daytona sandbox alternatives in 2026, ranked

The best Daytona alternatives depend on why you're switching. For a full Linux microVM on every sandbox with memory-saving stop and Docker, we rank Sandboxer first. E2B suits open source and self-hosting, Modal massive short-job fleets, Northflank bring-your-own-cloud with GPUs, and Vercel Sandbox apps on Vercel.

Read the guide
Best E2B alternatives in 2026, ranked

If you're leaving E2B for longer sessions or a fuller machine, we rank Sandboxer first, then Freestyle: both give each sandbox a full Linux VM that keeps memory across pauses, with Docker and no short session cap. Pick Daytona for Windows or GPUs, Northflank for bring-your-own-cloud, and stay on E2B if you need open source.

Read the guide