SuperAPI AI Directory

sandbox-as-a-service-mcp

🎖️ 📇 ☁️ - Dedicated Linux VM sandboxes for untrusted, model-generated code: run commands, move files, expose a preview URL and destroy the VM.

Open website

About this tool

sandbox-as-a-service-mcp is an MCP (Model Context Protocol) server whose goal is to provide AI agents with a real Linux virtual machine environment that "can be broken freely," for executing untrusted, model-generated code.

Purpose

Agents often need to run untrusted code that they generate themselves or that comes from external sources. This tool provides an isolated execution environment for such needs: each sandbox is a dedicated virtual machine (VM) with its own kernel, rather than a container sharing the host with other users' code. Sandboxes are not reused between accounts and are destroyed upon expiration.

Main capabilities

The local stdio server provides 11 account and execution tools, covering: creating a sandbox; running shell commands inside the sandbox; writing and reading files; listing the artifacts produced by a run; exposing a port as a public preview URL; extending the sandbox lifetime; destroying the sandbox; and checking overall costs. The hosted server (hosted MCP) additionally provides a 12th tool, get_service_info.

How to use

There are two ways to connect:

Hosted MCP (no local package installation required) Suitable for clients that support Streamable HTTP; simply connect to the hosted endpoint. You need to include your own API key in each request, by means of Authorization: Bearer <your-api-key> or x-api-key: <your-api-key>. API keys can be obtained at Dashboard → API keys. The official documentation explicitly warns: never put the API key in the URL, and do not share keys through registries.

The hosted server exposes 12 tools (the 11 account/execution tools above, plus get_service_info). Anonymous initialize, tools/list, and get_service_info can be used for free hosted discovery; however, account and execution calls still require a key. The local stdio server (including the currently downloadable mcp.tgz v1.1.0) exposes the 11 account/execution tools above. For keyless service information, use the hosted endpoint. Note: a GET check alone is not equivalent to a connection test, because that endpoint uses MCP POST requests and SSE responses.

If using Smithery, set apiKey to your own raw key, and it will be mapped to the x-api-key request header.

Local stdio (currently hosted package) Keys can be obtained at sandbox-as-a-service.com; new accounts start with free credits and do not require a credit card. Clients such as Claude Desktop / Claude Code are supported. Installation instructions are provided in the repository (including the mcp.tgz v1.1.0 package).

Notes for agents

The official documentation gives several notes for agents:

  • Code runs as an unprivileged user. There is no sudo, so apt-get cannot be used; but pip install --user --break-system-packages or npm install can be used normally.
  • run_command waits for the command to finish executing. If you want to start a server, you need to put it in the background with & , otherwise the call will hang until it times out.
  • Sandboxes are destroyed when their timeout expires, regardless of whether destroy_sandboxwas called, so a forgotten sandbox only costs a few minutes rather than being billed permanently. Of course, actively calling destroy can reclaim those minutes you would not otherwise use.

Applicable scenarios and limitations

Suitable for scenarios where AI agents need to safely execute untrusted code and require real VM isolation rather than container isolation, such as running model-generated scripts, or building or testing tasks that depend on the network and port previews. In terms of limitations: inside the sandbox the user is unprivileged and cannot use sudo/apt-get; commands block and wait by default, and if you need background execution you must add it yourself &; Managed endpoints require your own API key, and the official guidance warns against putting keys in URLs or sharing them through the registry. Regarding specific pricing, quotas, regions, and other details, the information is not provided and is not yet explained.

License and Attribution

The project uses the MIT license and is maintained by the operator of Sandbox as a Service. The service and documentation are located at sandbox-as-a-service.com.