---
title: "Install in VS Code"
description: "Add the Spinrun gateway to VS Code for run and Build surfaces."
url: https://docs.spinrun.ai/install/vscode
markdown_url: https://docs.spinrun.ai/install/vscode.md
---

# Install in VS Code

{/* GENERATED from @spinrun/clients stepsFor() — do not edit by hand. */}

## Run surface [#run-surface]

### 1. Edit the MCP config [#1-edit-the-mcp-config]

Add this server block to VS Code's MCP configuration file, then restart it — or run `spinrun install vscode` and let the CLI merge it for you.

```json
{
  "servers": {
    "spinrun": {
      "url": "https://spinrun.ai/mcp",
      "headers": {
        "x-spinrun-client": "vscode"
      }
    }
  }
}
```

> Fallback — If it asks for a key instead: If VS Code asks for a credential instead of opening a browser, add a headers block with your key.

```json
{
  "servers": {
    "spinrun": {
      "url": "https://spinrun.ai/mcp",
      "headers": {
        "x-spinrun-key": "YOUR_API_KEY",
        "x-spinrun-client": "vscode"
      }
    }
  }
}
```

### 2. Authorize in your browser [#2-authorize-in-your-browser]

There is no key in that block on purpose. VS Code opens a browser the first time it connects; choose a workspace there and you are done. You can revoke it any time from Settings → Applications.

## Build surface [#build-surface]

### 1. Edit the MCP config [#1-edit-the-mcp-config-1]

This is the Build surface — it authors agents and workflows rather than running tools, and it accepts browser authorization only. Add this server block to VS Code's MCP configuration file, then restart it — or run `spinrun install vscode --build` and let the CLI merge it for you.

```json
{
  "servers": {
    "spinrun-build": {
      "url": "https://spinrun.ai/mcp/build",
      "headers": {
        "x-spinrun-client": "vscode"
      }
    }
  }
}
```

### 2. Authorize in your browser [#2-authorize-in-your-browser-1]

There is no key in that block, and there is no key form of it. VS Code opens a browser the first time it connects; choose a workspace there. Tick "Build authorization" on the consent screen, or enable it later under Settings → Applications (workspace owners only). You can revoke it any time from Settings → Applications.

## Related [#related]

* [Install](https://docs.spinrun.ai/install.md)
* [Build vs run](https://docs.spinrun.ai/getting-started/build-vs-run.md)
