# VS Code

> Connect VS Code to the Neurouter MCP gateway in .vscode/mcp.json with OAuth sign-in or an API key stored as a password input.

Source: https://neurouter.com/integrations/vscode · Last updated: 2026-11-24

VS Code reads MCP servers from `.vscode/mcp.json` in your workspace.

## Sign in with OAuth

```json
{
  "servers": {
    "neurouter": {
      "type": "http",
      "url": "https://mcp.example.com/mcp"
    }
  }
}
```

VS Code discovers Neurouter's authorization server and asks you to sign in.

## Use an API key

VS Code can prompt for the key once and store it securely, so it never lands in the file:

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "neurouter-key",
      "description": "Neurouter API key",
      "password": true
    }
  ],
  "servers": {
    "neurouter": {
      "type": "http",
      "url": "https://mcp.example.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:neurouter-key}"
      }
    }
  }
}
```

Format checked against the [VS Code MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration). The portal's *Connect a client* page generates this snippet with your URL.
