ConnectConnectGitHub Copilot

MCP Client

GitHub Copilot

Connect VS Code and GitHub Copilot through the hosted OAuth configuration when the host supports it.

Prerequisite

Use VS Code with GitHub Copilot Chat and MCP support. Interface and prerequisites:

  • Concrete interface: VS Code with GitHub Copilot Chat extension (editor OAuth path).
  • Config file: %APPDATA%\Code\User\mcp.json (Windows), ~/Library/Application Support/Code/User/mcp.json (macOS), or ~/.config/Code/User/mcp.json (Linux).
  • Uses the servers key rather than mcpServers.
  • Endpoint: https://xmemo.dev/mcp.
  • Account: Valid XMemo account at https://xmemo.dev.

Install / setup

Edit your VS Code User configuration mcp.json under the servers key and add the hosted XMemo URL. Do not use the Copilot CLI config here; its direct path has its own route (/docs/mcp/copilot-cli):

  • Keep the editor entry URL-only.
  • The first tool call opens browser OAuth.
  • Do not add an Authorization header to this VS Code entry.

Set the credential

No key — complete browser OAuth in VS Code / GitHub Copilot Chat. Do not set XMEMO_KEY or paste a bearer token into mcp.json:

No XMEMO_KEY
Complete browser OAuth in VS Code / GitHub Copilot Chat

Generate / confirm XMEMO_AGENT_INSTANCE_ID

The reviewed VS Code OAuth listing has no client-side identity header. Do not add XMEMO_AGENT_INSTANCE_ID to mcp.json; confirm that this OAuth path uses its grant-managed attribution.

Preserve the existing config block

Use the reviewed VS Code / GitHub Copilot configuration block. Preserve the servers key and URL-only OAuth shape; do not copy the Copilot CLI bearer configuration into it:

{
  "servers": {
    "xmemo": {
      "type": "http",
      "url": "https://xmemo.dev/mcp"
    }
  }
}

Restart the client

Reload the VS Code window (Developer: Reload Window) or restart the MCP connection after saving mcp.json so Copilot reads the current server definition.

Test with a real recall call

Make the first MCP call read-only. This is an actual recall invocation, not a health-check placeholder, and it does not write memory.

recall({ query: "connection check", limit: 1 })

Expected response (literal shape)

A successful call returns the public ranked text shape below; the reference and content are real values from the authorized memory space.

### XMemo Memory Results:
1. Reference: <opaque-memory-id> | Location: <location>
   > <memory content>

First useful task: Synthetic memory lifecycle

Exercise the complete synthetic memory task inside GitHub Copilot Chat:

  • 1. Save synthetic fact: Ask Copilot Chat to remember convention ("Demo project timestamps use UTC.") to "projects/demo-onboarding/conventions".
  • 2. Stateless transition: Open a new chat session in GitHub Copilot or reload the VS Code window.
  • 3. Recall with source attribution: Query "demo project timestamp format". Confirm returned Reference and Location.
  • 4. Correct memory: Update the convention to ISO 8601 formatting using update_memory.
  • 5. Optional cleanup: Soft-delete the convention via forget when verification concludes.

Capabilities and profile tools

GitHub Copilot in VS Code has access to profile-qualified tools defined in the MCP documentation contract for generic-public profile:

  • Core memory tools: remember, recall, update_memory, forget, read_memory, explain_memory, search_memory, recall_context.
  • Workspace tools: get_mcp_identity, get_project_summary, project, todo, open_project_workspace, open_todo_board, ledger, open_ledger.

Limitations and boundaries

Operational boundaries for GitHub Copilot in VS Code:

  • Workspace isolation: Operations are strictly confined to the authorized user's workspace.
  • Editor/CLI separation: VS Code OAuth session does not propagate to external terminal tools.
  • No header mixing: Do not add Authorization headers to the servers entry in mcp.json.

Common Errors

VS Code / GitHub Copilot Chat uses the browser OAuth path and should not be debugged with Copilot CLI token settings:

  • invalid_grant — The OAuth authorization code is invalid, expired, or already used: reconnect the VS Code MCP server and authorize again.
  • invalid_target — The OAuth resource does not match this MCP server: reconnect using https://xmemo.dev/mcp.
  • 403 insufficient_scope — The grant does not include memory:read: approve the required scope and reconnect.

Update and removal

Maintenance procedures for GitHub Copilot:

  • Update: Reload the VS Code window after updating configuration.
  • Removal: Remove the xmemo block from mcp.json and reload the VS Code window.

VS Code / GitHub Copilot MCP configuration

Configuration file: %APPDATA%\Code\User\mcp.json

OAuth client: keep only the hosted server URL in mcp.json; first tool call opens browser OAuth, so no XMEMO_KEY or Authorization header belongs in this file.

{
  "servers": {
    "XMemo": {
      "type": "http",
      "url": "https://xmemo.dev/mcp"
    }
  }
}

Client readiness

  • Evidence required
  • Marketplace pending
  • See /product/docs#client-capability-matrix for the canonical OAuth, transport, auth, and evidence status.

Source: Client capability matrix