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

# Connect to VS Code / GitHub Copilot

> Use V5 Gateway tools in VS Code with GitHub Copilot Chat

## Prerequisites

* VS Code with GitHub Copilot Chat extension
* A V5 bearer token — get one from `POST /admin/tokens/issue`
* GitHub Copilot Business, Enterprise, or Individual subscription

## Setup

<Steps>
  <Step title="Add MCP server config">
    Add to `.vscode/mcp.json` in your project (or to VS Code user settings):

    ```json .vscode/mcp.json theme={null}
    {
      "servers": {
        "ascend": {
          "type": "http",
          "url": "https://ascend-gateway-v5.ascendgtm.workers.dev/mcp",
          "headers": {
            "Authorization": "Bearer ${ASCEND_GATEWAY_TOKEN}"
          }
        }
      }
    }
    ```

    The `ascend-gtm-ops` repo includes this file pre-configured.
  </Step>

  <Step title="Set your token">
    VS Code prompts for the token on first use if not set in the environment. To pre-set it:

    ```bash theme={null}
    export ASCEND_GATEWAY_TOKEN=<your-token>
    ```

    Or use VS Code's secret store: **Command Palette** → **MCP: Manage Secrets** → add `ASCEND_GATEWAY_TOKEN`.
  </Step>

  <Step title="Verify in Copilot Chat">
    Open Copilot Chat (`⌃⌘I`) and ask: *"What are my top Google Ads campaigns this month?"*

    Copilot should call `google_ads_query` and return results in the chat.
  </Step>
</Steps>

## GitHub Copilot coding agent

The Copilot coding agent (assigned via GitHub issues) automatically reads `.vscode/mcp.json` from the repo. No additional setup required — the agent uses V5 tools during issue resolution.

<Note>
  The Copilot coding agent can only use V5 tools for **read operations** in standard PR reviews. Mutations (`crm_write`, `email_send`, `ads_mutate`) require explicit confirmation in the PR description.
</Note>

## Using with AGENTS.md

GitHub Copilot reads `AGENTS.md` at the project root (Linux Foundation AGENTS.md spec). The `ascend-gtm-ops` AGENTS.md documents which V5 tools are appropriate for Copilot tasks and which require human review.
