# Sandbox as a Service [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/fstandhartinger/sandbox-as-a-service-mcp  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sandbox-as-a-service

## Description
Give an agent a real Linux VM: run commands, move files, expose a preview URL, destroy it.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "sandbox-as-a-service": {
    "url": "https://sandbox-as-a-service.com/v1/mcp"
  }
}
```

## Documentation

## What the Sandbox as a Service MCP server does

The Sandbox as a Service MCP server gives an AI agent access to dedicated Linux virtual machines. Each sandbox has its own kernel and is not reused between accounts. The service removes a sandbox when its lifetime expires, including cases where the agent does not explicitly destroy it.

Agents can create a VM, execute shell commands, write and read files, and inspect directory trees. They can also expose a port from the VM through a public HTTPS preview URL. Account and lifecycle operations include checking sandbox status, listing the account's sandboxes, extending expiry, destroying a sandbox, and checking remaining credit and recent usage.

## How it works

The Sandbox as a Service MCP server is available through a hosted Streamable HTTP endpoint at `https://sandbox-as-a-service.com/v1/mcp`. Requests can authenticate with either an `Authorization: Bearer` header or an `x-api-key` header. Anonymous initialization, tool discovery, and service information are available for hosted discovery, while account and execution operations require an API key.

A local stdio option runs through an npm package archive with `npx`. The hosted service exposes the eleven account and execution tools plus `get_service_info`; the local package exposes the eleven account and execution tools. The implementation uses MCP POST requests and SSE responses, so a GET-only request is not a connection test.

## Setup and configuration

Create an API key through the service dashboard, then provide it as `AAS_API_KEY`. For local use, run the package with `npx -y https://sandbox-as-a-service.com/mcp.tgz`. Claude Desktop and Claude Code can launch the same command through an MCP configuration with the key in the environment section.

`AAS_BASE_URL` is optional and defaults to `https://sandbox-as-a-service.com`. If changed, provide only the origin; the client adds the API prefix. Hosted clients should connect to the documented `/v1/mcp` endpoint and send the key per request.

## Tools and capabilities

The Sandbox as a Service MCP server provides tools for:

- Creating and destroying sandboxes.
- Running shell commands and receiving stdout, stderr, and exit status.
- Writing files without routing their content through command-line quoting.
- Reading files and listing directory trees.
- Publishing a sandbox port through an HTTPS preview URL.
- Reading status, size, and expiry information.
- Listing account sandboxes and extending their expiry.
- Checking remaining credit and recent usage.

## Limitations and notes

Commands run as an unprivileged user. `sudo` is unavailable, so `apt-get` cannot be used. The README identifies `pip install --user --break-system-packages` and `npm install` as alternatives.

`run_command` waits for the command to finish. A server started without backgrounding may keep the MCP call open until the command times out; use `&` when starting a long-running service. Expiry is automatic, but calling `destroy_sandbox` earlier stops billing and returns unused minutes that would otherwise not be used.

_Full upstream README: https://allmcps.com/mcp/sandbox-as-a-service/readme_

