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

# VS Code

> Adding a HeyMCP tunnel to GitHub Copilot's MCP configuration.

VS Code configures MCP servers for Copilot in an `mcp.json` file.

## Where the file lives

| Scope             | How to open it                                     |
| ----------------- | -------------------------------------------------- |
| This workspace    | `.vscode/mcp.json` — shared through source control |
| Your user profile | Command Palette → **MCP: Open User Configuration** |

## Add the connector

```bash theme={null}
heymcp share localhost:8000
```

Then, in `.vscode/mcp.json`:

```json theme={null}
{
  "servers": {
    "heymcp": {
      "type": "http",
      "url": "https://amber-jetty.t.heymcp.dev/mcp"
    }
  }
}
```

<Note>
  VS Code uses `servers` (Cursor uses `mcpServers`) and requires an explicit
  `"type": "http"`. Copying a Cursor config across won't work unchanged.
</Note>

You can also run **MCP: Add Server** from the Command Palette and pick
**Workspace** or **Global**, which writes the same file for you.

## With a bearer token

If you shared with [`--bearer`](/security/authentication), prompt for the token
rather than committing it:

```json theme={null}
{
  "inputs": [
    {
      "type": "promptString",
      "id": "heymcp-token",
      "description": "HeyMCP tunnel bearer token",
      "password": true
    }
  ],
  "servers": {
    "heymcp": {
      "type": "http",
      "url": "https://amber-jetty.t.heymcp.dev/mcp",
      "headers": {
        "Authorization": "Bearer ${input:heymcp-token}"
      }
    }
  }
}
```

`password: true` masks it as you type, and VS Code stores it for subsequent
use. This matters because `.vscode/mcp.json` is meant to be committed.

## Check it connected

VS Code shows each server's status in its MCP panel. As always, the HeyMCP
inspector is the definitive check — look for handshake rows fingerprinted as
VS Code.

<h2 id="its-not-showing-up">
  It's not showing up
</h2>

<AccordionGroup>
  <Accordion title="The server doesn't appear">
    Check you used `servers` and not `mcpServers`, and that `"type": "http"` is
    present. Both are easy to get wrong when adapting a config from elsewhere.
  </Accordion>

  <Accordion title="Nothing in the HeyMCP inspector">
    VS Code never reached the edge. Check the URL and that `heymcp share` is
    still running.
  </Accordion>

  <Accordion title="401 in the inspector">
    The `Authorization` header isn't reaching the edge, or the token doesn't
    match `--bearer`.
  </Accordion>
</AccordionGroup>
