sandstorm-mcp

v0.3.0
sandstorm-mcp Checked 11 hours ago Published 29 days ago

Model Context Protocol server for Sandstorm: gVisor and Firecracker sandboxes across a fleet of nodes

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_templates

List the registered templates, which spawn_sandboxes can start from.

list_snapshots

List snapshot tags, which spawn_sandboxes can fork from. A tag is a checkpoint made by branch_sandbox, so a new deployment has none. Returns Snapshot objects: tag, node_id, template, from_sandbox, dir, size_bytes, created_at.

delete_snapshot

Delete a snapshot tag. Refused with 409 while sandboxes are forked from it.

ParameterTypeDescription
tag *string

spawn_sandboxes

Start N sandboxes from a template, or fork them from a snapshot tag. Waits until each one is running, so it can be used straight away. Args: template: Template to start from (see list_templates). Give this or snapshot_tag, not both. snapshot_tag: Tag to fork from (see list_snapshots). n: Number of sandboxes, 1..256. memory_limit_mib: Memory ceiling for each, overriding the template's. Leave unset to use the template's. start_timeout_secs: How long to wait for all of them to start. Returns the Sandbox objects (one pe…

ParameterTypeDescription
memory_limit_mib
ninteger
snapshot_tag
start_timeout_secsnumber
template

touch_sandbox

Mark a sandbox used, which brings it back to hot. branch_sandbox needs a hot sandbox and answers 409 otherwise, and an idle one is moved to a colder tier.

ParameterTypeDescription
sandbox_id *string

branch_sandbox

Checkpoint a running sandbox into a new snapshot tag. The parent keeps running, after a short pause. Any later spawn_sandboxes call can use the tag as its snapshot_tag, to fan out N children that all inherit the source's exact state at branch time. This is sandstorm's core primitive. Args: sandbox_id: Id of the source sandbox (see list_sandboxes). It must be hot; touch_sandbox wakes it. tag: Name for the new snapshot: no slashes, no leading dots. Returns a Snapshot: tag, node_id, template, from_sandbox, dir, size_bytes, created_at.…

ParameterTypeDescription
sandbox_id *string
tag *string

wait_for_text

Poll a file inside a sandbox until it contains a marker string. Common pattern: agent writes its progress to a stdout log inside the guest; the orchestrator (you, the MCP client) polls until a marker like "READY_TO_BRANCH" appears, then triggers branch. Avoids busy-waiting from outside the master's exec round-trip. Args: sandbox_id: Target sandbox. path: Absolute path inside the guest of the file to poll. marker: Substring to wait for. Returned as-is when found. timeout_secs: Max wall-clock seconds to wait. Default 60. poll_interval…

ParameterTypeDescription
marker *string
path *string
sandbox_id *string
poll_interval_msinteger
sandbox_token
timeout_secsnumber

list_sandboxes

List every sandbox, on whichever tier it is. Tokens are not included.

get_sandbox

Fetch metadata about one sandbox by id. Its token is not included.

ParameterTypeDescription
sandbox_id *string

kill_sandbox

Delete one sandbox, on whichever tier it is.

ParameterTypeDescription
sandbox_id *string

exec_command

Run a subprocess inside a sandbox. Example: exec_command("sb-abc-0000", ["python3", "-c", "print(2+2)"], sandbox_token="<token-from-creation>") sandbox_token: Token from the creation response; required by v0.6. Returns: {stdout, stderr, exit_code}.

ParameterTypeDescription
args *array
sandbox_id *string
sandbox_token
timeout_secsinteger

eval_code

Run a code snippet in a sandbox and return what it printed. The snippet runs with the template's eval_argv, python3 -c by default, in a fresh process. Only printed output comes back, so use print(2+2), not a bare expression. sandbox_token: Token from the creation response; required by v0.6. Returns: {result, exit_code}, or {error, exit_code} if it failed.

ParameterTypeDescription
code *string
sandbox_id *string
sandbox_token
timeout_secsinteger

ping_sandbox

Check a sandbox answers. sandbox_token: Token from the creation response; required by v0.6. Returns: {ok, tier, guest_addr, latency_ms}. ok says whether something accepts connections on the sandbox's port, so it stays false in a running sandbox that serves nothing.

ParameterTypeDescription
sandbox_id *string
sandbox_token