↓Skip to main content

Running Context Mode on VS Code and Windows

·1 min

Install it from PowerShell:

npm install -g context-mode

In your project, create .vscode/mcp.json:

{
  "servers": {
    "context-mode": {
      "command": "context-mode"
    }
  }
}

To enable Context Mode’s VS Code hooks, create .github/hooks/context-mode.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "type": "command",
        "command": "context-mode hook vscode-copilot pretooluse"
      }
    ],
    "PostToolUse": [
      {
        "type": "command",
        "command": "context-mode hook vscode-copilot posttooluse"
      }
    ],
    "SessionStart": [
      {
        "type": "command",
        "command": "context-mode hook vscode-copilot sessionstart"
      }
    ]
  }
}

Reload VS Code. In Copilot Chat, send:

ctx stats

Copilot Chat should return your Context Mode session statistics.