Installation
Server
The OpenSandbox server is a FastAPI-based service that manages sandbox lifecycles. It supports Docker and Kubernetes runtimes.
bash
# Install from PyPI
uv pip install opensandbox-server
# Or with pip
pip install opensandbox-serverRequirements:
- Python 3.10+
- Docker Engine 20.10+ (Docker runtime) or Kubernetes 1.21.1+ (Kubernetes runtime)
- Linux, macOS, or Windows with WSL2
See Configuration for server setup.
SDKs
Sandbox SDKs
The core SDKs for sandbox lifecycle management, command execution, and file operations.
bash
pip install opensandboxbash
npm install @alibaba-group/opensandboxkotlin
dependencies {
implementation("com.alibaba.opensandbox:sandbox:{latest_version}")
}xml
<dependency>
<groupId>com.alibaba.opensandbox</groupId>
<artifactId>sandbox</artifactId>
<version>{latest_version}</version>
</dependency>bash
go get github.com/alibaba/OpenSandbox/sdks/sandbox/gobash
dotnet add package Alibaba.OpenSandboxFor detailed SDK usage, see the SDK documentation.
Code Interpreter SDKs
Higher-level SDKs for multi-language code execution inside sandboxes.
bash
pip install opensandbox-code-interpreterbash
npm install @alibaba-group/opensandbox-code-interpreterkotlin
dependencies {
implementation("com.alibaba.opensandbox:code-interpreter:{latest_version}")
}bash
dotnet add package Alibaba.OpenSandbox.CodeInterpreterCLI
The osb CLI provides terminal-based sandbox management.
bash
pip install opensandbox-cli
# or
uv tool install opensandbox-cliSee the CLI reference for the full command set.
MCP Server
The MCP server exposes sandbox operations to MCP-capable clients like Claude Code and Cursor.
bash
pip install opensandbox-mcp
opensandbox-mcp --domain localhost:8080 --protocol httpMinimal stdio config for MCP clients:
json
{
"mcpServers": {
"opensandbox": {
"command": "opensandbox-mcp",
"args": ["--domain", "localhost:8080", "--protocol", "http"]
}
}
}See the MCP documentation for client-specific setup.