← Blog

Connecting Cursor to the Sandscale MCP server: global or per project, remote or local

The mcp.json entries for the remote and local Sandscale MCP servers in Cursor, where to put them, how sign-in and tool approval work, and what changes for Cloud Agents and team allowlists.

Cursor’s agent runs terminal commands in your project, on your machine. For a lot of work that is right. For work you would rather not run on your laptop, such as an unfamiliar repo’s install scripts, a dependency upgrade that might pull in something odd, or a test suite that wants a clean machine, it helps to give the agent somewhere else to run them. The Sandscale MCP server does that: the agent can start a sandbox, which is its own Firecracker microVM, run commands there, move files in and out, and throw it away.

This post covers the Cursor side in detail. Sandscale facts come from the Quickstart, Connect Claude or ChatGPT and the MCP tools reference. Cursor facts come from Cursor’s MCP documentation as of November 2026.

The remote server entry

The Quickstart gives the whole configuration:

{
  "mcpServers": {
    "sandscale": {
      "url": "https://mcp.sandscale.dev/mcp"
    }
  }
}

There is no API key in it, and there should not be. The remote server uses OAuth: the first time Cursor connects, it discovers Sandscale’s sign-in at auth.sandscale.dev, registers, and opens a Sandscale sign-in page. You approve the app (the approval page names it and says it is not made by Sandscale), and from then on each tool call runs as you with a short-lived credential that stays on Sandscale’s server.

Cursor’s docs describe its side of this: sign-in uses the authorization code flow with PKCE, the server’s protected resource metadata tells Cursor where to sign in, and Cursor renews an expired access token with the refresh token if the server issued one. You do not need the static OAuth auth block that some providers require.

Global or project file

Cursor reads two files:

  • ~/.cursor/mcp.json applies to every project you open, in the editor and the CLI.
  • .cursor/mcp.json in a project applies to that project only.

For the remote Sandscale server, either works. Because there is no secret in the entry, committing .cursor/mcp.json to a repository is safe: each teammate still signs in as themselves and gets only their own access. A project file is a reasonable way to say “agents working on this repo should run untrusted commands in a sandbox”, and it keeps the server out of projects where it is noise.

The local server entry

The CLI brings a second server, sandscale mcp, which runs on your machine over stdio and uses your CLI sign-in (sandscale login). In Cursor’s format:

{
  "mcpServers": {
    "sandscale-local": {
      "type": "stdio",
      "command": "sandscale",
      "args": ["mcp"]
    }
  }
}

The CLI installs to ~/.sandscale/bin. If Cursor cannot find sandscale, the command field accepts a full path; Cursor’s config interpolation supports ${userHome}, so "${userHome}/.sandscale/bin/sandscale" works without hardcoding your username. Running sandscale mcp connect prints the setup Sandscale recommends for each client, which is the thing to check if this guide and the CLI ever disagree.

The two servers have different tool lists. The remote one has 15 tools, including file upload and download, pause, resume, snapshots, storage buckets and Vault secret names. The local one has 13, including build host leases and lab hosts, and its reference says signing in, the vault and deleting anything are not offered as tools. See remote vs local for the full comparison.

Approving tool calls

Cursor asks for approval before using an MCP tool by default, and you can expand the call to see its arguments. MCP tools follow the same run modes as terminal commands, so whatever you have chosen for the terminal applies here too.

For a sandbox server, read the arguments on the calls that matter:

  • sandbox_run (remote) or sandbox_exec (local): this is the command. Check it is what you asked for and runs in the sandbox you expect.
  • sandbox_stop: on the remote server this ends the sandbox and deletes its disk, which the reference marks as not undoable. Check the sandbox id.
  • workspace_start and workspace_stop: workspaces are persistent cloud computers. Stopping one keeps its disk, but it may be in use.

Read-only tools such as sandbox_list, workspace_list and vault_list_secrets (names only; no Sandscale MCP tool returns Vault values) are low risk to approve quickly.

Team and enterprise controls

Two Cursor admin features are worth knowing about if you roll this out to a team:

  • The MCP allowlist (Team Settings, MCP Configuration) lets enterprise admins approve servers by URL pattern for remote servers and by command pattern for stdio ones. A tool allowlist on an approved server restricts which of its tools can run automatically. Allowlisting https://mcp.sandscale.dev/mcp with read-only tools on the auto-run list is a sensible starting policy.
  • Team MCP servers (Dashboard, Plugins & MCPs) are shared with the team and are what Cloud Agents use.

That last point catches people out. Per Cursor’s docs, hosted Cloud Agents do not read ~/.cursor/mcp.json; they use the servers configured at cursor.com/agents and the team’s servers, and they keep their own MCP sign-ins on Cursor’s servers. If you want a Cloud Agent to use Sandscale, configure it there and sign in for that surface separately.

What Sandscale enforces regardless

Cursor’s approvals are one gate. Sandscale’s are another, and they hold whatever the client is set to:

  • Every tool call goes through the same API, permissions, plan limits and audit log as the console, CLI and SDK. A refusal comes back with the API’s error code.
  • The audit log records each remote MCP call’s tool, region, outcome and app. It does not record the 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 region for now and refuses another region with region_unavailable.
  • New sandboxes get the network your plan and your organization’s policy allow. On the local server, sandbox_start uses no network unless asked.

Debugging the connection

If the server does not show tools, open the Output panel and pick “MCP Logs”. It shows initialization, sign-in problems and tool call errors. A failed MCP server does not take others down with it, and you can toggle the server off in Customize without deleting its entry.

Common causes: the stdio server cannot find sandscale on the path, the CLI is not signed in, or the remote sign-in was approved for a different organization than the one you expected. Sign out and in again from Customize if it is the last one.

A good first prompt

“Start a sandbox from the Python template, upload requirements.txt, run pip install -r requirements.txt and report which packages failed to build, then stop the sandbox.” It exercises create, upload, run and stop, keeps your local environment untouched, and the stop call gives you a natural moment to look at the approval prompt.

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