@baobabtech/sandbox-mcp
v0.2.0
Published
MCP server for baobab-sandbox: lets Claude Code, Cursor and other MCP clients run code in self-hosted microVM sandboxes
Readme
@baobabtech/sandbox-mcp
MCP server for baobab-sandbox, which serves self-hosted microVM sandboxes for AI agents. It lets Claude Code, Cursor, Claude Desktop and any other MCP client run code in isolated VMs on your infrastructure.
Setup
You need a baobab-sandbox deployment and an API key (sbx key create <app> on the server).
Claude Code
claude mcp add baobab-sandbox \
-e SBX_URL=https://sandbox.example.com \
-e SBX_TOKEN=sbx_… \
-- npx -y @baobabtech/sandbox-mcpCursor / Claude Desktop / other clients (mcpServers config)
{
"mcpServers": {
"baobab-sandbox": {
"command": "npx",
"args": ["-y", "@baobabtech/sandbox-mcp"],
"env": { "SBX_URL": "https://sandbox.example.com", "SBX_TOKEN": "sbx_…" }
}
}
}For the agent: AGENTS.md (shipped in the package) explains how to use the tools well: reuse one sandbox, non-zero exits are results, no network by default, brokered secrets.
Tools
| Tool | What it does |
|---|---|
| create_sandbox | New microVM (template, timeout_seconds, egress, vcpus, memory_mb); returns sandbox_id |
| run_command | Runs a shell command (sh -c, so pipes and && work); returns exit_code, stdout, stderr |
| write_file / read_file | Moves files in and out (absolute paths; binary files are read as base64) |
| extend_sandbox | More time before the automatic stop |
| stop_sandbox | Stops and deletes the sandbox |
| list_sandboxes / list_templates | What's running, and what you can start |
Sandboxes have no network unless your operator granted your app egress and the model asks for egress: true. API keys you need inside the sandbox can be brokered so the model never sees them.
Settings
| Variable | Default | |
|---|---|---|
| SBX_URL | http://127.0.0.1:7070 | baobab-sandbox API |
| SBX_TOKEN | required | your app's API key |
| SBX_MCP_KEEP | 0 | 1 keeps sandboxes running after the MCP session ends (by default they're stopped) |
| SBX_MCP_MAX_OUTPUT | 50000 | characters of stdout/stderr returned per call (the middle is trimmed) |
The OPENSANDBOX_* names from before the rename (the package was @baobabtech/open-sandbox-mcp) still work.
License
Apache-2.0
