ScalebrowserDOCS

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.

Last updated

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.

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.

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.

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.

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.

.vscode/mcp.jsonjson
{
  "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.

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.

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 seeWhat to do
401 in Show OutputThe 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 sessionThe server uses ${input:…}. See the note above.
Nothing in the list at allThe 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; what the agent is allowed to do is decided by the daemon, not by the client, so see tool profiles.

Run it on your own machine

Seven days to try it with your own agents on your own sites. Starting the trial needs a card.

Get started