βοΈ 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") |