Platform
Other (please specify)
Feature description
Add official GitHub Copilot CLI support docs for Context Mode MCP and hooks
Summary
I would like official documentation for using context-mode with GitHub Copilot CLI, specifically covering both:
- MCP server installation/configuration
- Hook integration and expected behavior
The MCP configuration path seems relatively straightforward, but the hook story is less clear. Since Context Mode’s value depends not only on exposing tools, but also on routing large outputs, preserving useful context, and integrating with agent lifecycle events, it would be helpful to know whether Copilot CLI is officially supported and what the recommended hook setup should be.
I am using Copilot CLI on Windows, but this request is primarily about official Copilot CLI support in general.
Request
Could you please add official documentation for GitHub Copilot CLI covering:
- Whether GitHub Copilot CLI is officially supported by Context Mode.
- The recommended MCP server configuration for Copilot CLI.
- Whether MCP-only setup is sufficient or whether hooks are required for full Context Mode behavior.
- Which Copilot CLI hook events Context Mode supports or expects.
- The exact hook configuration users should add.
- Where user-level hook files should be placed.
- How hook commands should invoke Context Mode.
- How to verify that hooks are firing correctly.
- Known limitations compared with VS Code Copilot, Claude Code, Codex, Cursor, or other clients.
Why hooks need explicit documentation
MCP-only registration appears to expose Context Mode tools to the agent, but it is not obvious whether that provides the full Context Mode experience.
For example, users need to know whether Copilot CLI hooks are required for:
- intercepting or summarizing large tool outputs;
- preserving important context before compaction;
- indexing repository state at session start;
- routing expensive or noisy commands through Context Mode;
- avoiding context-window pollution from logs, test output, build output, grep output, and other large terminal results;
- maintaining continuity across longer CLI sessions.
Without official hook guidance, users may configure the MCP server successfully but still miss the main benefits of Context Mode.
What I tried / inferred
Based on Copilot CLI MCP configuration conventions, I expected an MCP config similar to this:
{
"mcpServers": {
"context-mode": {
"type": "local",
"command": "context-mode",
"args": [],
"env": {},
"tools": ["*"]
}
}
}
However, I am not sure whether this is the recommended command, whether additional arguments are needed, or whether the command should be invoked through a full path, npx, or a global npm install.
More importantly, I am not sure what the officially supported hook configuration should be for Copilot CLI.
For example, should users configure hooks for events such as:
SessionStart
PreToolUse
PostToolUse
PreCompact
And should those hooks invoke Context Mode using commands such as:
context-mode hook vscode-copilot sessionstart
context-mode hook vscode-copilot pretooluse
context-mode hook vscode-copilot posttooluse
context-mode hook vscode-copilot precompact
Or should Copilot CLI have its own Context Mode hook target, for example:
context-mode hook copilot-cli ...
Desired documentation
It would be helpful to have an official section like:
GitHub Copilot CLI
Install Context Mode:
npm install -g context-mode
context-mode doctor
Configure MCP:
{
"mcpServers": {
"context-mode": {
"type": "local",
"command": "context-mode",
"args": [],
"env": {},
"tools": ["*"]
}
}
}
Configure hooks:
{
"version": 1,
"hooks": {
"SessionStart": [
{
"type": "command",
"command": "context-mode hook copilot-cli sessionstart"
}
],
"PreToolUse": [
{
"type": "command",
"command": "context-mode hook copilot-cli pretooluse"
}
],
"PostToolUse": [
{
"type": "command",
"command": "context-mode hook copilot-cli posttooluse"
}
],
"PreCompact": [
{
"type": "command",
"command": "context-mode hook copilot-cli precompact"
}
]
}
}
Also document how to verify:
/mcp show
/mcp show context-mode
ctx doctor
ctx stats
And how to confirm that hooks are actually running, not merely that MCP tools are available.
Why VS Code Copilot support is not enough
VS Code Copilot support does not fully answer the Copilot CLI use case.
Copilot CLI has a different runtime model, different configuration locations, and potentially different hook behavior. A setup that works in VS Code does not necessarily prove that Context Mode is correctly integrated with Copilot CLI’s terminal-agent workflow.
Terminal-first users often rely on Copilot CLI for:
- running tests and builds;
- inspecting logs;
- searching large repositories;
- refactoring from the shell;
- using temporary or remote terminal sessions;
- working without opening VS Code;
- keeping MCP tools available across many repositories.
These workflows can produce large volumes of output, which is exactly where Context Mode’s hook-based behavior may matter most.
Open questions
- Is Copilot CLI officially supported?
- Is MCP-only setup enough, or are hooks required for full functionality?
- Should Copilot CLI use the existing
vscode-copilot hook target, or should there be a separate copilot-cli target?
- Which hook events are supported and recommended?
- What is the correct hook file format?
- What is the correct user-level hook file location?
- How can users verify that hooks are executing correctly?
- Are there known limitations in Copilot CLI around output interception, compaction, indexing, or session continuity?
Thanks for the project. Official Copilot CLI documentation, especially around hooks, would make Context Mode much easier to adopt for terminal-first Copilot users.
Use case
See above
Proposed solution
See above
Platform
Other (please specify)
Feature description
Add official GitHub Copilot CLI support docs for Context Mode MCP and hooks
Summary
I would like official documentation for using
context-modewith GitHub Copilot CLI, specifically covering both:The MCP configuration path seems relatively straightforward, but the hook story is less clear. Since Context Mode’s value depends not only on exposing tools, but also on routing large outputs, preserving useful context, and integrating with agent lifecycle events, it would be helpful to know whether Copilot CLI is officially supported and what the recommended hook setup should be.
I am using Copilot CLI on Windows, but this request is primarily about official Copilot CLI support in general.
Request
Could you please add official documentation for GitHub Copilot CLI covering:
Why hooks need explicit documentation
MCP-only registration appears to expose Context Mode tools to the agent, but it is not obvious whether that provides the full Context Mode experience.
For example, users need to know whether Copilot CLI hooks are required for:
Without official hook guidance, users may configure the MCP server successfully but still miss the main benefits of Context Mode.
What I tried / inferred
Based on Copilot CLI MCP configuration conventions, I expected an MCP config similar to this:
{ "mcpServers": { "context-mode": { "type": "local", "command": "context-mode", "args": [], "env": {}, "tools": ["*"] } } }However, I am not sure whether this is the recommended command, whether additional arguments are needed, or whether the command should be invoked through a full path,
npx, or a global npm install.More importantly, I am not sure what the officially supported hook configuration should be for Copilot CLI.
For example, should users configure hooks for events such as:
And should those hooks invoke Context Mode using commands such as:
Or should Copilot CLI have its own Context Mode hook target, for example:
Desired documentation
It would be helpful to have an official section like:
GitHub Copilot CLI
Install Context Mode:
Configure MCP:
{ "mcpServers": { "context-mode": { "type": "local", "command": "context-mode", "args": [], "env": {}, "tools": ["*"] } } }Configure hooks:
{ "version": 1, "hooks": { "SessionStart": [ { "type": "command", "command": "context-mode hook copilot-cli sessionstart" } ], "PreToolUse": [ { "type": "command", "command": "context-mode hook copilot-cli pretooluse" } ], "PostToolUse": [ { "type": "command", "command": "context-mode hook copilot-cli posttooluse" } ], "PreCompact": [ { "type": "command", "command": "context-mode hook copilot-cli precompact" } ] } }Also document how to verify:
And how to confirm that hooks are actually running, not merely that MCP tools are available.
Why VS Code Copilot support is not enough
VS Code Copilot support does not fully answer the Copilot CLI use case.
Copilot CLI has a different runtime model, different configuration locations, and potentially different hook behavior. A setup that works in VS Code does not necessarily prove that Context Mode is correctly integrated with Copilot CLI’s terminal-agent workflow.
Terminal-first users often rely on Copilot CLI for:
These workflows can produce large volumes of output, which is exactly where Context Mode’s hook-based behavior may matter most.
Open questions
vscode-copilothook target, or should there be a separatecopilot-clitarget?Thanks for the project. Official Copilot CLI documentation, especially around hooks, would make Context Mode much easier to adopt for terminal-first Copilot users.
Use case
See above
Proposed solution
See above