# Your first Sandscale sandbox from Cursor: connect the MCP server and run a script in a microVM

> A first-run walkthrough: create a Sandscale account, add the remote MCP server to Cursor's mcp.json, sign in, and have the agent start a sandbox, upload a script, run it and stop the sandbox.

A first-run walkthrough: create a Sandscale account, add the remote MCP server to Cursor's mcp.json, sign in, and have the agent start a sandbox, upload a script, run it and stop the sandbox.

November 28, 2026 · 3 min read · The Sandscale team

Cursor’s agent runs terminal commands on your machine. This walkthrough gives it a second place to run code: a Sandscale sandbox, which is a Firecracker microVM with its own kernel. You will create an account, add one entry to `mcp.json`, sign in, and ask the agent to start a sandbox, put a small Python script in it, run it and shut the sandbox down.

It is a first-run guide. For global versus project config, team allowlists and Cloud Agents, read the longer [Cursor setup guide](https://sandscale.dev/blog/sandscale-mcp-server-in-cursor?ref=blog). Once this works, the [Cursor rule that sends installs and tests to a sandbox](https://sandscale.dev/blog/cursor-rule-run-tests-in-a-sandbox?ref=blog) is the natural next step.

Sandscale facts are from the [Quickstart](https://sandscale.dev/docs/quickstart?ref=blog), the [Connect Claude or ChatGPT guide](https://sandscale.dev/docs/guides/connect-claude-chatgpt?ref=blog), which covers every remote MCP client, and the [plans reference](https://sandscale.dev/docs/reference/plans?ref=blog). Cursor facts are from Cursor’s MCP documentation, as of November 2026.

## 1. Sign up

[Create a Sandscale account](https://cloud.sandscale.dev/auth/signup?ref=blog). You start on the Free plan: 100 awake vCPU-hours a month, 3 boxes at once and up to 2 vCPU per box, per the Quickstart. That covers this guide. Pro and up need a payment method; Free does not.

## 2. Add the server to Cursor

Cursor reads `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` inside one project. Add this entry, which is the one the Quickstart gives:

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

There is no key or token in it. The remote server uses OAuth, so the file is safe to commit if you want a project to carry it.

## 3. Sign in

Open Cursor’s MCP settings and choose Connect on `sandscale`. Cursor opens a Sandscale sign-in page. Approve the app; the approval page names it and says it is not made by Sandscale. From then on each tool call runs as you, with a short-lived credential that stays on Sandscale’s server.

If the server shows no tools, open the Output panel and pick “MCP Logs”. It shows initialization, sign-in problems and tool call errors.

If you have the Sandscale CLI installed, `sandscale mcp connect cursor` prints this same entry and the sign-in step.

## 4. Run your first sandbox command

Open a chat with the agent and paste this prompt:

```text
Start a sandbox from the Python template that ends by itself after 10 minutes.
Write /workspace/hello.py with the script below, run `python3 hello.py` in
/workspace, and show me the exit code and the exact output.
Then stop the sandbox.

import platform, os
print('python', platform.python_version())
print('kernel', platform.release())
print('cwd', os.getcwd())
```

The Connect guide lists the remote server’s tools: `sandbox_create`, `sandbox_upload_file`, `sandbox_run` and `sandbox_stop` are the four this prompt needs. The tool list your Cursor shows under the server may be shorter or longer than the guide’s, so check it in the settings.

Cursor asks for approval before using an MCP tool by default, and you can expand a call to see its arguments. Read them:

- `sandbox_create` should name the Python template and carry a time limit.
- `sandbox_upload_file` should write `/workspace/hello.py` and nothing outside `/workspace`.
- `sandbox_run` should run `python3 hello.py`.
- `sandbox_stop` should name the id of the sandbox that `sandbox_create` returned. The reference marks stop as not undoable: it deletes the sandbox’s disk.

When it finishes, you get the script’s exit code, its output, and a sandbox that is gone. The script prints the Python version, the kernel release and the working directory of the machine it ran on. Compare the kernel line with `uname -r` on your own machine to see that the code ran somewhere else.

## What to check next

- **Nothing is left running.** Ask the agent to list your sandboxes. The one from this run should not be there. A sandbox also ends on its own when its time limit passes.
- **The run is on the record.** Open the [audit log](https://sandscale.dev/docs/concepts/audit?ref=blog) in the console. Per the Connect guide it records each remote MCP call’s tool, region, outcome and app, not the arguments.
- **The network.** A new sandbox has no network by default, and the modes you can start depend on your plan and your organization’s policy. Until you start one with a network mode, a command that downloads packages will not work, so plan your first real task around files you upload.
- **Rate limits.** Each app can make up to 120 calls a minute and each person up to 60, so a long agent loop can hit them.
- **Region.** The remote server answers for the United States and refuses another region with `region_unavailable`.
- **Cloud Agents.** Per Cursor’s docs, hosted Cloud Agents do not read `~/.cursor/mcp.json`. Configure the server where Cloud Agents read their servers and sign in again there.

If you have not created an account yet, [sign up for Sandscale](https://cloud.sandscale.dev/auth/signup?ref=blog) and start at step 2.

**On this page**

1. 1. Sign up
2. 2. Add the server to Cursor
3. 3. Sign in
4. 4. Run your first sandbox command
5. What to check next

**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](https://cloud.sandscale.dev/auth/signup)

## Keep reading

- [November 28, 2026 · **A Codex workspace that keeps your hours: schedules, time zones and overnight codex exec runs** · Set a Sandscale workspace to start with your workday in Tokyo, Taipei or Singapore, keep Codex's config in your dotfiles, and leave a codex exec run going in tmux overnight. Every command is from the CLI reference.](https://sandscale.dev/blog/codex-workspace-on-your-time-zone)
- [November 28, 2026 · **A Cursor project rule that sends installs and tests to a Sandscale sandbox** · Use a .cursor/rules file (or AGENTS.md) so Cursor's agent creates a Sandscale sandbox and runs dependency installs and test suites there with sandscale sandbox run instead of on your laptop. What the rule can and cannot enforce, and what a folder upload leaves out.](https://sandscale.dev/blog/cursor-rule-run-tests-in-a-sandbox)

---
Source: https://sandscale.dev/blog/cursor-first-sandbox-tutorial
