Skip to main content
Glama

sandbox-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_..." }
    }
  }
}

Related MCP server: agent-env-mcp

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, so apt-get will not work; use pip install --user --break-system-packages or npm install, both of which do.

  • run_command waits 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_sandbox is 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.

Available Tools

11 tools
create_sandboxA

Create an isolated cloud sandbox — a dedicated virtual machine you can run commands in. Returns once the sandbox is ready. Python 3, Node.js 22, git and a build toolchain are pre-installed. The sandbox is destroyed automatically after timeout_minutes; nothing inside it survives that. Use this before running any code you would not want to run on the local machine.

Inputs: name, size, timeout_minutes.

destroy_sandboxA

Destroy a sandbox and stop billing for it. Everything inside is lost. Call this as soon as you are finished — do not leave sandboxes running.

Inputs: sandbox_id (required).

expose_portA

Give a server running inside the sandbox a public https URL, so a person can open it in a browser. Use this after starting a web server or dev server in the background. The server only needs to listen on localhost. Returns a URL that works until the sandbox is destroyed.

Inputs: port (required), sandbox_id (required).

extend_sandboxA

Push a sandbox’s expiry further out so long-running work is not cut off. Total lifetime is still capped at 24 hours from creation.

Inputs: sandbox_id (required), additional_minutes.

get_sandboxA

Get the current status and details of one sandbox, including when it expires.

Inputs: sandbox_id (required).

get_usageA

Show the account’s remaining credit balance and recent sandbox usage.

Inputs: no named parameters.

list_filesA

List the contents of a directory in a sandbox, with the type and size of each entry. Defaults to /workspace. Use this to find what your code produced before reading it.

Inputs: sandbox_id (required), path.

list_sandboxesA

List the sandboxes on this account, newest first. Use it to find sandboxes you created earlier.

Inputs: limit, include_deleted.

read_fileA

Read a file back out of a sandbox — an artifact your code produced, a log, a generated report. Use encoding "base64" for binary files such as images.

Inputs: path (required), sandbox_id (required), encoding.

run_commandA

Run a shell command inside a sandbox and wait for it to finish. Returns stdout, stderr and the exit code. The command runs as an unprivileged user in /workspace. A non-zero exit code is returned normally, not as an error. Use this to execute code, install packages, clone repositories or inspect the filesystem.

Inputs: command (required), sandbox_id (required), cwd, env, +1 more.

write_fileA

Write a file inside a sandbox. Use this to place a script or input data before running it. Paths are relative to /workspace unless absolute. Content of any kind is safe — it is transferred verbatim, not interpreted by a shell.

Inputs: path (required), content (required), sandbox_id (required), encoding.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct action and resource: sandbox lifecycle, file operations, command execution, port exposure, and usage lookup are clearly separated. Even similar pairs like list_files and list_sandboxes are disambiguated by both name and description.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern, e.g. create_sandbox, run_command, write_file, destroy_sandbox. There are no mixed conventions, vague verbs, or stylistic deviations.

    Tool Count5/5

    Eleven tools is a well-scoped size for a sandbox-as-a-service server. Each tool covers a meaningful capability without redundancy or bloat.

    Completeness5/5

    The surface covers the full sandbox lifecycle—create, read, list, extend, destroy—plus file operations, command execution, port exposure, and usage tracking. There are no obvious dead ends or missing operations needed for the intended workflow.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers