---
title: "GitHub Copilot MCP setup in VS Code"
description: "Add an MCP server to GitHub Copilot in VS Code: the mcp.json entry with a token prompt, MCP: List Servers, and what to check when the tools are missing."
canonical: "https://scalebrowser.net/docs/agents/mcp-clients/copilot"
last_modified: "2026-09-22T18:16:38.000Z"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://scalebrowser.net/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Copilot MCP setup in VS Code

> Add an MCP server to GitHub Copilot in VS Code: the mcp.json entry with a token prompt, MCP: List Servers, and what to check when the tools are missing.

Copilot reads MCP servers from VS Code's `mcp.json`. Note the top-level key: it is `servers`, not the `mcpServers` most other clients use.

The worked example is Scalebrowser's own server, which gives the agent a real browser on your machine. Any other HTTP MCP server takes the same entry with its own address.

## Before you start

Everything below assumes a daemon that is already running and a token to reach it with.

<CardGroup columns={2}>
  <Card title="Windows desktop app">
    The app starts the daemon for you. The token is the contents of
    `%LOCALAPPDATA%\Scalebrowser\token`, and the address it is listening on is the
    `native_addr` field of `%LOCALAPPDATA%\Scalebrowser\runtime.json`. That is usually
    `127.0.0.1:8787`, but the app moves up a port when something else already holds it.
  </Card>
  <Card title="Self-hosted daemon">
    `scalebrowser-daemon --generate-token` prints a token and stores it under
    `<data_dir>/token`. The address is whatever `bind_addr` says, which is `127.0.0.1:8787`
    unless you changed it. See [Install & run](/docs/install#the-api-token).
  </Card>
</CardGroup>

<Warning>

**The token is a full-power credential.** It reaches every profile, every stored session
and the whole management API. Treat it like a password: keep it out of a repository, and
prefer your client's environment-variable syntax over a literal in a config file that
gets committed.

</Warning>

## Add the server

`.vscode/mcp.json` in a workspace applies to that workspace. For every workspace, run
**MCP: Open User Configuration** from the command palette, which opens the `mcp.json` of your VS
Code profile. **MCP: Add Server** asks the same questions and writes either file for you.

```json .vscode/mcp.json
{
  "servers": {
    "scalebrowser": {
      "type": "http",
      "url": "http://127.0.0.1:8787/v1/mcp",
      "headers": {
        "Authorization": "Bearer ${input:scalebrowser-token}"
      }
    }
  },
  "inputs": [
    {
      "id": "scalebrowser-token",
      "type": "promptString",
      "description": "Scalebrowser API token",
      "password": true
    }
  ]
}
```

The `${input:…}` form makes VS Code ask for the token once, store it, and keep it out of the
file. Worth doing for the workspace copy, which is in your repository. `${env:SCALEBROWSER_TOKEN}`
works in the same place if you would rather set a variable.

<Note>

**A Copilot-harness session does not see servers that prompt for input.** VS Code forwards the
servers of `mcp.json` to those sessions, except the ones that need `${input:…}`. If the tools are
missing there, use `${env:…}` instead, or add the server to `~/.copilot/mcp-config.json`, which is
the file the Copilot CLI reads.

</Note>

## Check that it loaded

- **Command palette:** **MCP: List Servers** shows each server with start, stop, restart and **Show Output**. The first start asks you to trust the server.
- **Chat:** switch the chat to **Agent** and open **Configure Tools**; the server's tools are listed there.
- **Extensions view:** the **MCP SERVERS - INSTALLED** section lists it too.

VS Code 1.99 or newer is needed. On a Copilot Business or Enterprise seat, MCP servers are off
until an administrator allows them in the organisation's Copilot policy.

## When it does not load

| What you see | What to do |
| --- | --- |
| `401` in **Show Output** | The token reached the daemon and was refused. Copy it again from the app. |
| `Cannot have more than 128 tools per request.` | Too many servers are on at once. Switch some tools off in **Configure Tools**. |
| The tools are missing in a Copilot-harness session | The server uses `${input:…}`. See the note above. |
| Nothing in the list at all | The file uses `mcpServers`. VS Code reads only `servers`. |

## What the agent can do now

Ask it to open a page and it will lease a profile, bind a tab and start reading. The tool
set, the page map and the failure shapes are on [MCP server](/docs/agents/mcp-server); what the
agent is **allowed** to do is decided by the daemon, not by the client, so see
[tool profiles](/docs/agents/mcp-server#the-tool-set).
