Skip to main content
Glama

@hadronbox/mcp

MCP server (stdio) that lets an AI agent use hadronbox.tr machines as its sandbox: create a machine, run commands, read and write files, pause or resume it, start from a snapshot and open a preview URL.

HADRONBOX_API_KEY=... npx -y @hadronbox/mcp

Node.js 20 or later. One bundled file, no runtime dependencies. Docs: https://hadronbox.tr/docs/mcp

Tools

Tool

What it does

API key scope

create_machine

Create a machine and wait until it runs (template, size, tools)

machines:create, machines:read

list_machines

Machines with id, name, status and the quota

machines:read

exec

Run a command; exit code, stdout, stderr; timeout; long output shortened

machines:exec

read_file

Read a text file under /workspace

machines:exec

write_file

Create or replace a text file under /workspace

machines:exec

pause_machine

Pause a machine

machines:manage

resume_machine

Resume a paused machine

machines:manage

list_snapshots

Saved snapshots

snapshots:read

create_from_snapshot

New machine from a ready snapshot

machines:create, machines:read

expose_port

Private https preview URL for a port

machines:manage

delete_machine

Delete a machine (listed only with --allow-delete)

machines:delete

Use a scoped API key (panel: API keys page). machines:read + machines:exec is enough to work on existing machines; add machines:create to let the agent create machines. Errors come back as tool results the model can act on: a missing scope names the scope, COMMAND_BLOCKED explains the blocked part, CREDIT_INSUFFICIENT (402) shows the balance.

Related MCP server: tenki-mcp

Configuration

Variable

Meaning

HADRONBOX_API_KEY

API key (required)

HADRONBOX_BASE_URL

API base URL (default https://api.hadronbox.tr/v1)

HADRONBOX_MCP_ALLOW_DELETE

1 = also offer delete_machine (same as --allow-delete)

Claude Code:

claude mcp add hadronbox --env HADRONBOX_API_KEY=$HADRONBOX_API_KEY -- npx -y @hadronbox/mcp

Claude Desktop / Cursor (claude_desktop_config.json, .cursor/mcp.json):

{
  "mcpServers": {
    "hadronbox": {
      "command": "npx",
      "args": ["-y", "@hadronbox/mcp"],
      "env": { "HADRONBOX_API_KEY": "<HADRONBOX_API_KEY>" }
    }
  }
}

Replace <HADRONBOX_API_KEY> with your own API key, and do not commit a file that contains it.

Development (in the ai-sandbox-platform repository)

npx vitest run sdks/mcp      # tests (fake API server, no network)
npm run build --prefix sdks/mcp   # dist/hadronbox-mcp.js (bundles sdks/typescript)

License: Apache-2.0

Available Tools

10 tools
create_from_snapshotCreate machine from snapshotA

Create a new machine from a ready snapshot (its files and installed tools included) and wait until it is running.

Inputs: name (required), snapshot_id (required), size, wait_until_running.

create_machineCreate machineA

Create a new hadronbox sandbox machine (a Linux VM with a /workspace directory) and wait until it is running. Returns its machine_id. Machines cost credits while running; reuse an existing one (list_machines) when you can.

Inputs: name (required), size, tools, template, +1 more.

execRun commandA
Destructive

Run a shell command line in a running machine and return its exit code, stdout and stderr. Project files live under /workspace (start with "cd /workspace && ..."). Long output is shortened in the middle. The command is stopped when timeout_seconds passes. No stdin; for multi-line programs write a script with write_file first.

Inputs: command (required), machine_id (required), timeout_seconds, max_output_chars.

expose_portExpose portA

Expose a TCP port of a machine (e.g. a dev server on 3000) at a private https preview URL. Only signed-in members of the account (or holders of a preview token) can open it.

Inputs: port (required), machine_id (required), label.

list_machinesList machinesA
Read-onlyIdempotent

List the sandbox machines of the account with their machine_id, name and status (running, paused, creating, stopped, error), plus the machine quota.

Inputs: page, limit, search, status.

list_snapshotsList snapshotsA
Read-onlyIdempotent

List the saved machine snapshots (snapshot_id, name, status). A "ready" snapshot can start a new machine with create_from_snapshot.

Inputs: page, limit, search, status.

pause_machinePause machineA
Idempotent

Pause a running machine: it stops using credits for compute and keeps its state; resume_machine continues it.

Inputs: machine_id (required).

read_fileRead fileA
Read-onlyIdempotent

Read a UTF-8 text file from a running machine. path is relative to /workspace (e.g. "src/index.ts"); it cannot leave /workspace.

Inputs: path (required), machine_id (required).

resume_machineResume machineA
Idempotent

Resume a paused machine so exec, read_file and write_file work again.

Inputs: machine_id (required).

write_fileWrite fileA
DestructiveIdempotent

Create or replace a UTF-8 text file in a running machine. path is relative to /workspace; parent directories are created.

Inputs: path (required), content (required), machine_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 10 tools

    Disambiguation4/5

    Each tool targets a distinct resource and action: machine lifecycle (create, pause, resume, list), snapshot listing/instantiation, port exposure, and file/shell operations. The only mild overlap is create_machine versus create_from_snapshot, but the descriptions make the distinction clear (blank VM vs. from a ready snapshot).

    Naming Consistency4/5

    Nine of ten tools follow a clean verb_noun snake_case pattern (list_snapshots, create_from_snapshot, pause_machine, read_file, write_file, etc.). The lone bare verb 'exec' is a minor deviation but remains unambiguous.

    Tool Count5/5

    Ten tools is a well-scoped set for a sandbox VM service, with each tool earning its place across lifecycle, file I/O, command execution, and preview exposure. Nothing feels padded or missing at the count level.

    Completeness3/5

    Core workflows are covered, but the lifecycle is a dead end: there is no delete/stop machine tool and no create_snapshot tool, so the snapshot surface is read-only and machines can only be paused, never destroyed. File deletion is also only possible indirectly via exec.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers