Copilot MCP Server
Utilizes the GitHub CLI and existing authentication to securely access Copilot services and manage organization-specific AI configurations.
Integrates with GitHub Copilot to provide AI-powered code assistance, including features for code explanation, natural language code suggestions, code reviews, and a programming-focused chat interface.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Copilot MCP Serverexplain how this function works"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Copilot MCP Server
A Model Context Protocol (MCP) server that integrates with GitHub Copilot to provide AI-powered code assistance directly to Claude Code and other MCP-compatible tools.
Features
Chat with Copilot: Get general programming assistance using GitHub Copilot's AI models
Code Explanation: Detailed explanations of code snippets
Code Suggestions: Generate code based on natural language descriptions
Code Review: Get feedback and improvement suggestions for your code
Multiple AI Models: Support for GPT-4o, Claude 3.5 Sonnet, and Gemini 2.0 Flash
Rate Limiting: Built-in rate limiting to respect API limits
Automatic Authentication: Works with your existing GitHub Copilot CLI setup
Related MCP server: copilot-mcp-server
Installation
Option 1: Using npx (Recommended)
npx @willianpaiva/copilot-mcp-serverOption 2: Manual Installation
Clone this repository:
git clone https://github.com/WillianPaiva/copilot-mcp.git
cd copilot-mcpInstall dependencies:
npm installBuild the project:
npm run buildConfiguration
No Configuration Needed!
The server works out of the box with your existing GitHub Copilot authentication.
Optional Configuration
Only needed for special use cases. Create a .env file:
cp .env.example .envOptional settings:
# Only if you want to override the detected organization
GITHUB_ORG=your_organization_name
# Optional debugging
LOG_LEVEL=info
DEBUG=false
MAX_REQUESTS_PER_MINUTE=60Setup Requirements
Prerequisites:
GitHub Copilot Subscription: You need an active GitHub Copilot subscription
GitHub Copilot CLI Installed: Install and authenticate GitHub Copilot CLI:
# Install GitHub CLI first brew install gh # or your preferred method # Install GitHub Copilot CLI extension gh extension install github/gh-copilot # Authenticate (this will save tokens to ~/.config/github-copilot/) gh auth login
Authentication
Automatic Authentication (Recommended)
The MCP server automatically detects your GitHub Copilot authentication from:
~/.config/github-copilot/hosts.json~/.config/github-copilot/apps.json
No manual configuration needed if you have GitHub Copilot CLI installed and authenticated!
Troubleshooting Authentication
If automatic detection fails, ensure you have GitHub Copilot CLI properly installed and authenticated:
gh extension install github/gh-copilot
gh auth loginUsage
With Claude Code
Add the following to your Claude Code MCP configuration:
Option 1: Using npx (Recommended)
{
"mcpServers": {
"copilot": {
"command": "npx",
"args": ["-y", "@willianpaiva/copilot-mcp-server"]
}
}
}Option 2: Manual Installation
{
"mcpServers": {
"copilot": {
"command": "node",
"args": ["/path/to/your/copilot-mcp/build/index.js"]
}
}
}That's it! No tokens or environment variables needed - the server automatically uses your existing GitHub Copilot authentication.
Available Tools
copilot_chat
General programming assistance and questions.
// Example usage in Claude Code
copilot_chat({
message: "How do I implement a binary search algorithm?",
model: "gpt-4o",
context: "I'm working on a JavaScript project"
})copilot_explain
Get detailed explanations of code.
copilot_explain({
code: "function fibonacci(n) { return n <= 1 ? n : fibonacci(n-1) + fibonacci(n-2); }",
language: "javascript"
})copilot_suggest
Generate code from natural language descriptions.
copilot_suggest({
prompt: "Create a React component for a user profile card",
language: "javascript",
maxSuggestions: 3
})copilot_review
Get code review and improvement suggestions.
copilot_review({
code: "your code here",
language: "python",
reviewType: "security"
})Available Resources
copilot://models
List of available AI models and their capabilities.
copilot://usage
Current usage statistics and rate limiting information.
Development
Run in Development Mode
npm run devBuild
npm run buildLint
npm run lintTest
npm testRate Limiting
The server implements rate limiting to respect GitHub's API limits:
Default: 60 requests per minute
Configurable via
MAX_REQUESTS_PER_MINUTEenvironment variableAutomatic reset every minute
Error Handling
The server includes comprehensive error handling for:
Authentication failures
Rate limit exceeded
Network issues
Invalid requests
API unavailability
Troubleshooting
Common Issues
Authentication Failed
Ensure GitHub Copilot CLI is installed:
gh extension install github/gh-copilotMake sure you're authenticated:
gh auth loginVerify you have access to GitHub Copilot
Rate Limit Exceeded
Wait for the rate limit to reset (1 minute)
Consider reducing the frequency of requests
API Not Available
Verify you have access to GitHub Copilot
Check GitHub's status page for outages
Debug Mode
Enable debug mode for verbose logging:
DEBUG=true
LOG_LEVEL=debugContributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License - see LICENSE file for details.
Security
The server uses your existing GitHub Copilot authentication
No tokens are stored or transmitted by this application
Authentication files are read-only from GitHub CLI's standard locations
Follow GitHub's security best practices for your main GitHub authentication
Support
For issues and questions:
Check the troubleshooting section
Search existing GitHub issues
Create a new issue with detailed information
Available Tools
4 toolscopilot_chatC
Chat with GitHub Copilot AI models for general programming assistance
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Your message or question for Copilot | |
| context | No | Optional context to provide (e.g., current code, file contents) | |
| model | No | AI model to use (optional) | |
| temperature | No | Response creativity (0=focused, 2=creative) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Chats with GitHub Copilot AI models' but doesn't mention any behavioral traits such as rate limits, authentication requirements, response formats, or potential side effects (e.g., whether it's read-only or can modify data). This is a significant gap for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('Chat with GitHub Copilot AI models') and adds a clarifying phrase ('for general programming assistance'). There is no wasted wording, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of an AI chat tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., how responses are formatted, any limitations), doesn't differentiate from siblings, and provides minimal context beyond the basic purpose, leaving gaps for effective tool selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters (message, context, model, temperature). The description adds no parameter-specific information beyond what's in the schema, such as examples or usage tips. The baseline score of 3 reflects adequate coverage by the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Chat with') and resource ('GitHub Copilot AI models'), specifying it's for 'general programming assistance'. However, it doesn't distinguish this from sibling tools like copilot_explain, copilot_review, or copilot_suggest, which likely serve more specific programming assistance purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (copilot_explain, copilot_review, copilot_suggest). It mentions 'general programming assistance' but doesn't clarify what constitutes 'general' versus the more specialized purposes implied by the sibling names, leaving the agent to guess about appropriate contexts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
copilot_explainC
Get detailed explanations of code from GitHub Copilot
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Code to explain | |
| language | No | Programming language (auto-detected if not provided) | |
| context | No | Additional context about the code |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'gets' explanations, implying a read-only operation, but doesn't cover aspects like rate limits, authentication needs, response format, or potential errors. This leaves significant gaps in understanding how the tool behaves in practice.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with zero waste—it directly states the tool's purpose without unnecessary elaboration. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of explaining code and the lack of annotations and output schema, the description is insufficient. It doesn't address what the explanations include, how they're formatted, or any limitations, leaving the agent with incomplete context for effective tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, meaning all parameters are documented in the schema. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't clarify what 'detailed explanations' entail or how context influences results). Baseline 3 is appropriate as the schema handles parameter documentation adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get detailed explanations') and the resource ('code from GitHub Copilot'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like copilot_chat or copilot_review, which might also involve explanations or discussions about code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like copilot_chat or copilot_review. It lacks any mention of specific contexts, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
copilot_reviewC
Get code review and improvement suggestions from GitHub Copilot
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Code to review | |
| language | No | Programming language | |
| reviewType | No | Type of review to perform |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get[s] code review and improvement suggestions,' which implies a read-only operation, but doesn't clarify if it modifies data, requires authentication, has rate limits, or what the output format is. For a tool with no annotations, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence: 'Get code review and improvement suggestions from GitHub Copilot.' It's front-loaded with the core purpose, has zero waste, and is appropriately sized for the tool's complexity. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., structured feedback, suggestions list), potential errors, or behavioral traits like response format. For a tool with 3 parameters and no structured output, more context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters (code, language, reviewType) with descriptions and constraints. The description adds no additional parameter semantics beyond what's in the schema, such as examples or usage tips. Baseline 3 is appropriate as the schema handles the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get code review and improvement suggestions from GitHub Copilot.' It specifies the verb ('Get') and resource ('code review and improvement suggestions'), and distinguishes it from siblings by focusing on review rather than chat, explanation, or suggestion. However, it doesn't explicitly differentiate from siblings like 'copilot_suggest' which might overlap in providing suggestions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools (copilot_chat, copilot_explain, copilot_suggest) or specify scenarios where this review tool is preferred over others, such as for security checks versus general coding help. Usage is implied but not explicitly defined.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
copilot_suggestC
Get code suggestions and completions from GitHub Copilot
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Description of what code you want to generate | |
| language | No | Target programming language | |
| context | No | Existing code context or constraints | |
| maxSuggestions | No | Maximum number of suggestions to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'suggestions and completions' but fails to detail critical aspects such as rate limits, authentication requirements, response format, or potential side effects. This is a significant gap for a tool interacting with an external AI service.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of interacting with GitHub Copilot, no annotations, and no output schema, the description is insufficient. It lacks details on behavioral traits, error handling, and return values, leaving the agent with incomplete information for reliable tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, clearly documenting all four parameters. The description adds no additional meaning beyond the schema, such as examples or usage tips. However, since the schema is comprehensive, a baseline score of 3 is appropriate as the description doesn't need to compensate for gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as 'Get code suggestions and completions from GitHub Copilot', specifying the action ('Get') and resource ('code suggestions and completions'). It distinguishes from sibling tools like copilot_chat, copilot_explain, and copilot_review by focusing on generation rather than conversation, explanation, or review, though it doesn't explicitly contrast them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like copilot_chat or copilot_explain. It lacks context about specific scenarios, prerequisites, or exclusions, leaving the agent to infer usage based on the name and purpose alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The tools have significant overlap in purpose, as all involve interacting with GitHub Copilot for code-related assistance. While the descriptions differentiate them slightly (e.g., 'chat' vs. 'suggest'), an agent could easily confuse them, especially since 'copilot_suggest' and 'copilot_chat' might both provide code suggestions. The boundaries are unclear, leading to potential misselection.
All tool names follow a consistent 'copilot_' prefix with a descriptive suffix (chat, explain, review, suggest). This verb_noun-like pattern is predictable and readable, making it easy for agents to understand the naming convention without confusion or deviation.
With 4 tools, the count is borderline for a server focused on GitHub Copilot interactions. It feels slightly thin, as it might lack coverage for other potential Copilot functionalities (e.g., debugging or documentation generation), but it's reasonable for basic assistance. However, the overlap in tools reduces the effective utility of having four distinct tools.
The tool surface covers key aspects of GitHub Copilot (chat, explanation, review, suggestions), but there are notable gaps. For example, it lacks tools for more advanced operations like code refactoring, debugging assistance, or integration with specific programming languages. While agents can work around this, the surface is not fully comprehensive for a general programming assistance domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceIntegrates GitHub Copilot CLI with MCP clients to offer various coding assistance tools including asking questions, explaining code, suggesting commands, debugging, refactoring, generating tests, and reviewing code.158MIT
- AlicenseCqualityDmaintenanceConnects MCP-enabled editors to GitHub Copilot CLI for non-interactive code analysis, batch processing, and code review.10275MIT
- FlicenseBqualityCmaintenanceEnables issue-to-code automation for GitHub and GitLab by connecting AI assistants (Claude Code, Gemini CLI, Codex) via MCP, with slash commands for issue analysis, planning, implementation, testing, documentation, and PR creation.339
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered GitHub interactions including repository analysis, code search, PR reviews, and more through the MCP protocol.4MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/WillianPaiva/copilot-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server