本站支持搜索的镜像仓库:Docker Hub、gcr.io、ghcr.io、quay.io、k8s.gcr.io、registry.gcr.io、elastic.co、mcr.microsoft.com

302 Sandbox MCP.
What is an MCP Server?
| Attribute | Details |
|---|---|
| Docker Image | mcp/302_sandbox |
| Author | 302ai |
| Repository | [***] |
| Dockerfile | [***] |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | !Docker Scout Health Score |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/302_sandbox --key [***] |
| Licence | MIT License |
| Tools provided by this Server | Short Description |
|---|---|
createSandbox | Create a Linux sandbox that can execute code, run commands, upload and download files, and has complete Linux functionality. |
directRunCode | Automatically creates a sandbox, executes code, and immediately destroys the sandbox after execution. |
downloadSandboxFiles | Export files from a sandbox directory or file path to downloadable urls. |
killSandbox | Destroy a sandbox by its ID. |
listSandboxFiles | List files and directories at specified paths within a sandbox. |
listSandboxes | Query the list of sandboxes associated with the current API key. |
runCode | Run code on a specific sandbox. |
runCommand | Run a command line command on a specific linux sandbox. |
writeSandboxFiles | Import files from public URLs or base64 data into a sandbox. |
createSandboxCreate a Linux sandbox that can execute code, run commands, upload and download files, and has complete Linux functionality. After successful creation, a sandbox_id will be returned, and all subsequent operations will need to include this sandbox_id to specify the corresponding sandbox. After successful creation, the sandbox will automatically pause. When calling other sandbox operation interfaces later, it will automatically reconnect and pause again after execution to avoid generating extra costs.
| Parameters | Type | Description |
|---|---|---|
max_alive_time | integer | Maximum alive time of the sandbox (seconds), recommand 300. |
envs | object optional | Environment variables to set (optional) |
metadata | object optional | Sandbox metadata (optional) |
sandbox_name | string optional | Custom sandbox name (optional) |
directRunCodeAutomatically creates a sandbox, executes code, and immediately destroys the sandbox after execution. Optionally exports sandbox files (compresses multiple files into a zip archive if there are multiple files in the specified path, or exports a single file directly). Recommended for use cases that don't require continuous sandbox operations.
| Parameters | Type | Description |
|---|---|---|
code | string | The source code to be executed in the sandbox |
language | string | The programming language to execute the code. If not provided or if the value is not in the allowed options, it will be treated as Python code |
envs | object optional | Environment variables to be set during code execution. Supports passing custom environment variables as key-value pairs |
is_download | boolean optional | Flag to indicate whether to download generated files. Must be enabled if the code generates files that need to be retrieved |
timeout | number optional | Maximum execution time in seconds for the sandbox. If code execution exceeds this time, it will be terminated and return a timeout error. Default is 5 |
downloadSandboxFilesExport files from a sandbox directory or file path to downloadable urls. Supports batch export of multiple directories or files. When exporting directories, only common file formats are included (documents, images, audio, video, compressed files, web files, and programming language files).
| Parameters | Type | Description |
|---|---|---|
path | string | Path(s) to export from the sandbox. |
sandbox_id | string | The ID of the sandbox to export files from |
killSandboxDestroy a sandbox by its ID.
| Parameters | Type | Description |
|---|---|---|
sandbox_id | string | The ID of the sandbox to destroy |
listSandboxFilesList files and directories at specified paths within a sandbox. Supports batch queries with multiple paths. This operation can be used before downloadSandboxFiles to check if the file exists.
| Parameters | Type | Description |
|---|---|---|
path | string | |
sandbox_id | string | The ID of the sandbox to query files from |
listSandboxesQuery the list of sandboxes associated with the current API key. If no parameters are passed, all current sandboxes will be returned.
| Parameters | Type | Description |
|---|---|---|
sandbox_id | string optional | Filter by sandbox ID (optional) |
sandbox_name | string optional | Filter by sandbox name provided during creation (optional) |
runCodeRun code on a specific sandbox. This returns text output only. For operations that generate files, you'll need to use separate file viewing and export endpoints. Default file saving path is /home/user.
| Parameters | Type | Description |
|---|---|---|
code | string | The code to run |
sandbox_id | string | The ID of the sandbox to run the code on |
envs | object optional | Environment variables to set when running the code |
language | string optional | The programming language to use. If not specified or if the value is not in the allowed range, it will be treated as Python code. |
timeout | integer optional | The timeout for code execution in seconds |
runCommandRun a command line command on a specific linux sandbox. This returns text output only. For operations that generate files, you'll need to use separate file viewing and download endpoints.
| Parameters | Type | Description |
|---|---|---|
cmd | string | The command line command to run |
sandbox_id | string | The ID of the sandbox to run the command on |
envs | object optional | Environment variables to set when running the command |
timeout | integer optional | The timeout for command execution in seconds. When installing dependencies or performing similar operations, it is recommended to set it to above 120 seconds. |
writeSandboxFilesImport files from public URLs or base64 data into a sandbox. Supports batch import of multiple files. If the target file already exists, it will be overwritten. If the target directory doesn't exist, it will be automatically created. You must create a sandbox before calling this tool.
| Parameters | Type | Description |
|---|---|---|
file_list | array | List of files to import into the sandbox |
sandbox_id | string | The ID of the sandbox to write files to. |
{ "mcpServers": { "302_sandbox": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "302AI_API_KEY", "mcp/302_sandbox" ], "env": { "302AI_API_KEY": "YOUR_API_KEY_HERE" } } } }
Why is it safer to run MCP Servers with Docker?
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录方式配置轩辕镜像加速服务,包含7个详细步骤
在 Linux 系统上配置轩辕镜像源,支持主流发行版
在 Docker Desktop 中配置轩辕镜像加速,适用于桌面系统
在 Docker Compose 中使用轩辕镜像加速,支持容器编排
在 k8s 中配置 containerd 使用轩辕镜像加速
在宝塔面板中配置轩辕镜像加速,提升服务器管理效率
在 Synology 群晖NAS系统中配置轩辕镜像加速
在飞牛fnOS系统中配置轩辕镜像加速
在极空间NAS中配置轩辕镜像加速
在爱快ikuai系统中配置轩辕镜像加速
在绿联NAS系统中配置轩辕镜像加速
在威联通NAS系统中配置轩辕镜像加速
在 Podman 中配置轩辕镜像加速,支持多系统
配置轩辕镜像加速9大主流镜像仓库,包含详细配置步骤
无需登录即可使用轩辕镜像加速服务,更加便捷高效
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429