Skip to content

Copilot Bridge

Use GitHub Copilot as a local OpenAI/Anthropic-compatible API for Codex CLI, Claude Code, and Continue.

Install

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

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

copilot-bridge

Use GitHub Copilot as a local OpenAI/Anthropic-compatible API, so Codex CLI, Codex App, Claude Code and Continue can talk to Copilot with minimal configuration.

[!CAUTION] This is an unofficial bridge for the GitHub Copilot API and may break if the upstream API changes.

Contents

Demo

Codex CLI

Codex App

Claude Code

Why this bridge?

copilot-bridge is more than a raw HTTP proxy:

  1. Codex CLI, Codex App, and Claude support. Exposes Codex /v1/responses, Claude Code /v1/messages, and OpenAI-compatible chat, embeddings, and models routes.
  2. Tool call compatibility. Adapts MCP tool names and tool call payloads to each upstream model's constraints, then restores the original tool identity for the client. This keeps real Claude Code and Codex CLI agent workflows working when MCP plugins expose long or model-incompatible tool names.
  3. Web search support. Model-selected web search can be executed by the bridge and fed back into a final model pass.
  4. End-to-end reasoning support. Normalizes model aliases and reasoning_effort, routes through the right upstream API, and preserves returned reasoning_text / reasoning_content in streaming and non-streaming responses.

Install & run

# one-time GitHub device login
npx betahi-copilot-bridge@latest auth

# start the bridge on 127.0.0.1:4142
npx betahi-copilot-bridge@latest start

After startup the banner prints a Usage Viewer link of the form https://betahi.github.io/copilot-bridge?endpoint=http://127.0.0.1:4142/usage, which renders the Copilot quota snapshot (chat / completions / premium interactions) read from GET /usage.

The bridge exposes both adapter-style endpoints (/v1/responses, /v1/messages) and the raw OpenAI-compatible surface (/v1/chat/completions, /v1/embeddings, /v1/models) so tools like LiteLLM, Continue, Cline and Aider work out of the box. CORS is enabled globally for browser-based clients.

Configure Codex CLI or Codex App

Codex CLI and Codex App use the same provider config in ~/.codex/config.toml. start writes a managed block into that file. You don't edit between the markers; the bridge regenerates that block on every start. To pin the default model for Codex clients, add your top-level keys above the managed block:

# User defaults; edit these freely.
model = "gpt-5.3-codex"
model_reasoning_effort = "high"

# >>> copilot-bridge managed block — auto-generated, do not edit between markers >>>
model_provider = "bridge"
model_supports_reasoning_summaries = true

[model_providers.bridge]
name = "Copilot Bridge"
base_url = "http://127.0.0.1:4142/v1"
wire_api = "responses"
prefer_websockets = false
requires_openai_auth = false
# <<< copilot-bridge managed block — edits outside this block are preserved <<<

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