claude-bridges
Allows delegating coding tasks and reviews to the GitHub Copilot CLI in a headless, non-interactive mode with restrictive read-only file access.
Allows delegating coding tasks and reviews to the OpenAI Codex CLI, running in a sandboxed read-only mode by default with optional workspace-write access.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-bridgesconsult all engines on this code for potential bugs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
English · 繁體中文
claude-bridges
MCP servers that let Claude Code delegate to other coding CLIs — cross-model second opinions, structured reviews, and a multi-engine consultation panel.
Most people use AI to autocomplete or to ask one model one question. I use multiple models as a structured thinking system with checks and balances: debate, execute, review, cross-check, iterate.
The Thinking Loop
flowchart TD
A["🧠 I think / identify problem"] --> B["Claude Opus 4.6 @ claude.ai<br/>(debates with me, holds personal memory)"]
B --> C["Claude Code: Fable refines plan<br/>(optional, costly)"]
C --> D["Claude Code: Sonnet 5 executes<br/>(Opus 4.8 advisor) → HANDOFF.md"]
D --> E["Opus 4.6 reviews with me"]
E --> F{"Cross-model review<br/>(consult-bridge)"}
F --> G["Gemini (agy-bridge)"]
F --> H["GitHub Copilot CLI"]
F --> I["OpenAI Codex CLI"]
F -.-> J["Grok / others<br/>(planned, not yet wired)"]
G & H & I --> K["Synthesize + next iteration"]
K --> A
style A fill:#2d3748,color:#fff
style F fill:#4a5568,color:#fff
style J fill:#718096,color:#a0aec0,stroke-dasharray: 5 5This isn't "ask ChatGPT." Each model has a role, a sandbox, and a review gate. No single model's output ships unchecked.
Related MCP server: personal-mcp
What's Actually Wired
The consult tool currently fans out to three engines:
Engine | Wraps | Tier |
| GitHub Copilot CLI ( | Free (GitHub) |
| OpenAI Codex CLI ( | Free (ChatGPT) |
| Antigravity / Gemini CLI | Paid (Gemini Pro/Flash) |
Grok and others are in the aspirational loop but don't have bridges yet. The system is designed to add engines — each is ~30 lines in lib/engines.js.
Architecture
claude-bridges/
package.json shared deps (@modelcontextprotocol/sdk, zod)
node_modules/ one install serves all bridges
lib/
common.js shared MCP boilerplate, CLI runner, exe resolution
engines.js slim engine runners for consult-bridge's chain
copilot-bridge/
index.js standalone MCP server → copilot_exec tool
codex-bridge/
index.js standalone MCP server → codex_exec tool
consult-bridge/
index.js aggregator MCP server → consult tool
agy-bridge-vendored/ vendored copy of the agy-bridge (Gemini)Three independent MCP servers, each usable standalone or through the consult aggregator:
Bridge | Tool | Default Posture |
|
| Restrictive: no file writes, only read/search/git-gh shell auto-approved |
|
| Sandboxed |
|
| Aggregator: runs engines in parallel ( |
consult-bridge deliberately does NOT reuse the individual bridges' code paths — lib/engines.js duplicates ~30 lines of arg-building so the tested single bridges carry zero refactor risk.
Tools
consult (the star)
Consult a panel of external models. Two modes:
all(default) — runs every engine in parallel, returns all successful answers labeled by engine. Use for cross-model second opinions where perspective diversity matters.first— sequential fallback chain, first success wins. Cheaper, use for routine questions or tight quotas.
consult({
prompt: "Review this auth middleware for timing attacks",
mode: "all", // "all" | "first"
order: ["copilot", "codex", "agy"] // engine set/chain order
})Engine order configurable via order arg or CONSULT_ORDER env (default copilot,codex,agy). A failed engine (quota, auth, timeout, empty output, nonzero exit) fails over to the next; the trail is appended to the result.
copilot_exec
Delegate to GitHub Copilot CLI, headless and non-interactive. Read-only by default — can read and search files under cwd but cannot modify them.
codex_exec
Delegate to OpenAI Codex CLI via codex exec. Sandboxed read-only by default. Pass sandbox: "workspace-write" only when you actually intend Codex to edit files.
Install
cd ~/claude-bridges
npm installA single npm install at the root serves all servers — Node resolves node_modules by walking up from each index.js.
Register (user scope)
claude mcp add-json copilot-bridge '{"command":"node","args":["C:/Users/YOU/claude-bridges/copilot-bridge/index.js"],"timeout":600000}' -s user
claude mcp add-json codex-bridge '{"command":"node","args":["C:/Users/YOU/claude-bridges/codex-bridge/index.js"],"timeout":600000}' -s user
claude mcp add-json consult-bridge '{"command":"node","args":["C:/Users/YOU/claude-bridges/consult-bridge/index.js"],"timeout":600000}' -s userReplace C:/Users/YOU with your actual home directory. All three CLIs must be authenticated first:
copilot login # GitHub Copilot CLI
codex login # OpenAI Codex CLI
# agy: see agy-bridge docs for Gemini authConfiguration (env vars)
Common
Variable | Default | Description |
|
| Per-engine timeout in seconds |
|
| Truncation cap for output |
| (engine default) | Override the model |
| (auto-resolved) | Override the CLI executable path |
copilot-bridge
Variable | Default | Description |
| (restrictive defaults) | Replace permission flags wholesale. JSON array or whitespace-separated string. Deny rules always beat allow rules in Copilot. |
codex-bridge
Variable | Default | Description |
|
|
|
consult-bridge
Variable | Default | Description |
|
| Per-engine timeout in seconds |
|
| Total output truncation cap |
|
| Per-engine truncation in |
|
| Default engine order |
|
| Default mode ( |
Why This Exists
I've been building things since junior high — first Arduino sketches, now PCBs and trading systems. AI is part of my toolkit and my learning loop: I think with Opus 4.6 (planner/debater by nature), execute with Sonnet 5 + Opus 4.8 (strict prompt-followers, built to ship), and cross-check across Gemini, Copilot, and Codex before anything lands.
Each model has a job that matches how it was trained:
Think — Opus 4.6 @ claude.ai holds my personal memory, debates approaches, and stress-tests plans before I commit. Its training leans toward reasoning and nuance — exactly what planning needs.
Execute — Sonnet 5 writes the code; Opus 4.8 reviews as advisor. Both are trained for strict prompt-following and precise output — they ship, not philosophize.
Cross-check —
consultfans out to Copilot, Codex, and Gemini in parallel. Different training data, different blind spots, independent verdicts. No single model gets the last word.Iterate — everything feeds back to me. I synthesize, decide, and kick off the next cycle. The human stays in the loop at every gate.
Beyond model selection, each delegation gets a role prompt — "As a Security auditor…", "As a Frontend engineer…", "As a Karpathy-style code reviewer…" — so the model responds from a specific expertise frame, not as a generic assistant. I maintain a full role table (20+ roles across engineering, product, content, and research) that maps each role to the right model tier and tool.
The bridges are the plumbing that makes cross-checking programmatic — not manual copy-paste between chat windows.
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server orchestrating local CLI agents (Claude Code, OpenAI Codex, Google Gemini) for cross-validation, second opinions, and persona-driven prompting.18MIT
- FlicenseNot gradedqualityAmaintenanceMCP server that bridges coding agents (Claude Code, Codex, Gemini CLI) via ACP for pair programming, enabling agents to consult each other as tools.3-
- AlicenseNot gradedqualityBmaintenanceMCP server enabling Claude to consult Codex (GPT-5.x) mid-task for second opinions, plan/diff review, brainstorming, and codebase exploration via structured debates and permission-controlled interactions.2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables Claude Code to delegate tasks to Codex for real-time collaborative code generation and execution.4 npmMIT