⚙️ How It Works
How the server bridges your assistant and GitHub Copilot via the official SDK.
This MCP server bridges your AI assistant and GitHub Copilot via the official
@github/copilot-sdk:
- On startup, it spawns the Copilot CLI server and connects via JSON-RPC over stdio
- Each
querycall creates a fresh Copilot session, sends the prompt (with optional attachments), collects the response, then disconnects list_modelsqueries the CLI for available models — results are cached automatically to avoid rate limiting- Authentication is handled entirely by the Copilot CLI — log in once with
gh auth loginand this MCP inherits it
🔒 Security best practices
- ✅ No extra API keys — the bundled CLI handles auth via browser OAuth or
GITHUB_TOKEN - ✅ Never commit
.mcp.json(gitignored by default) - ✅ Use
GITHUB_TOKENin the MCP server env to avoid interactive browser prompts
🧱 Tech stack
| Runtime | Node.js ≥ 20 |
| Language | TypeScript 5+ (ESM) |
| Protocol | Model Context Protocol (MCP) 1.27 |
| Copilot SDK | @github/copilot-sdk |
| Schema | Zod |
| Tests | Vitest |
| Module System | ESM ("type": "module") |