← Blog

Setting up the Sandscale MCP server in Claude Code, with permission rules that fit it

Add the remote Sandscale MCP server to Claude Code, sign in, pick a scope, and write allow, ask and deny rules for its tools, plus the local sandscale mcp server as an alternative.

Claude Code can already run shell commands on your laptop. Connecting it to Sandscale gives it a second place to run them: a Firecracker microVM of its own, with the network your plan and your organization’s policy allow, where a bad command breaks a throwaway box instead of your checkout. This post covers the setup, the sign-in, and the part most guides skip: Claude Code permission rules that match what each Sandscale tool does.

Everything about the Sandscale side here comes from the Quickstart, the Connect Claude or ChatGPT guide and the MCP tools reference. Everything about Claude Code comes from Anthropic’s MCP and permissions docs, as of November 2026.

Two servers, pick one

Sandscale offers two MCP servers, and Claude Code can talk to either:

  • The remote server at https://mcp.sandscale.dev/mcp. It speaks HTTP, signs you in through a browser the first time, and has 15 tools: sandboxes, files, snapshots, workspaces, storage buckets and Vault secret names.
  • The local server, sandscale mcp, which comes with the CLI. It is a stdio server that uses your CLI sign-in and has 13 tools, including build host leases and lab hosts.

If you are not sure, start with the remote one. It needs nothing installed. The remote vs local post goes through the differences tool by tool.

Add the remote server

One command, straight from the Quickstart:

claude mcp add --transport http sandscale https://mcp.sandscale.dev/mcp

The name sandscale matters later: Claude Code names each tool mcp__<server>__<tool>, so your permission rules will say mcp__sandscale__sandbox_run and so on. If you pick a different name, use it in the rules too.

By default claude mcp add writes to local scope: this project, only for you. Two other scopes exist:

  • --scope user makes the server available in every project you open. Reasonable for a tool you use everywhere.
  • --scope project writes it to .mcp.json at the project root, which you can commit so the whole team gets it. Claude Code asks each person to approve project servers before using them.

Because the remote server signs each person in as themselves, committing it to .mcp.json shares the address, not anyone’s access.

Sign in

Start Claude Code and run /mcp. The Sandscale server will show that it needs authentication; pick it and Claude Code opens the Sandscale sign-in in your browser. Per the Sandscale docs, the client finds the sign-in at auth.sandscale.dev, registers itself, and shows an approval page that names the app and says it is not made by Sandscale. Approve it and the connector is linked to your organization.

From then on, each tool call runs as you, with a short-lived credential that never leaves Sandscale’s server. Claude Code can do what you can do in Sandscale and nothing more. If your organization signs in through SSO, which comes with the Team plan, that is the sign-in you go through.

Two things to know:

  • claude mcp list and /mcp show the connection status. If the connection fails after sign-in, Claude Code prints the HTTP status or error code it got.
  • claude mcp remove sandscale deletes the stored tokens locally but does not revoke them. Run claude mcp logout sandscale first if you want them revoked where they were issued. On the Sandscale side, DELETE /api/v1/me/mcp-connectors/{id} revokes a connector and ends its sessions at once.

Write permission rules for the tools

Claude Code asks before it uses a tool unless a rule says otherwise. With 15 tools that is a lot of prompts, and the temptation is to allow everything. Don’t. The Sandscale reference says which tools change things, and that maps cleanly onto allow, ask and deny.

Read-only tools are safe to allow: sandbox_list, sandbox_download_file, workspace_list, storage_list_buckets, storage_describe_bucket and vault_list_secrets (which returns names only; no Sandscale MCP tool returns Vault values).

Tools that change a sandbox the agent made are the everyday work: sandbox_create, sandbox_run, sandbox_upload_file, sandbox_pause, sandbox_resume, sandbox_snapshot. Whether to allow these depends on how much you trust the task. Running commands in an isolated box is the point of the setup, so many teams allow them.

Tools that end or change longer-lived things deserve a prompt: sandbox_stop deletes the sandbox’s disk and cannot be undone, and workspace_start and workspace_stop act on persistent cloud computers that may hold someone’s work.

In .claude/settings.json that looks like this:

{
  "permissions": {
    "allow": [
      "mcp__sandscale__sandbox_list",
      "mcp__sandscale__sandbox_download_file",
      "mcp__sandscale__workspace_list",
      "mcp__sandscale__storage_list_buckets",
      "mcp__sandscale__storage_describe_bucket",
      "mcp__sandscale__vault_list_secrets",
      "mcp__sandscale__sandbox_create",
      "mcp__sandscale__sandbox_run",
      "mcp__sandscale__sandbox_upload_file"
    ],
    "ask": [
      "mcp__sandscale__sandbox_stop",
      "mcp__sandscale__sandbox_snapshot",
      "mcp__sandscale__workspace_start",
      "mcp__sandscale__workspace_stop"
    ]
  }
}

A few details from the Claude Code permissions docs that bite people:

  • mcp__sandscale__* matches every tool on the server. As an allow rule it is legal because the server name is literal, but it allows sandbox_stop too. Prefer the explicit list.
  • Rules with parentheses, which match on a tool’s arguments, are skipped for MCP tools in settings files. You cannot write “allow sandbox_run only for npm test” there. If you need that, it is a job for policy on the Sandscale side, not for Claude Code.
  • A deny rule on a tool removes it from the model’s context entirely. If you never want the agent to touch workspaces, "deny": ["mcp__sandscale__workspace_start", "mcp__sandscale__workspace_stop"] is cleaner than asking every time.

The local server instead

If you have the CLI installed and signed in (sandscale login), add the stdio server:

claude mcp add sandscale-local -- sandscale mcp

Everything after -- is the command Claude Code runs. Its tools are named differently (sandbox_start, sandbox_exec, sandbox_stop, workspace_show and others, listed in the MCP tools reference), so the rules become mcp__sandscale-local__sandbox_exec and so on. The reference says the local server does not offer signing in, the vault or deleting anything as tools, and that sandbox_start uses no network unless asked. sandscale mcp connect prints the setup for each supported client if you want to check the exact form.

What Sandscale records and refuses

Your Claude Code rules are the first gate. Sandscale’s own checks are the second, and they apply no matter what the client allows:

  • Every call goes through the same API, permissions, plan limits and audit log as the console and the SDK. A refusal comes back to Claude with the API’s own error code, so it can explain why rather than guess.
  • The audit log records each remote MCP call’s tool, region, outcome and app, never its arguments.
  • Each app can make up to 120 calls a minute, and each person up to 60.
  • The remote server answers for the United States for now. Another region is refused with region_unavailable.

That split is the design to aim for: the client decides what the agent may attempt without asking you, and the platform decides what anyone may do at all.

A first task to try

Once connected, give Claude Code something where isolation clearly helps, such as: “Start a sandbox from the Node template, upload package.json and package-lock.json, run npm ci && npm audit, show me the summary, then stop the sandbox.” You will see the ask rule fire on the stop, which is the moment to check it is stopping the box it made.

If you have not created an account yet, the Free plan includes 100 awake vCPU-hours a month, 3 boxes at once and up to 2 vCPU per box, which is plenty for trying this out. Details are on the pricing page.

Run your agents in a box of their own

Each sandbox is a Firecracker microVM. Free includes 100 awake vCPU-hours a month.

Start free

Keep reading