Configuring GitHub Copilot in Visual Studio Code

Use the VS Code MCP configuration format for a workspace-specific or user-profile connection. The workspace format is stored in .vscode/mcp.json and uses a top-level servers object.

Steps to configure GitHub Copilot in Visual Studio Code:
  1. Open the target workspace in Visual Studio Code.
  2. Either create .vscode/mcp.json (workspace) or run MCP: Open User Configuration (current profile), then add the following definition.
    {
      "servers": {
        "dex": {
          "type": "http",
          "url": "https://<DEX_MCP_HOST>:9496/mcp",
          "headers": {
            "Authorization": "Bearer ${env:DEX_MCP_AUTH_TOKEN}",
            "X-Bes-Mcp-Read-Only": "true"
          }
        }
      }
    }
    Note: For the VS Code format, ${env:DEX_MCP_AUTH_TOKEN} reads the Windows user environment variable. Do not replace it with the literal token in a workspace file.
  3. Restart Visual Studio Code after creating or changing the environment variable.
  4. Run MCP: List Servers from the Command Palette, select DEX, and choose Start or Restart. Accept the trust prompt only after confirming the endpoint.
  5. Open GitHub Copilot Chat, use Agent mode, open the Tools picker, and verify that the DEX tools are listed.