aliyun-agent-sandbox-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| REGION | No | Region used to derive the default domain and API URL. | cn-hangzhou |
| E2B_DOMAIN | No | Sandbox domain. Defaults to <region>.sandbox.aliyuncs.com. | <region>.sandbox.aliyuncs.com |
| E2B_API_KEY | Yes | Required API Key created in the Agent Sandbox console. | |
| E2B_API_URL | No | Control-plane API URL. Defaults to https://api.<region>.sandbox.aliyuncs.com. | https://api.<region>.sandbox.aliyuncs.com |
| E2B_TEMPLATE | No | Default sandbox template. | code-interpreter-v1 |
| SANDBOX_ENV_FILE | No | Path to a dotenv file from which the above variables are read. Environment variables take precedence over the dotenv file. | |
| SANDBOX_TIMEOUT_MS | No | Default sandbox TTL in milliseconds. | 300000 |
| SANDBOX_MAX_OUTPUT_CHARS | No | Maximum number of characters returned by a single tool call. | 30000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server exposes Alibaba Cloud Agent Sandbox (阿里云智能体沙箱) - secure, ephemeral Linux sandboxes in the cloud. Typical flow: call sandbox_create to get a sandbox_id, then run_command / run_code / file_* with that sandbox_id, and sandbox_kill when done. Tools that accept an optional sandbox_id create and destroy a temporary sandbox per call when it is omitted.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| sandbox_statusA | Show the Alibaba Cloud Agent Sandbox endpoint configuration this server will use (region, domain, API URL, default template) and whether E2B_API_KEY is set. Does not call the network. |
| sandbox_createA | Create a new Alibaba Cloud Agent Sandbox (阿里云智能体沙箱) and return its sandbox_id. Keep the ID to reuse the sandbox in later tool calls, and call sandbox_kill when done. Defaults to the code-interpreter-v1 template with a 5 minute TTL. |
| sandbox_listA | List sandboxes in the configured region, optionally filtered by state or template. Note: the control-plane list endpoint is eventually consistent, so a sandbox created moments ago may not appear yet. |
| sandbox_infoA | Return state, template, resource size and expiry for one sandbox. |
| sandbox_killA | Terminate a sandbox immediately and release its resources. Irreversible. |
| sandbox_set_timeoutA | Update the time-to-live of a running sandbox so long jobs are not reaped while they run. |
| run_commandA | Run a shell command inside the sandbox and return stdout, stderr and the exit code. When sandbox_id is omitted a temporary sandbox is created for the call and killed afterwards. |
| run_codeA | Execute Python/JavaScript/TypeScript/Bash/R/Java in the sandbox Jupyter kernel and return stdout, stderr, rich results and any error traceback. Requires a code-interpreter template. When sandbox_id is omitted a temporary sandbox is created and killed afterwards. |
| file_readB | Read a text file from the sandbox. Use offset/limit to page through large files. |
| file_writeB | Create or overwrite a file inside the sandbox. Parent directories are created automatically. |
| file_listA | List the entries of a directory inside the sandbox with type and size. |
| file_make_dirB | Create a directory (recursively) inside the sandbox. |
| file_removeB | Delete a file or directory inside the sandbox. Irreversible. |
| file_renameC | Rename or move a file or directory inside the sandbox. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Tool families are clearly separated: sandbox lifecycle (status/create/list/info/kill/set_timeout), execution (run_code vs run_command, distinguished by Jupyter kernel vs shell), and file operations. The only mild overlap is sandbox_status (server config, no network) versus sandbox_info (state of a specific sandbox), but the descriptions make the distinction explicit.
Names group into predictable prefixes: sandbox_* for lifecycle, file_* for filesystem work, and run_* for execution, with consistent snake_case throughout. Minor deviations exist (run_code/run_command are not prefixed, and sandbox_status/sandbox_info use a noun rather than a verb), but the pattern remains readable and predictable.
Fourteen tools map cleanly onto three coherent concerns (sandbox lifecycle, code/command execution, file management), with no redundant entries. Each tool covers a distinct operation an agent would plausibly need.
The surface covers the full sandbox lifecycle (create, list, inspect, extend TTL, kill), two execution modes, and a near-complete filesystem set (read, write, list, mkdir, remove, rename). Gaps are minor: no local-to-sandbox file upload/download, no binary or archive transfer, and no pause/resume of a sandbox.