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:

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:

And responds with:

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:

Documentation Bot

Provide instant answers from your docs:

Support Agent

First-line support within the IDE:

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:

  1. Build and test your extension
  2. Submit for review
  3. Once approved, users can install via Marketplace
  4. Monetization options available

Limitations

Current limitations to be aware of:

When to Build an Extension

Good fit:

Consider alternatives when:


Sources


See also: MCP Servers · Agent Skills · Tools & Function Calling