---
title: "How to Build GitHub Copilot Extensions"
description: "GitHub Copilot extensions are plain HTTP servers that GitHub calls whenever a user mentions the extension in Copilot Chat, so they can be written in any language."
url: "https://swe.quest/articles/how-to-build-github-copilot-extensions-be22dc85804ae8a3"
canonical: "https://neon.com/blog/how-to-build-github-copilot-extensions"
source: "Neon"
published: "2025-02-06"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["ai-coding","ai-agents","python","developer-tools"]
---

# How to Build GitHub Copilot Extensions

A post on [Neon](https://swe.quest/sources/neon.md), published 2025-02-06, 5 min read, How-to. Original: [https://neon.com/blog/how-to-build-github-copilot-extensions](https://neon.com/blog/how-to-build-github-copilot-extensions)

## Summary

GitHub Copilot extensions are plain HTTP servers that GitHub calls whenever a user mentions the extension in Copilot Chat, so they can be written in any language. The walkthrough builds a Python FastAPI server whose POST /completion endpoint injects a system prompt, forwards the conversation to the Copilot chat completions API using the x-github-token header, and streams the response back as server-sent events. Registration means creating a GitHub App with read-only Copilot Chat and Editor Context permissions, setting its Copilot app type to Agent, and exposing the local server through an ngrok tunnel. Production extensions such as Neon's also need RAG, function calling and analytics, which the post pitches Layer's platform to handle.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- Python web servers ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- HTTP APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))
- GitHub Apps

## Keywords

GitHub Copilot Extensions, FastAPI, ngrok, GitHub Apps, Neon, Layer

## Related posts

- [Building a VSCode Chat Extension to Order Lunch](https://swe.quest/articles/building-a-vscode-chat-extension-to-order-lunch-64da87e69c43d744.md): Neon · 2025-03-07 · Medium · 6 min read · AI agents, Developer tools, TypeScript, API design
  A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools.
- [Using the GitHub Copilot SDK for Java](https://swe.quest/articles/using-the-github-copilot-sdk-for-java-66dac2758b7e2365.md): GitHub Engineering · 2026-08-10 · Medium · 9 min read · Java & JVM, AI agents, LLMs, Concurrency
  GitHub Copilot SDK for Java lets server-side Java code create agent sessions, register tools, send prompts and stream events without depending on Langchain4j or Spring AI, and with BYOK it can target OpenAI, Azure, Anthropic or compatible endpoints.
- [Copilot x Zed](https://swe.quest/articles/copilot-x-zed-48f53be12c312262.md): Zed · 2023-04-20 · Medium · 2 min read · Developer tools, AI for coding
  GitHub Copilot is now available in Zed v0.82, integrated by reusing the undocumented, minified Copilot LSP server shipped in the Neovim plugin, which Zed's built-in LSP support could drive directly.
- [Reusable Prompts: The Future of Starter Templates](https://swe.quest/articles/reusable-prompts-the-future-of-starter-templates-17f509f51c905431.md): Neon · 2026-01-08 · Medium · 11 min read · AI for coding, AI agents, Developer productivity
  Starter templates can be complemented by reusable, atomic setup "recipes": Markdown prompts that AI coding agents apply to existing codebases, modeled on shadcn/ui's copy-the-code philosophy.
- [Building with the OpenAI Apps SDK: A Field Guide](https://swe.quest/articles/building-with-the-openai-apps-sdk-a-field-guide-4d32891d09b8bb2e.md): Render · 2025-10-29 · Medium · 8 min read · AI agents, LLMs, Developer tools, TypeScript, Debugging
  OpenAI's Apps SDK extends the Model Context Protocol with a widget layer: tools that return structuredContent with \`\_meta.openai/outputTemplate\` metadata get rendered as inline React components in ChatGPT.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
