> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.modbox.run/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.modbox.run/_mcp/server.

# May 22, 2026

## New features

### Sandbox REST API

The `modbox/sandbox` image now exposes a built-in REST API for programmatic interaction without requiring a full browser or terminal session.

**Exec endpoint** — run any shell command and get stdout, stderr, exit code and duration:

```bash
POST {sandbox_url}/modbox/api/exec
Authorization: Bearer {SANDBOX_API_KEY}

{
  "command": "python3 script.py",
  "timeout": 15000,
  "cwd": "/workspace"
}
```

Response includes `exitCode`, `stdout`, `stderr`, `durationMs`, and a `truncated` flag if output exceeded 512 KB.

**Files endpoint** — upload, list, download and delete files inside the sandbox:

```
POST   {sandbox_url}/modbox/api/files/upload      (multipart, max 50 MB)
GET    {sandbox_url}/modbox/api/files
GET    {sandbox_url}/modbox/api/files/download/{filename}
DELETE {sandbox_url}/modbox/api/files/{filename}
```

All `/modbox/api/*` routes require `Authorization: Bearer {SANDBOX_API_KEY}`. Pass `SANDBOX_API_KEY` as an `env_var` when provisioning the sandbox.

### MCP server endpoints

Every `modbox/sandbox` instance now exposes two built-in MCP servers accessible directly from the sandbox URL:

| Path             | Capability                                                |
| ---------------- | --------------------------------------------------------- |
| `/mcp/terminal/` | Bash shell over MCP (SSE / Streamable HTTP)               |
| `/mcp/cdp/`      | Chromium browser control over MCP (SSE / Streamable HTTP) |

Connect any MCP-compatible client (Claude Desktop, VS Code, custom agents) by pointing it at either endpoint — no additional configuration required.

### CDP proxy improvements

The Chromium CDP endpoint (`/cdp/`) now correctly rewrites WebSocket debugger URLs in responses, allowing Playwright and Puppeteer to connect through the proxy without manual URL manipulation.

Use `connectOverCDP` with the HTTP endpoint:

```typescript
const browser = await chromium.connectOverCDP(
  `https://${new URL(sandbox.sandboxUrl).host}/cdp`
);
```

## Documentation

* New guide: [The modbox/sandbox Image](/guides/modbox-sandbox) — covers all routes, the exec and files API, CDP setup, VNC access, MCP integration, proxy support, and comparison with `modbox/sandbox-lite`