GitHub Copilot MCP Server
A Model Context Protocol (MCP) server that integrates GitHub Copilot CLI with MCP clients.
📣 Important Notice
Thanks to @leonardommello for the original work. This is an actively maintained fork to keep the project up-to-date with the latest Copilot features and supported models.
Features
- 9 Tools - Interactive Copilot commands for coding assistance
- 2 Resources - Session history and management
- Full MCP Support - Compatible with Claude Desktop, Claude Code, Cline, and more
- Claude Code Plugin - Claude Code plugin with built-in workflow
- Quick Commands - Shortcut commands for rapid workflow (see below)
Quick Start
For use:
Add to your configuration file:
{
"mcpServers": {
"copilot": {
"command": "npx",
"args": ["-y", "@aykahshi/copilot-mcp-server"]
}
}
}
Optional: Specify model preference
You can use the --prefer flag to choose between Claude or GPT models as defaults:
{
"mcpServers": {
"copilot": {
"command": "npx",
"args": ["-y", "@aykahshi/copilot-mcp-server", "--prefer", "gpt"]
}
}
}
Available preferences:
--prefer gpt (default): Uses GPT models (gpt-5.3-codex, gpt-5.2-codex, gpt-5-mini, gpt-4.1)
--prefer claude: Uses Claude models (Sonnet 4.6, Opus 4.6, Opus 4.6-fast, Sonnet 4)
--prefer gemini: Uses Gemini models (gemini-3-pro-preview)
Model defaults by preference:
| Tool | --prefer claude | --prefer gpt | --prefer gemini |
|---|
| ask-copilot | claude-sonnet-4.6 | gpt-5.3-codex | gemini-3-pro-preview |
| copilot-explain | claude-sonnet-4.6 | gpt-5.3-codex | gemini-3-pro-preview |
| copilot-suggest | claude-sonnet-4.6 | gpt-5.3-codex | gemini-3-pro-preview |
| copilot-debug | claude-opus-4.6 | gpt-5.3-codex | gemini-3-pro-preview |
| copilot-refactor | claude-opus-4.6 | gpt-5.3-codex | gemini-3-pro-preview |
| copilot-review | claude-opus-4.6 | gpt-5.3-codex | gemini-3-pro-preview |
| copilot-test-generate | claude-opus-4.6 | gpt-5.3-codex | gemini-3-pro-preview |
Note: You can still override the default model for any tool by specifying the model parameter in individual tool calls.
Prerequisites
You need GitHub Copilot CLI installed and authenticated:
npm install -g @github/copilot
copilot /login
Hello World Example
Once configured, here's a simple way to get started:
In Claude Desktop (or your MCP client):
Use ask-copilot with prompt="Write a simple Hello World program in JavaScript"
Response:
console.log("Hello, World!");
That's it! You can now use all the Copilot tools through your AI client.
More examples:
Use copilot-explain to explain this code: console.log("Hello, World!");
Use copilot-suggest for task="List files in current directory"
Use copilot-debug with code="console.log(messge);" and error="ReferenceError: messge is not defined"
Tools
| Tool | Description | Parameters |
|---|
| ask-copilot | Ask Copilot for coding help, debugging, architecture | prompt, context, model, allowAllTools |
| copilot-explain | Get detailed code explanations | code, model |
| copilot-suggest | Get CLI command suggestions | task, model |
| copilot-debug | Debug code errors | code, error, context |
| copilot-refactor | Get refactoring suggestions | code, goal |
| copilot-test-generate | Generate unit tests | code, framework |
| copilot-review | Get code review with feedback | code, focusAreas |
| copilot-session-start | Start new conversation session | - |
| copilot-session-history | Get session history | sessionId |
Resources
| Resource | URI | Description |
|---|
| session-history | copilot://session/{sessionId}/history | Access conversation history for a session |
| sessions-list | copilot://sessions | List all active sessions |
🧩 Plugins
This repository includes ready-to-use plugins that extend functionality:
copilot-flow
AI Collaboration Workflow Plugin - Automates a structured 5-stage development process between Claude and GitHub Copilot.