ScaleBox MCP Server

A Model Context Protocol server for running code in ScaleBox sandboxes. It provides sandbox lifecycle management, code execution, filesystem APIs, package installation, and shell command execution.

Typical MCP client config (stdio via npx):

{ "mcpServers": { "scalebox": { "command": "npx", "args": ["-y", "@scalebox/mcp", "--api-key", "YOUR_API_KEY"] } } }

Node npx Setup

Use `npx -y @scalebox/mcp --api-key ...` for stdio mode. The npm package scope is `@scalebox/mcp` (not `@scalebox-dev`).

Open Node npx Setup

Python FastMCP Modes

Run Python via FastMCP in stdio, HTTP, or SSE mode. The default HTTP endpoint is `http://127.0.0.1:8000/mcp`.

Open Python FastMCP Modes

Tool Lifecycle

Follow `create_sandbox` -> use `context_id` for execute/files/commands -> `destroy_context`, covering code execution, filesystem operations, package install, and shell commands.

Open Tool Lifecycle

Auth & Runtime Ops

Auth supports CLI flags, env vars (`SBX_API_KEY`/`SCALEBOX_API_KEY`), and HTTP headers (`X-API-Key` / Bearer). Docker and Makefile targets are included.

Open Auth & Runtime Ops

Repository

View source code, package release workflow (`packages/js` + semantic-release), and runtime setup details for Node and Python modes.

Open scalebox-mcp