OpenSandbox MCP Sandbox Server (Python)
Project description
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.
Streamable HTTP
opensandbox-mcp \
--transport streamable-http
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."
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opensandbox_mcp-0.1.1.tar.gz.
File metadata
- Download URL: opensandbox_mcp-0.1.1.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5408c4df804acdec3bfd47928b58cd3e81c19cd3786d7b1c39b22bc4b8baaabe
|
|
| MD5 |
3cd792af84825ae67fb9b2d34ae35978
|
|
| BLAKE2b-256 |
6c8e936ecadbdb6fe8b670c185bed8a671c28b5f5173a50d49e37a14f2179043
|
File details
Details for the file opensandbox_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: opensandbox_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
997f2b5e45d6740fbd907ddeea66248d06277e0f1b2dc0eec2adcaeb763da700
|
|
| MD5 |
05985c3cc5dda9b0d5544097d389afb8
|
|
| BLAKE2b-256 |
cbfbb72af7ee5ea19684d4c074bf635145d226dc7842c32ffa7b7351e553eb62
|