sandbox-as-a-service-mcp
Use this MCP server to create, operate, and manage disposable Linux VM sandboxes for running code, files, and web servers while tracking cost.
Create dedicated sandboxes (small/medium/large) with auto-destroy timeouts up to 24 hours.
Run shell commands as an unprivileged user, with working directory, environment variables, and timeout control.
Write and read files, including binary content via base64.
List directory contents to discover generated artifacts.
Expose a sandbox port as a public HTTPS preview URL.
Check sandbox status, list account sandboxes, extend lifetime, or destroy to stop billing.
View remaining credit and recent usage.
Provides tools to create, manage, and destroy Linux virtual machines, execute shell commands, manage files, expose ports via public URLs, and extend sandbox lifetimes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sandbox-as-a-service-mcp create a sandbox and run `uname -a`"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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/mcpSend 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.tgzGet 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 |
| Creates a VM and returns its id once it is ready. |
| Runs a shell command as an unprivileged user. Returns stdout, stderr, exit code. |
| Writes a file. Content travels out of band, so quotes and binary survive. |
| Reads a file back — how an agent gets at what its code produced. |
| Lists a directory tree, so an agent can find what a run produced. |
| Gives a server inside the sandbox a public https URL to share. |
| Status, size and expiry. |
| Everything on the account, newest first — useful for finding strays. |
| Pushes the expiry out when a job outgrows its timeout. |
| Destroys it and stops billing. |
| 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 | |
| Required. Your API key. |
| Optional. Defaults to |
MIT licensed. The service it talks to is at sandbox-as-a-service.com; docs.
Available Tools
11 toolscreate_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
Scored across 11 tools
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.
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.
Eleven tools is a well-scoped size for a sandbox-as-a-service server. Each tool covers a meaningful capability without redundancy or bloat.
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
Related MCP Connectors
Cloud Linux VMs for your agent: run code, Docker, files and HTTPS previews in a Sandboxer microVM.
Linux VMs for AI agents: create VMs, run commands, edit files and open preview URLs.
Run AI agent tasks in isolated sandboxes with a cost cap, saved workflows and scoped connections.
Execution platform for AI agents on Firecracker microVMs in the EU. Interactive Linux sandboxes with root, templates for Python, Node.js, Go, Rust and a headless browser, public HTTPS URLs. Background jobs that outlive the connection, batches of up to 1,000 jobs with dependencies, hard cost caps reserved up front, execution receipts with SHA-256, log digests that fit the context. IPv4, dual-stack or IPv6-only with its own public address, allowlists or no network. WASI runtime for small tasks. Idle sandboxes sleep and keep their files. Also REST API, Python SDK and LangChain.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to run compute tasks in secure sandboxes with optional interactive UIs, brokering between agents and isolated execution environments.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides a restricted Docker-based sandbox for LLM agents, enabling file operations, command execution, and local Git within an isolated runtime.19 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to operate a persistent Linux sandbox in the cloud, running commands, managing files, using Git, and publishing artifacts through a Streamable HTTP MCP endpoint.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to safely run bounded, sandboxed tasks on remote machines with persistent state and reviewable artifacts.Apache 2.0