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

# VS Code

> A .vscode/mcp.json entry, and agent mode.

<img src="https://mintcdn.com/mahadev/-gWik8vU43pna0pu/images/harnesses/vscode.svg?fit=max&auto=format&n=-gWik8vU43pna0pu&q=85&s=8c9516667dba7313f12a62a6181fcc4d" alt="Visual Studio Code" width="48" height="48" noZoom data-path="images/harnesses/vscode.svg" />

**Preview.** VS Code's agent mode connects over Streamable HTTP with a static
header, so a `tgcc_` key is enough.

## Configure it

The command palette entry is **MCP: Add Server**, which asks whether to write
workspace or global config. Workspace config lands in `.vscode/mcp.json`. Note
the top-level key is `servers`, not `mcpServers` — VS Code differs from Cursor
and Claude Code here.

<CodeGroup>
  ```json .vscode/mcp.json theme={null}
  {
    "inputs": [
      {
        "id": "impellabs-key",
        "type": "promptString",
        "description": "ImpelLabs workspace API key (tgcc_…)",
        "password": true
      }
    ],
    "servers": {
      "impellabs": {
        "type": "http",
        "url": "https://api.impellabs.tech/mcp",
        "headers": {
          "Authorization": "Bearer ${input:impellabs-key}"
        }
      }
    }
  }
  ```

  ```json settings.json (global) theme={null}
  {
    "mcp": {
      "servers": {
        "impellabs": {
          "type": "http",
          "url": "https://api.impellabs.tech/mcp",
          "headers": {
            "Authorization": "Bearer ${input:impellabs-key}"
          }
        }
      }
    }
  }
  ```
</CodeGroup>

<Note>
  The `inputs` block is the point of this file. `.vscode/mcp.json` is meant to be
  committed and shared with the team; `${input:…}` means the file describes the
  server while each developer supplies their own key, prompted once and stored
  by VS Code rather than written to disk in the repo.
</Note>

## Turn it on

<Steps>
  <Step title="Start the server">
    Open `.vscode/mcp.json` and use the **Start** action above the server entry,
    or run **MCP: List Servers** from the palette. You are prompted for the key
    the first time.
  </Step>

  <Step title="Switch Copilot Chat to Agent mode">
    Tools are only available in agent mode. In the chat view's mode picker,
    choose **Agent**.
  </Step>

  <Step title="Check the tool list">
    The tools icon in the chat input lists what was discovered. If the server
    connected but shows nothing, `tools/list` failed — check the key.
  </Step>
</Steps>

## Use it

> *Find every agent in my ImpelLabs workspace and tell me which are published.*

> *Ingest the docs in this folder into our knowledge base.*

<Warning>
  Ingestion answers with a **job id**, not a result — it is one of four
  operations that always do. The agent must poll before it can honestly say the
  work finished. A model that reports success on the 202 alone is reporting the
  queue, not the outcome. See [Tools](/connect/tools).
</Warning>

## If it will not connect

<AccordionGroup>
  <Accordion title="`GET https://api.impellabs.tech/mcp` returns 405">
    Expected. The server has no SSE stream and no session teardown, so `GET` and
    `DELETE` both answer 405 — which the Streamable HTTP spec explicitly allows.
    Only `POST` carries traffic.
  </Accordion>

  <Accordion title="401 with a WWW-Authenticate header">
    No credential was recognised. The header names the protected-resource
    metadata document, which is how an OAuth-capable client discovers the flow;
    with a bearer key, it simply means the key was wrong or missing.
  </Accordion>

  <Accordion title="403 naming a scope">
    The key connected but lacks the scope that tool demands. The challenge names
    every scope the call needs at once, so you can fix it in one pass rather
    than discovering them one at a time.
  </Accordion>
</AccordionGroup>
