Installation
Server
The OpenSandbox server is a FastAPI-based service that manages sandbox lifecycles. It supports Docker and Kubernetes runtimes.
pip install opensandbox-serveruv 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.
pip install opensandboxnpm install @alibaba-group/opensandboxdependencies {
implementation(platform("com.alibaba.opensandbox:sandbox-bom:{latest_version}"))
implementation("com.alibaba.opensandbox:sandbox")
}<dependency>
<groupId>com.alibaba.opensandbox</groupId>
<artifactId>sandbox</artifactId>
<version>{latest_version}</version>
</dependency>go get github.com/alibaba/OpenSandbox/sdks/sandbox/godotnet add package Alibaba.OpenSandboxFor detailed SDK usage, see the SDK documentation.
Choose a published SDK version for your application. Replace {latest_version} in the JVM examples with that version; use the BOM when combining JVM modules such as sandbox and sandbox-pool-redis. See the release index.
Feature availability differs by language. See the capability matrix, Client Pool, and SDK Tracing.
CLI
The osb CLI provides terminal-based sandbox management.
pip install opensandbox-cliuv 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.
pip install opensandbox-mcpuv pip install opensandbox-mcpopensandbox-mcp --domain localhost:8080 --protocol httpMinimal stdio config for MCP clients:
{
"mcpServers": {
"opensandbox": {
"command": "opensandbox-mcp",
"args": ["--domain", "localhost:8080", "--protocol", "http"]
}
}
}See the MCP documentation for client-specific setup.