Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/opensandbox-group/OpenSandbox/llms.txt

Use this file to discover all available pages before exploring further.

OpenSandbox follows a component model: a central server manages sandbox lifecycles, while SDKs (in six languages), the CLI, and the MCP server are independent client packages that communicate with it. You only need to install the components relevant to your workflow — at minimum, the server and one SDK or the CLI.

Server

The OpenSandbox server is a Python FastAPI service that manages the full sandbox lifecycle. It supports both Docker and Kubernetes runtimes.
# With uv (recommended)
uv pip install opensandbox-server

# With pip
pip install opensandbox-server
Requirements:
RequirementVersion
Python3.10+
Docker Engine20.10+ (Docker runtime)
Kubernetes1.21.1+ (Kubernetes runtime)
OSLinux, macOS, or Windows with WSL2
After installing, see the Configuration guide to generate a config file and start the server.

Sandbox SDKs

The core SDK layer covers sandbox lifecycle management, command execution, and file operations. Choose the package for your language.
pip install opensandbox

Code Interpreter SDKs

The Code Interpreter SDK is a higher-level layer on top of the base Sandbox SDK. It provides structured multi-language code execution (Python, JavaScript, and more) with rich result output. Install it separately in addition to the base SDK.
pip install opensandbox-code-interpreter
The Code Interpreter SDK does not include a Go package. Go users can invoke code execution through the base Sandbox SDK’s command execution API directly.

CLI

The osb CLI provides a terminal-based interface for the full sandbox workflow: creating sandboxes, running commands, moving files, inspecting diagnostics, and managing egress policy.
pip install opensandbox-cli
After installing, configure the CLI to point at your server:
osb config init
osb config set connection.domain localhost:8080
osb config set connection.protocol http
osb config set connection.api_key <your-api-key>
See the CLI reference for the full command set.

MCP Server

The OpenSandbox MCP server exposes sandbox creation, command execution, and text file operations to any MCP-capable client such as Claude Code and Cursor.
pip install opensandbox-mcp
Start the MCP server and point it at your OpenSandbox instance:
opensandbox-mcp --domain localhost:8080 --protocol http
Minimal stdio configuration for MCP clients:
{
  "mcpServers": {
    "opensandbox": {
      "command": "opensandbox-mcp",
      "args": ["--domain", "localhost:8080", "--protocol", "http"]
    }
  }
}
See the MCP documentation for client-specific setup instructions.

Optional: Sandbox Pool with Redis

For deployments that use a sandbox pool backed by Redis, install the optional pool-redis extra:
pip install "opensandbox[pool-redis]"
The pool-redis extra is only needed when you configure a Redis-backed renew-intent queue or sandbox pool. It is not required for standard Docker or Kubernetes deployments.

Build docs developers (and LLMs) love