# Use Sanbox from any MCP client

> The Sanbox MCP server lets Claude, ChatGPT, Cursor and other MCP clients start and use Sanbox Computers as tools. It's enabled on request; today, agents with a shell use the Sanbox CLI.

- Source: Sanbox knowledge base, by Sanlabs GmbH
- URL: https://sanbox.cloud/kb/build/sanbox-mcp-server/
- Type: on-request
- Section: Building agent products
- Language: en
- Published: 2026-11-06
- Updated: 2026-11-06

The Sanbox MCP server lets any MCP client start Sanbox Computers, run commands in them, move files and collect results, all as tools the client can call. It's enabled per organisation on request. Today, any agent with shell access does the same through the Sanbox CLI, and `sanbox skill` gives it the full instructions.

## What you get

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data. Assistants such as Claude and ChatGPT, and development tools such as Visual Studio Code and Cursor, support it.

- **Computers from any MCP client.** A chat assistant without a terminal can start a Computer from one of your templates, work in it and bring back the results.
- **The same Computers.** Every Computer still comes from your templates, so its network policy, Secret Proxies and disk work exactly as they do when you start it from the CLI.
- **No terminal needed.** People who never open a shell can use Computers from the MCP client they already work in.

## Enable it for your organisation

Write to [sales@sanlabs.ai](mailto:sales@sanlabs.ai?subject=Enable%3A%20Sanbox%20MCP%20server) with the subject "Enable: Sanbox MCP server", and tell us which MCP clients you use.

## What works today: the CLI

Coding agents with a shell, such as Claude Code, Codex and OpenCode, already drive Sanbox through its CLI. Install it, sign in, and save the agent guide into your project:

```bash
npm install -g @sanlabs/sanbox-cli@latest
sanbox login
sanbox skill --write
sanbox templates list --json
```

`sanbox skill --write` saves the current guide to `.sanbox/agent.md`. It covers templates, runs, Computers, files, ports, Secret Proxies and recovery. Point your agent's instructions file at it, or just ask:

```text
Read .sanbox/agent.md. Start a Computer from the "Compose stack" template,
copy ./app into it, run the end-to-end tests there and bring back the report.
Show me each command before you create, stop or delete a Computer.
```

The CLI is built for agents:

- **JSON everywhere.** `--json` returns one envelope with `ok`, `data` or `error`, and `next_actions` the agent can follow as argument arrays.
- **Safe retries.** `--external-run-id` on runs and `--request-key` on forks, commands and snapshots stop a retry from doing the work twice.
- **Clear exit codes.** 0 for success, 1 for a local or API failure, 2 when readiness fails or a waited run ends unsuccessfully.

For automation, set an organisation API key in `SANBOX_API_KEY` instead of signing in. Keep it out of prompts, task files and repositories.

## Can a Computer use my own MCP servers?

That's the other direction, and it works today: you bring your own models, tools and MCP servers to the agent in a Computer. Allow the MCP server's host in the template's network policy. If the server is reached over HTTPS with a token, a Secret Proxy can hold the token so the agent never sees it.

## Related

- [How do I run 10 coding-agent tasks in parallel without them clashing?](https://sanbox.cloud/kb/parallel-work/run-coding-agent-tasks-in-parallel/)
- [Call an agent computer from n8n, Make or Zapier](https://sanbox.cloud/kb/automation/call-a-sanbox-computer-from-n8n/)
- [How do I run OpenCode as a server on a remote computer?](https://sanbox.cloud/kb/coding-agents/opencode-server-on-a-remote-computer/)
- [How do I give each of my users their own persistent agent computer?](https://sanbox.cloud/kb/build/one-persistent-computer-per-user/)

## Sources

- Model Context Protocol, [What is the Model Context Protocol?](https://modelcontextprotocol.io/docs/getting-started/intro), checked 2026-11-06

## Next step

Sanbox MCP server is enabled per organisation on request. To enable it, email sales@sanlabs.ai with the subject "Enable: Sanbox MCP server".
