Copilot MCP BridgeA lightweight VS Code extension and Model Context Protocol (MCP) server that exposes GitHub Copilot language models (via the official Why Copilot MCP Bridge?
Architecture
Prerequisites
Installation & Setup1. Clone or Symlink to Extensions DirectoryClone the repository and link it to your VS Code extensions folder:
2. Reload VS CodeIn VS Code, open the Command Palette (
Once reloaded, you will see
Available MCP Tools1.
|
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt |
string |
Yes | The prompt, instruction, or task description. |
model |
string |
No | Model identifier or family (e.g. 'auto', 'gpt-4o-mini'). Default: best available. |
system_prompt |
string |
No | System prompt / persona instructions. |
task_name |
string |
No | Short name used for the generated Markdown log file. |
include_active_file |
boolean |
No | If true, automatically attaches active file path, selection, or editor content. |
2. copilot_list_models
Lists all language models provided by your GitHub Copilot subscription in VS Code (with IDs, families, and context token limits).
3. copilot_get_editor_context
Returns real-time editor state from the active VS Code window:
- Active file path
- Selected text (if any)
- Cursor position
- Diagnostics and linter problems (warnings/errors)
Automatic Markdown Logging
Every conversation or delegated task is saved automatically to the workspace:
- Detailed Task Log:
.copilot-mcp/logs/YYYY-MM-DD_HH-mm-ss_<task_name>.md- Includes timestamp, model used, active file, system prompt, full prompt, and response.
- History Index:
.copilot-mcp/HISTORY.md- A persistent, chronological table linking to each individual log file for easy review.
Quick CLI Usage
A standalone CLI script is included in bin/copilot-cli.js:
# List available Copilot models
./bin/copilot-cli.js -l
# Send a prompt
./bin/copilot-cli.js "Explain closures in JavaScript in 2 bullet points"
# Delegate a task with a system prompt and custom task name
./bin/copilot-cli.js -t "auth_review" -s "You are a senior security engineer." "Review the auth middleware in src/auth.ts"
# Include active VS Code editor file automatically
./bin/copilot-cli.js -f -t "write_unit_tests" "Write unit tests for this file"
Client Configuration Examples
Antigravity (mcp_config.json)
Add the server to ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"copilot": {
"command": "node",
"args": [
"/path/to/copilot-mcp-bridge/bin/mcp-stdio-proxy.js"
],
"env": {
"COPILOT_MCP_PORT": "9595"
}
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"copilot": {
"command": "node",
"args": [
"/path/to/copilot-mcp-bridge/bin/mcp-stdio-proxy.js"
],
"env": {
"COPILOT_MCP_PORT": "9595"
}
}
}
}
Direct SSE Connection (Streamable HTTP)
Any MCP client supporting SSE can connect directly to:
http://127.0.0.1:9595/sse
Development & Scripts
# Build TypeScript
npm run build
# Watch mode
npm run watch
# Run Stdio Proxy directly
node bin/mcp-stdio-proxy.js
License
MIT License © 2026 DevGiov