MCP Server
sandal-mcp (private beta): give an MCP client such as Claude Code or Cursor least-privilege tools for Sandal sandboxes.
sandal-mcp is a Model Context Protocol server that gives an agent Sandal sandboxes as tools: create, exec, files, ports, snapshots and forks, without SDK glue code. It ships in the same beta package as the CLI.
Install#
sandal-mcp comes with @sandal-dev/cli (Node.js 24+), which is in private beta and not published to npm yet. Request access and ask for the CLI's npm tarball with your beta bundle:
npm install -g ./sandal-dev-cli-<version>.tgz # installs `sandal` and `sandal-mcp`Claude Code, Cursor and other stdio clients#
Add the server to .mcp.json (Claude Code) or .cursor/mcp.json (Cursor):
{
"mcpServers": {
"sandal": {
"command": "sandal-mcp",
"args": ["--toolsets", "sandboxes,processes,files"],
"env": {
"SANDAL_API_KEY": "<project API key, ideally a dedicated key per agent>",
"SANDAL_ORGANIZATION_ID": "org_...",
"SANDAL_PROJECT_ID": "project_..."
}
}
}
}With Claude Code you can also run claude mcp add sandal -- sandal-mcp --toolsets sandboxes,processes,files and set SANDAL_API_KEY in your environment. The key alone is enough; SANDAL_ORGANIZATION_ID and SANDAL_PROJECT_ID (as in the JSON above) are optional overrides.
To confine the agent to sandboxes you already created, pass --sandbox <id> (repeatable). Project-wide create, list and fork are then not offered:
"args": ["--toolsets", "processes,files", "--sandbox", "sandbox.d3b3..."]Streamable HTTP#
sandal-mcp --http --port 8931 # serves /mcp on loopbackThe HTTP gateway holds no credential of its own: each MCP session authenticates with its own Authorization: Bearer <Sandal API key> plus the organization and project headers, and stays bound to that key (key-only scope works over stdio).
Tools#
| Toolset | Tools |
|---|---|
sandboxes | sandal_sandbox_create, sandal_sandbox_list, sandal_sandbox_get, sandal_sandbox_lifecycle, sandal_sandbox_fork, sandal_sandbox_keep_alive |
processes | sandal_process_exec, sandal_process_start, sandal_process_output, sandal_process_cancel |
files | sandal_file_read, sandal_file_write, sandal_file_list, sandal_file_mkdir, sandal_file_move, sandal_file_delete, sandal_file_find, sandal_file_grep, sandal_file_replace |
network | sandal_port_expose, sandal_port_revoke |
snapshots | sandal_snapshot_create, sandal_snapshot_list |
git | sandal_git_clone, sandal_git_status, sandal_git_commit, sandal_git_push, sandal_git_checkout |
The agents and computer toolsets drive agent runs and desktop sandboxes; sandal capabilities shows what your project has enabled.
Each tool maps onto the same REST API the SDKs use, so limits and quotas are identical whether you drive Sandal from code or from an agent.
Least privilege#
- Tools are registered only for the scopes the API key holds (
sandbox:read,sandbox:write). - Only the selected
--toolsetsare registered. --read-onlyregisters read tools only.--sandbox <id>confines every tool to the given sandboxes.
Give each agent its own key so its activity is attributable and revocable on its own.