codex-claude-bridge
Uses OpenAI Codex to perform code and plan reviews, returning verdicts, findings, and session continuity across reviews.
Click on "Install 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., "@codex-claude-bridgeReview the changes I just made."
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.
Claude ↔ Codex Review Bridge
MCP server for automated code review. Claude Code writes the code, OpenAI Codex reviews it — structured feedback comes back inline, no copy-pasting between tools.
Works with your ChatGPT subscription — no API costs.
Quick Start
Free (ChatGPT subscription)
Install the Codex CLI and sign in with your ChatGPT account:
npm install -g @openai/codex
codex loginThen add the MCP server to Claude Code:
claude mcp add codex-bridge -- npx -y codex-claude-bridge@latestAPI key (pay per token)
Set your API key:
export OPENAI_API_KEY=sk-...Then add the MCP server to Claude Code:
claude mcp add codex-bridge -- npx -y codex-claude-bridge@latestRestart Claude Code after setup. The review tools are now available.
How auth works
The SDK reads OAuth tokens from ~/.codex/auth.json (created by codex login). When no OPENAI_API_KEY is set, it uses your ChatGPT subscription automatically.
Prerequisites
Node.js 18+ — nodejs.org
Claude Code — code.claude.com
Codex CLI (free path only) — installed via
npm install -g @openai/codex
What You Get
Once set up, Claude Code gains five new tools:
review_plan— Send an implementation plan for architectural review. Get a verdict (approve / revise / reject) with specific findings.review_code— Send a code diff for review. Get findings with file and line references.review_precommit— Quick sanity check before committing. Automatically captures your staged git changes.review_status— Check whether a review is still in progress, completed, or failed.review_history— Look up past reviews by session or count.
All tools return structured JSON that Claude Code can act on directly.
Usage (MCP)
In Claude Code, just describe what you want reviewed. Claude Code will pick the right tool:
Plan review:
"Review this implementation plan before I start coding." "Check my plan for security issues and scalability risks."
Code review:
"Review the changes I just made." (Claude Code runs
git diffand passes it) "Review this diff for bugs and security issues."
Pre-commit check:
"Run a pre-commit check on my staged changes." "Check if these changes are safe to commit."
Session continuity — pass the session_id from a plan review into a code review to maintain context across the full review lifecycle.
Standalone CLI
Run reviews directly from the terminal — no MCP setup required.
Pre-commit check (auto-captures staged changes):
npx codex-claude-bridge@latest review-precommitBlock commits on issues (CI-friendly, exits 2 on blockers):
npx codex-claude-bridge@latest review-precommit && git commitReview a plan:
npx codex-claude-bridge@latest review-plan --plan plan.mdReview a diff:
git diff main | npx codex-claude-bridge@latest review-code --diff -Add --json to any command for raw JSON output. Use --help to see all options.
Tools Reference
review_plan
Send an implementation plan to Codex for architectural/feasibility review.
Parameter | Type | Required | Description |
| string | yes | The implementation plan to review |
| string | no | Project context and constraints |
| string[] | no | Review focus areas (e.g. |
|
| no | Review depth |
| string | no | Continue from a previous review session |
| string | no | Override the configured default model for this call (e.g. |
Returns: { verdict, summary, findings[], session_id }
review_code
Send a code diff to Codex for code review.
Parameter | Type | Required | Description |
| string | yes | Git diff to review |
| string | no | Intent of the changes |
| string | no | Continue from previous review (e.g. plan review session) |
| string[] | no | Review criteria (e.g. |
| string | no | Override the configured default model for this call (e.g. |
Returns: { verdict, summary, findings[], session_id }
Findings include file and line references when available.
review_precommit
Quick pre-commit sanity check. Auto-captures staged git changes by default.
Parameter | Type | Required | Description |
| boolean | no | Auto-capture |
| string | no | Explicit diff instead of auto-capture |
| string | no | Continue from previous review |
| string[] | no | Custom pre-commit checks |
| string | no | Override the configured default model for this call (e.g. |
Returns: { ready_to_commit, blockers[], warnings[], session_id }
review_status
Check status of a review session.
Parameter | Type | Required | Description |
| string | yes | Session ID to check |
Returns: { status, session_id, elapsed_seconds }
review_history
Query past reviews.
Parameter | Type | Required | Description |
| string | no | Query reviews for a specific session |
| number | no | Return last N reviews (default: 10) |
Returns: { reviews[] } with session_id, type, verdict, summary, timestamp per entry.
Configuration
Create .reviewbridge.json in your project root to customize review behavior:
{
"model": "gpt-5.5",
"reasoning_effort": "medium",
"timeout_seconds": 300,
"max_chunk_tokens": 8000,
"review_standards": {
"plan_review": {
"focus": ["architecture", "feasibility"],
"depth": "thorough"
},
"code_review": {
"criteria": ["bugs", "security", "performance", "style"],
"require_tests": true,
"max_file_size": 500
},
"precommit": {
"auto_diff": true,
"block_on": ["critical", "major"]
}
},
"project_context": "Your project description and constraints."
}All fields are optional. Missing fields use the defaults shown above. Large diffs are automatically split into chunks of approximately max_chunk_tokens tokens and reviewed sequentially.
Where the config is discovered
When the MCP server or CLI starts, it looks for .reviewbridge.json in this order. The first match wins; nothing is merged.
RB_CONFIG_PATHenv var — if set, load exactly that file. Useful when the bridge is launched from a directory that isn't your project (e.g. an MCP host launches it from your home dir). Missing or unreadable file is a hard startup error so typos are surfaced immediately, not silently ignored.Walk-up from the working directory — looks for
.reviewbridge.jsonin the current directory, then each parent. The walk stops at the first.gitboundary so a project nested inside an unrelated git repo doesn't accidentally inherit a parent project's config.$HOME/.reviewbridge.json— a per-machine default. Drop one here to pin a model (e.g.{"model": "gpt-5.4"}) for every project on the box without having to touch each one.Built-in defaults — what you get if nothing is found anywhere.
A startup log line on stderr names the source ([codex-bridge] config source: project (/repo/.reviewbridge.json)) so you can confirm which file is in effect.
The CLI's --config <dir> flag is an explicit override: it looks only at <dir>/.reviewbridge.json and skips the cascade entirely (env vars and $HOME are not consulted in that mode).
Selected files must parse cleanly. Once a
.reviewbridge.jsonis found, malformed JSON or schema-invalid values abort startup. The walk-up does not silently skip past a broken file to the next candidate — that would hide your typo and leave you running on defaults.
Model selection
The default model is gpt-5.5. When the ChatGPT-subscription tier of Codex doesn't yet have a newly-announced flagship, fall back to gpt-5.4 via .reviewbridge.json:
{
"model": "gpt-5.4"
}Model | Description |
| Flagship frontier model (default) — 400K context in Codex |
| Previous flagship. Use when |
These are the models we document and recommend — the flagship plus one fallback. The model field in .reviewbridge.json, the model tool parameter, and the --model CLI flag all accept any string and forward it to Codex as-is, so if you want to run a different model you can. We just don't advertise anything outside the table above.
Storage
Set REVIEW_BRIDGE_DB to persist review history and session state:
export REVIEW_BRIDGE_DB=~/.codex-reviews.dbDefaults to reviews.db in the current directory. Set to :memory: for ephemeral storage.
Troubleshooting
Error | Fix |
| Run |
| Try |
| The model is still rolling out to ChatGPT-tier Codex. Set |
| Check your internet connection. |
| Wait a moment and retry. |
| Increase |
Architecture
Claude Code ──MCP──► codex-claude-bridge ──SDK──► OpenAI Codex
│
SQLite DB
(review history)The SDK (@openai/codex-sdk) internally spawns codex exec as a subprocess — there is no separate "CLI mode." Both ChatGPT subscription auth and API key auth use the same SDK path.
src/
index.ts → Entry point (routes to MCP or CLI)
mcp.ts → MCP server startup
server.ts → Server setup, tool registration
cli/ → Standalone CLI (Commander.js)
tools/ → MCP tool handlers (5 tools)
codex/ → Codex SDK wrapper, prompts, types
config/ → .reviewbridge.json loader
storage/ → SQLite persistence (reviews, sessions)
utils/ → Git diff, chunking, error typesDevelopment
git clone https://github.com/AmirShayegh/codex-claude-bridge.git
cd codex-claude-bridge
npm install
npm test
npm run buildCommand | Description |
| Run tests (Vitest) |
| Bundle with tsup |
| Type checking |
| ESLint |
| Prettier |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AmirShayegh/codex-claude-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server