Skip to content

Copilot Proxy API

Self-hosted GitHub Copilot bridge for Claude Code and Codex CLI with OpenAI Responses, Anthropic Messages, streaming resilience, and context management.

Install

$npx copilot-proxy-api@latest start --claude-code
Claude Code
claude mcp add copilot-proxy-api -- npx copilot-proxy-api@latest start --claude-code
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "copilot-proxy-api": {
      "command": "npx",
      "args": [
        "copilot-proxy-api@latest",
        "start",
        "--claude-code"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

Copilot Proxy API for Claude Code and Codex CLI

Self-hosted GitHub Copilot bridge for Claude Code and Codex CLI with OpenAI Responses, Anthropic Messages, streaming resilience, and context management.

Quick Start

With Node.js and an active GitHub Copilot subscription:

npx copilot-proxy-api@latest start --claude-code

Complete the GitHub sign-in, choose your models, then paste the generated Claude Code command into a new terminal.

Client guides: Claude Code · Codex CLI · Generic OpenAI and Anthropic clients

See It in Action (30 Seconds)

[!CAUTION] This is an unofficial, reverse-engineered project. Keep the proxy local, never expose it publicly without authentication, and use it responsibly within GitHub's Acceptable Use Policies and Copilot Terms.

Why This Fork?

This fork keeps the original bridge practical for current coding agents:

  • Active maintenance for current Copilot models and client compatibility changes.
  • First-class Claude Code support through the Anthropic Messages API and an interactive setup command.
  • Codex CLI support through the OpenAI Responses API.
  • More resilient agent sessions with streaming keepalives, structured error handling, and context management.
  • Built-in usage visibility, quota checks, rate limiting, and manual request approval.

Responsible Use

[!WARNING] copilot-proxy-api is an unofficial compatibility project. It is not affiliated with or supported by GitHub, and Copilot API changes may break it without notice.

Keep the proxy private, require --api-key for non-local access, and avoid rapid or bulk automation. Activity that triggers GitHub's abuse controls may restrict or suspend Copilot access. Review GitHub's Acceptable Use Policies and Copilot Terms.

Credits

This project is a fork of copilot-api by Erick Christian. Thank you for the original work!


Using OpenCode? Its built-in GitHub Copilot provider may remove the need for this proxy.


Project Overview

copilot-proxy-api translates the API shapes used by coding agents into GitHub Copilot requests. It supports OpenAI Chat Completions and Responses plus Anthropic Messages, with compatibility work centered on Claude Code, Codex CLI, and long-running agent sessions.

Features

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…

Explore related