# Using a remote MCP sandbox from VS Code's agent: Copilot's .mcp.json, the older mcp.json format and tool approvals

> Add the remote Sandscale MCP server to VS Code so the chat agent can run installs and tests in a Firecracker microVM. The two configuration formats, OAuth sign-in, the tools list, approvals and trust, and what to do for remote sessions. VS Code's agent mode, as it is documented now.

Add the remote Sandscale MCP server to VS Code so the chat agent can run installs and tests in a Firecracker microVM. The two configuration formats, OAuth sign-in, the tools list, approvals and trust, and what to do for remote sessions. VS Code's agent mode, as it is documented now.

November 29, 2026 · 6 min read · The Sandscale team

**Short answer:** VS Code’s chat agent can call tools from an MCP server, and Sandscale’s remote server at `https://mcp.sandscale.dev/mcp` gives it a [sandbox](https://sandscale.dev/sandboxes/mcp) to run commands in: a Firecracker microVM with its own kernel, not your machine. Add it as an HTTP server, sign in when VS Code asks, and decide which of its tools may run without a prompt. VS Code now has two configuration formats, so check which harness your session uses before you pick a file.

Sources, read in November 2026: VS Code’s [Add and use MCP servers](https://code.visualstudio.com/docs/copilot/customization/mcp-servers), [MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration), [Manage and troubleshoot MCP servers](https://code.visualstudio.com/docs/agents/run/manage-mcp-servers) and [Use tools with agents](https://code.visualstudio.com/docs/agents/run/tools) pages; Sandscale’s [Quickstart](https://sandscale.dev/docs/quickstart), [Connect Claude or ChatGPT](https://sandscale.dev/docs/guides/connect-claude-chatgpt) and [MCP tools](https://sandscale.dev/docs/reference/mcp) references.

## A note on the name

VS Code’s [1.99 release notes](https://code.visualstudio.com/updates/v1_99) announced agent mode in Stable, with MCP server tools as an extension of it. The current docs no longer use that term. They describe agents in the Chat view and the Agents window, run by a harness you choose (Copilot, Claude, Codex and the deprecated Local one). This post covers adding an MCP server for the Copilot harness, and points out where older configuration still applies. VS Code’s docs also list Local, Claude and Codex (experimental) harnesses; we have not covered how those read MCP configuration, so check VS Code’s Agent harnesses page for them.

## Why a sandbox server for the agent

VS Code’s agent has a terminal tool, so it can install dependencies and run tests on your machine, and its docs describe approvals and optional sandboxing for those commands. An MCP sandbox is a different layer. The commands run on another machine, in a microVM you can throw away, and the agent only sees the output. That suits an unfamiliar repository, a dependency upgrade, or a test suite that should start from a clean machine.

## Add the server in the editor

VS Code’s guide for adding a server by URL goes like this. Run **Chat: Open Customizations** from the Command Palette, select **MCP Servers**, and choose **Add Server (+)**. Choose **HTTP**, enter `https://mcp.sandscale.dev/mcp`, give it a server ID such as `sandscale`, and pick a destination. **Global, then Copilot Global** is a personal configuration shared across your workspaces. Review any trust request VS Code shows before accepting it.

Sandscale’s Quickstart names VS Code among the clients that connect to the same address as Cursor and Codex, so there is nothing Sandscale-specific to enter beyond the URL.

## Or edit the file

The Copilot harness reads two native files, both with a top-level `mcpServers` object:

- `~/.copilot/mcp-config.json` (or `$COPILOT_HOME/mcp-config.json`) for all your workspaces.
- `.mcp.json` at the workspace root, to share a server definition with the team.

For the Sandscale server:

```json
{
  "mcpServers": {
    "sandscale": {
      "type": "http",
      "url": "https://mcp.sandscale.dev/mcp",
      "tools": ["*"]
    }
  }
}
```

Per the reference, `type: "http"` means Streamable HTTP, and `tools` lists the tool names to make available: `["*"]` offers all of them, specific names limit the selection, and neither bypasses approvals. There is no `headers` entry, because the server signs in with OAuth. The reference also says not to commit tokens or populated authentication headers, which is easy to follow here since there are none.

The workspace-root file is offered by the guided setup only when the experimental `chat.mcp.workspaceRootConfig.enabled` setting is on, though existing `.mcp.json` files keep working with it off.

## The older format, if you already have it

Before the Copilot harness, VS Code stored servers in `.vscode/mcp.json` (or a profile `mcp.json`) under a `servers` key:

```json
{
  "servers": {
    "sandscale": {
      "type": "http",
      "url": "https://mcp.sandscale.dev/mcp"
    }
  }
}
```

The current reference says that format belongs to the Local harness, which is deprecated and will be removed in February 2027, and that new Copilot configurations should use the native files above. Eligible existing definitions can be forwarded, but the harness does not read those files directly. If you have both, keep one source of truth so the server does not show up twice.

## Sign in

The reference’s guidance for a server that needs browser sign-in or OAuth is to follow the publisher’s instructions and complete authorization when prompted, using **Authenticate** in the session’s server actions when it is offered. For Sandscale, the connector guide describes what the client does: it finds Sandscale’s sign-in at `auth.sandscale.dev`, registers itself and opens a Sandscale sign-in page. You sign in and approve the app; the approval page names the app and says it is not made by Sandscale. After that, each tool call runs as you with a short-lived credential that stays on Sandscale’s server.

The native format has an `oauthClientId` field for servers that need a pre-registered OAuth client. Sandscale’s guide describes clients registering themselves, so you should not need one, and we do not publish a client ID.

## Check the first tool call

VS Code’s own advice is the right test: name the server and a low-impact task, expand the tool call, and confirm the result came from the tool. An answer that sounds plausible without a tool call does not prove the connection works. A good first prompt:

“Use the Sandscale tools to list my sandboxes. Do not create or change anything.”

## Tools, approvals and trust are three decisions

VS Code’s tools page separates them: making a tool available, approving a call, and trusting a server are different steps, and enabling one does not grant the others.

- **Which tools exist.** The **Tools** tab in the Agent Customizations editor turns optional tools on and off for your session. The `tools` field in the file limits what a server offers.
- **Whether a call prompts.** When an approval prompt appears, VS Code says to read the tool’s inputs. **Allow Once** approves that call and **Skip** declines it. Not every call prompts; your permission level, runtime decisions and saved approvals decide.
- **Whether the server may start.** Workspace `.mcp.json` and `.vscode/mcp.json` files inherit Workspace Trust, and restricted mode stops those servers from starting. VS Code says not to bypass restricted mode for a repository you have not reviewed.

For the Sandscale tools, the reference marks what changes things. `sandbox_list`, `workspace_list`, `sandbox_download_file` and the storage listing tools only read, and `vault_list_secrets` returns names only, because no Sandscale MCP tool returns a Vault value. `sandbox_create`, `sandbox_run` and `sandbox_upload_file` change things, `sandbox_stop` deletes the sandbox’s disk and cannot be undone, and `sandbox_run` takes a command you should read.

## Remote sessions

If you use VS Code against another machine or a dev container, the reference says native user configuration refers to the home directory where the harness runs, and that `~/.copilot/mcp-config.json` on your own computer is not forwarded to another host. Put the server definition on the host where the agent runs, or use a workspace-root `.mcp.json` that travels with the repository.

## What Sandscale enforces whatever VS Code is set to

- Every tool call goes through the same API, permissions, plan limits and audit log as the console and the SDK. A refusal comes back with the API’s own error code.
- The audit log records the tool, the region, the outcome and the app, never the arguments.
- Each app can make up to 120 calls a minute and each person up to 60.
- The connector answers for the United States and refuses another region with `region_unavailable`.
- New sandboxes get the network your plan and your organization’s policy allow.

Revoke access by removing the server in VS Code or with `DELETE /api/v1/me/mcp-connectors/{id}`, which ends the app’s sessions at once.

## FAQ

### Where does VS Code store MCP servers?

For the Copilot harness, in `~/.copilot/mcp-config.json` for your user or in `.mcp.json` at the workspace root, under `mcpServers`. The older `.vscode/mcp.json` with a `servers` key belongs to the Local harness, which is deprecated.

### Does the Sandscale server need an API key in VS Code?

No. It signs in with OAuth and acts as you. Use a personal API key only for scripts that call the API or SDK directly.

### What does `tools: ["*"]` do?

It makes all of a server’s tools available to the session. It does not bypass approvals; each call still follows your permission level.

### Is “agent mode” still the right name?

VS Code announced the name in its 1.99 release in 2025. Its current documentation talks about agents, harnesses and sessions, so search for those terms when you look for settings.

## Related

- [Connecting Cursor to the Sandscale MCP server](https://sandscale.dev/blog/sandscale-mcp-server-in-cursor)
- [Adding the Sandscale MCP server to Codex](https://sandscale.dev/blog/sandscale-mcp-server-in-codex)
- [Remote or local: choosing between Sandscale’s two MCP servers](https://sandscale.dev/blog/remote-vs-local-sandscale-mcp-server)
- [Run code from Claude or ChatGPT in a microVM with a remote MCP connector](https://sandscale.dev/blog/run-code-from-claude-or-chatgpt-in-a-microvm)

**On this page**

1. A note on the name
2. Why a sandbox server for the agent
3. Add the server in the editor
4. Or edit the file
5. The older format, if you already have it
6. Sign in
7. Check the first tool call
8. Tools, approvals and trust are three decisions
9. Remote sessions
10. What Sandscale enforces whatever VS Code is set to
11. FAQ
12. Related

**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 29, 2026 · **Browser-free test runs for coding agents: a fast tier to run on every edit, and a browser tier to leave for CI** · How to split a project's tests so a coding agent's loop never needs a real browser: node and DOM-emulated tests first, browser end-to-end tests last. Vitest projects, jsdom and happy-dom limits, pytest markers, Node's test runner, Playwright tags and go test -short, plus how to make a filtered run fail loudly instead of passing by running nothing.](https://sandscale.dev/blog/browser-free-test-runs-for-coding-agents)
- [November 29, 2026 · **Connecting Cline to a remote MCP sandbox: streamableHttp, OAuth sign-in and what autoApprove should list** · Add the remote Sandscale MCP server to Cline so its installs and test runs can go to a Firecracker microVM instead of your machine. The cline_mcp_settings.json entry, sign-in, which tools to auto-approve, a rule that points Cline at the sandbox, and what Cline's settings cannot enforce.](https://sandscale.dev/blog/cline-with-a-remote-mcp-sandbox)

---
Source: https://sandscale.dev/blog/vs-code-agent-mode-with-a-remote-mcp-sandbox
