Sandbox as a Service
LocalAbout Sandbox as a Service
Sandbox as a Service is an MCP server that gives agents dedicated Linux virtual machines for command execution and file operations. It supports public preview URLs, usage checks, and expiry-based cleanup; each sandbox has its own kernel.
Key features
- 01Create dedicated Linux virtual machines
- 02Run shell commands and read or write files
- 03List files produced by a run
- 04Expose ports through public HTTPS preview URLs
- 05Check usage, extend, or destroy sandboxes
- 06Automatically destroy sandboxes at expiry
Use cases
- 01Run generated code in an isolated virtual machine
- 02Read and organize files produced by an agent
- 03Share a preview URL for a running service
- 04Check usage and end an environment no longer needed
MCP support
MCP clients can connect through a hosted Streamable HTTP endpoint or a local stdio server. It exposes tools for sandbox lifecycle management, command execution, file operations, port exposure, and usage checks.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEsandbox-as-a-service-mcp
An MCP server that gives an agent a real Linux virtual machine it can break.
Eleven tools: create a sandbox, run shell commands in it, write and read files, list what a run produced, expose a port on a public preview URL, extend the lifetime, destroy it, and check what it all cost.
Each sandbox is a dedicated VM with its own kernel — not a container sharing a host with other people's code. It is never reused between accounts and is destroyed when it expires, whether or not anything remembered to ask.
Use it
Maintained by the operator of Sandbox as a Service.
Hosted MCP (no local package)
For a client that supports Streamable HTTP, connect to:
https://sandbox-as-a-service.com/v1/mcp
Send your own API key on each request as Authorization: Bearer <your-api-key>
or x-api-key: <your-api-key>. Get it at
Dashboard → API keys.
Never put an API key in the URL or share one through a registry.
The hosted server exposes 12 tools: the eleven account/execution tools below
plus get_service_info. Anonymous initialize, tools/list, and
get_service_info work for free hosted discovery; account and execution calls
still require your key. The local stdio server (including the current downloadable
mcp.tgz v1.1.0) exposes the eleven account/execution tools. Use the hosted endpoint
for keyless service information. A GET-only check is not a connection test: this
endpoint uses MCP POST requests and SSE responses.
On Smithery,
set apiKey to your own raw key; it maps to the x-api-key header.
Connection documentation.
Local stdio (current hosted package)
AAS_API_KEY=aas_sk_... npx -y https://sandbox-as-a-service.com/mcp.tgz
Get a key at sandbox-as-a-service.com — new accounts start with free credit and no card.
Claude Desktop / Claude Code
{
"mcpServers": {
"sandbox": {
"command": "npx",
"args": ["-y", "https://sandbox-as-a-service.com/mcp.tgz"],
"env": { "AAS_API_KEY": "aas_sk_..." }
}
}
}
The tools
| Tool | What it does |
|---|---|
create_sandbox | Creates a VM and returns its id once it is ready. |
run_command | Runs a shell command as an unprivileged user. Returns stdout, stderr, exit code. |
write_file | Writes a file. Content travels out of band, so quotes and binary survive. |
read_file | Reads a file back — how an agent gets at what its code produced. |
list_files | Lists a directory tree, so an agent can find what a run produced. |
expose_port | Gives a server inside the sandbox a public https URL to share. |
get_sandbox | Status, size and expiry. |
list_sandboxes | Everything on the account, newest first — useful for finding strays. |
extend_sandbox | Pushes the expiry out when a job outgrows its timeout. |
destroy_sandbox | Destroys it and stops billing. |
get_usage | Remaining credit and recent usage. |
Notes for agents
- Code runs as an unprivileged user. There is no
sudo, soapt-getwill not work; usepip install --user --break-system-packagesornpm install, both of which do. run_commandwaits for the command to finish. Start a server with&or it will hold the call open until the timeout.- A sandbox is destroyed when its timeout expires whether or not
destroy_sandboxis called, so a forgotten sandbox costs minutes, not money forever. Calling it anyway returns the minutes you were not going to use.
Environment
| Variable | |
|---|---|
AAS_API_KEY | Required. Your API key. |
AAS_BASE_URL | Optional. Defaults to https://sandbox-as-a-service.com. Use the origin only, without /v1; the client adds that API prefix. |
MIT licensed. The service it talks to is at sandbox-as-a-service.com; docs.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.