GitHub Copilot Extensions
January 30, 2026
GitHub Copilot Extensions allow developers to build custom agents and integrations that leverage Copilot's AI capabilities. Create specialized assistants that understand your tools, services, and workflows.
What Are Copilot Extensions?
Copilot Extensions extend GitHub Copilot's capabilities beyond code completion. They're agents that can:
- Answer questions about your systems
- Execute actions on behalf of users
- Integrate with external services
- Provide domain-specific assistance
When a user mentions your extension (@your-extension), Copilot routes the request to your agent.
Architecture
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ User │───►│ GitHub │───►│ Your │
│ @agent │ │ Copilot │ │ Server │
└─────────────┘ └─────────────┘ └─────────────┘
Your extension receives:
- User messages
- Conversation context
- GitHub-authenticated user info
And responds with:
- Text responses
- Code suggestions
- Action confirmations
Building an Extension
1. Create a GitHub App
Extensions are built on GitHub Apps:
# app.yml
name: my-copilot-extension
description: A helpful assistant for my service
public: true
default_events:
- copilot_chat
default_permissions:
copilot_chat: write
2. Handle Requests
Your server receives chat requests:
app.post('/copilot', async (req, res) => {
const { messages, user } = req.body;
// Process the user's message
const lastMessage = messages[messages.length - 1];
// Generate a response
const response = await generateResponse(lastMessage.content);
// Return to Copilot
res.json({
choices: [{
message: {
role: 'assistant',
content: response,
}
}]
});
});
3. Add Capabilities
Extensions can include:
Slash Commands: Predefined actions
/deploy - Deploy to production
/status - Check system status
/rollback - Rollback last deployment
References: Contextual data sources
@docs - Search documentation
@issues - Reference GitHub issues
@prs - Reference pull requests
Use Cases
DevOps Assistant
Help developers interact with infrastructure:
- Check deployment status
- View logs and metrics
- Trigger CI/CD pipelines
Documentation Bot
Provide instant answers from your docs:
- Search knowledge bases
- Explain APIs and features
- Generate code examples
Support Agent
First-line support within the IDE:
- Troubleshoot common issues
- Create support tickets
- Escalate to humans
Integration with MCP
Copilot Extensions can connect to MCP servers for expanded capabilities:
import { createMcpClient } from '@modelcontextprotocol/sdk';
const mcpClient = createMcpClient({
server: 'file://./my-mcp-server',
});
// Use MCP tools in your extension
const result = await mcpClient.callTool('search_docs', {
query: userMessage,
});
Authentication
Extensions receive GitHub-verified user identity:
app.post('/copilot', async (req, res) => {
const user = req.headers['x-github-user'];
const token = req.headers['x-github-token'];
// Verify and use GitHub identity
const octokit = new Octokit({ auth: token });
const repos = await octokit.repos.listForAuthenticatedUser();
});
Marketplace Distribution
Publish your extension to the GitHub Marketplace:
- Build and test your extension
- Submit for review
- Once approved, users can install via Marketplace
- Monetization options available
Limitations
Current limitations to be aware of:
- Response latency requirements
- Rate limits on requests
- Context window constraints
- Streaming support varies
When to Build an Extension
Good fit:
- Have a service developers use daily
- Want to meet developers in their IDE
- Need authenticated access to GitHub data
- Building internal developer tools
Consider alternatives when:
- Need standalone agent (use OpenAI/Claude SDKs)
- Building general-purpose agents (use LangChain)
- Need complex multi-agent orchestration
Sources
- GitHub Copilot Extensions Documentation — Official docs
- GitHub Marketplace — Distribution
- GitHub Apps — Foundation for extensions
See also: MCP Servers · Agent Skills · Tools & Function Calling