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 authclaude mcp add copilot-bridge -- npx betahi-copilot-bridge@latest auth{
"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.
README excerpt
Read full README on GitHub →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
- Why this bridge?
- Install & run
- Configure Codex CLI or Codex App
- Configure Claude Code
- Web Search
- Start flags
- Environment overrides
- Supported models
- Development
- Acknowledgements
- License
Demo
Codex CLI
Codex App
Claude Code
Why this bridge?
copilot-bridge is more than a raw HTTP proxy:
- Codex CLI, Codex App, and Claude support. Exposes Codex
/v1/responses, Claude Code/v1/messages, and OpenAI-compatible chat, embeddings, and models routes. - 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.
- Web search support. Model-selected web search can be executed by the bridge and fed back into a final model pass.
- End-to-end reasoning support. Normalizes model aliases and
reasoning_effort, routes through the right upstream API, and preserves returnedreasoning_text/reasoning_contentin 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
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1
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…