OpenSandbox MCP Sandbox Server
1. Overview
OpenSandbox MCP Server exposes the OpenSandbox Python SDK as MCP tools for Claude Code, Cursor, and other MCP-capable clients. It provides focused sandbox lifecycle management, command execution, and text file operations.
2. Installation & Startup
Source
uv sync
uv run opensandbox-mcp
Package
pip install opensandbox-mcp
opensandbox-mcp
Configuration
Environment variables:
OPEN_SANDBOX_API_KEYOPEN_SANDBOX_DOMAIN
CLI overrides:
opensandbox-mcp --api-key ... --domain ... --protocol https
Config fields:
api_key: OpenSandbox API key for authentication.domain: OpenSandbox API domain, for exampleapi.opensandbox.io.protocol:httporhttpsfor API requests.request_timeout_seconds: HTTP request timeout in seconds.transport:stdioby default, orstreamable-http.use-server-proxy: when present, forces the SDK client to use server proxy mode.
Streamable HTTP
opensandbox-mcp \
--transport streamable-http \
--host 0.0.0.0 \
--port 8000
The HTTP transport defaults to 127.0.0.1:8000. Set --host 0.0.0.0 when the MCP server must be reached from another container, and use --port to select a different listening port. Keep the default loopback host unless the container network or an upstream gateway protects the exposed endpoint.
3. Integrations
Claude Code stdio
claude mcp add opensandbox-sandbox --transport stdio -- \
opensandbox-mcp --api-key "$OPEN_SANDBOX_API_KEY" --domain "$OPEN_SANDBOX_DOMAIN"
Claude Code http
claude mcp add opensandbox-sandbox --transport http http://localhost:8000/mcp
Cursor stdio
{
"mcpServers": {
"opensandbox-sandbox": {
"command": "opensandbox-mcp",
"args": [
"--api-key",
"${OPEN_SANDBOX_API_KEY}",
"--domain",
"${OPEN_SANDBOX_DOMAIN}"
]
}
}
}
Cursor http
{
"mcpServers": {
"opensandbox-sandbox": {
"url": "http://localhost:8000/mcp"
}
}
}
4. Tools
Notes:
- All tools operate on a
sandbox_idreturned bysandbox_createorsandbox_connect. file_read/file_writeare text-only; useencodingandrange_headerfor large files.
Sandbox
sandbox_create: create a new sandbox and register it locallysandbox_connect: attach to an existing sandbox and register it locallysandbox_kill: terminate a sandbox by IDsandbox_get_info: fetch sandbox info by IDsandbox_list: list sandboxes with optionalfilterobjectsandbox_renew: extend sandbox expirationsandbox_healthcheck: check if sandbox is healthysandbox_get_metrics: get resource metricssandbox_get_endpoint: get network endpoint for a port
Command Execution
command_run: run a command inside a sandboxcommand_interrupt: interrupt a running command
Filesystem
file_read: read a text filefile_write: write a text filefile_delete: delete filesfile_search: search for files by globfile_create_directories: create directoriesfile_delete_directories: delete directoriesfile_move: move/rename files or directoriesfile_replace_contents: replace file content
5. Minimal Workflow
sandbox_create-> keep thesandbox_id.file_writecode or assets into the sandbox.command_runto execute, install dependencies, or start a service.sandbox_get_endpointif you expose a port.sandbox_killwhen finished.
6. Usage Examples
Here are some examples of what you can ask an LLM to do:
- "Create a Python sandbox and run a quick health command."
- "Write a Python script into the sandbox and run it."
- "Download a GitHub repo, install dependencies, and run its tests."
- "Generate a CSV file with fake sales data and run a simple summary script."
- "Start a tiny web server on port 8000 and return the public URL."
- "Build a minimal REST API (hello + health) and expose it on port 8000."
- "Create a tar.gz of /app and report the file size."
- "Build a simple Snake game and return the web endpoint where it can be accessed."
Metadata
Release files for opensandbox-mcp 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| opensandbox_mcp-1.2.0.tar.gz | 16.6 kB | Without provenance | Details for opensandbox_mcp-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opensandbox_mcp-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for opensandbox_mcp-1.2.0-py3-none-any.whl |
Total release size: 36.1 kB
Release files / opensandbox_mcp-1.2.0.tar.gz
| Download URL | opensandbox_mcp-1.2.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa0bd35c2b0c9d2e5c988b1b1d938bf5add5998dd5e2b96d20269b326a720998
|
|
BLAKE2b-256 checksum How to use checksums |
069077ea06e8e040382505c2f90ae7ebcf10903d4bd73912feb0750c9352df14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / opensandbox_mcp-1.2.0-py3-none-any.whl
| Download URL | opensandbox_mcp-1.2.0-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5fe61abf93af935d9f612022c544cd1fea287e75f005e6608a8a449f37fb722
|
|
BLAKE2b-256 checksum How to use checksums |
31c30b7b22c347a4d1e8c33b697ca24895c113e3a6ba5b116db7b864e3fbb145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for opensandbox-mcp 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.