CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
hampsterx avatar

Codex Mcp Bridge

hampsterx/codex-mcp-bridge
3STDIOregistry active
Summary

Wraps the Codex CLI as MCP tools so you can query code, run reviews, and get structured output from clients that don't have shell access. Exposes six tools: `codex` for free-form prompts with session resume and sandbox control, `review` for native diff-aware reviews against uncommitted changes or base branches, `search` for web lookups, `query` for isolated text analysis, `structured` for JSON Schema validated output, and `ping` for health checks. If you're already in a terminal agent with shell access, call Codex CLI directly. This bridge is for Cursor, Windsurf, Claude Desktop, or VS Code where you need subprocess isolation, partial response capture on timeout, automatic model fallback on quota errors, or multi-turn conversations via session IDs. Includes a FIFO queue that caps parallel spawns at three and redacts secrets from output.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →

codex-mcp-bridge

npm version npm downloads CI License: MIT Node.js TypeScript MCP

MCP server that wraps Codex CLI as a subprocess, exposing code execution, web search, and structured output as Model Context Protocol tools.

Works with any MCP client: Claude Code, Gemini CLI, Cursor, Windsurf, VS Code, or any tool that speaks MCP.

Do you need this?

If you're in a terminal agent (Claude Code, Codex CLI, Gemini CLI) with shell access, call Codex CLI directly. It's faster, cheaper, and zero overhead:

# Review current branch vs main
codex review --base main

# Review uncommitted changes
codex review --uncommitted

# Review with custom focus
codex review --base main "Focus on security and error handling"

# From a worktree (run inside the worktree; `-C` is broken for `review`)
cd /path/to/worktree && codex review --base main

# General analysis
codex exec "Analyze src/utils/parse.ts for edge cases"

Use this MCP bridge instead when:

  • Your client has no shell access (Cursor, Windsurf, Claude Desktop, VS Code)
  • You need structured output with JSON Schema validation (Codex CLI's --json has known bugs)
  • You need partial response capture on timeout and automatic model fallback on quota exhaustion
  • You want subprocess isolation: explicit env allowlist, no shell escape, secret redaction on output, FIFO-queued concurrency (max 3 parallel spawns, configurable via CODEX_MAX_CONCURRENT)
  • You need multi-turn conversations via session resume (sessionId / resetSession, inspected via listSessions)

Worktree note: Codex CLI issue #9084 breaks codex -C /path review .... Run codex review from inside the worktree to avoid it.

Quick Start

npx codex-mcp-bridge

Prerequisites

  • Codex CLI installed (npm i -g @openai/codex)
  • OPENAI_API_KEY environment variable set, or codex auth login completed

Claude Code

claude mcp add codex-bridge -- npx -y codex-mcp-bridge

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "codex-bridge": {
      "command": "npx",
      "args": ["-y", "codex-mcp-bridge"]
    }
  }
}

Cursor / Windsurf / VS Code

Add to your MCP settings:

{
  "codex-bridge": {
    "command": "npx",
    "args": ["-y", "codex-mcp-bridge"],
    "env": {
      "OPENAI_API_KEY": "sk-..."
    }
  }
}

Tools

ToolDescription
codexExecute prompts with file context, session resume, and sandbox control. Multi-turn conversations via session IDs. Use for free-form review prompts; see Code review with this CLI.
reviewNative diff-aware Codex review via codex exec review --json. No caller prompt; supports uncommitted, base branch, and commit review modes.
searchWeb search via codex --search. Returns synthesized answers with source URLs.
queryLightweight text analysis. No repo context, no sessions. Runs in an isolated temp directory.
structuredJSON Schema validated output via Ajv. Data extraction, classification, or any task needing machine-parseable output.
pingHealth check with CLI version, capabilities, and concurrency diagnostics (activeCount, queueDepth).
mcpStatusReport what Codex says about each MCP server it knows about: auth type, tool inventory, and whether it initialized. Optional diagnostic mode adds explicit failure states and error text.
listSessionsList active conversation sessions with metadata (turn count, model, timestamps).

codex

General-purpose execution. Supports multi-turn conversations via sessionId, sandbox levels (read-only, workspace-write, full-auto), and reasoning effort control. Pass resetSession: true to discard and start fresh. Use listSessions to inspect active sessions before resuming.

Key parameters: prompt (required), files, model, sessionId, sandbox, reasoningEffort, workingDirectory, timeout (default 60s).

search

Web search powered by OpenAI's native search infrastructure via Codex CLI's --search flag. Returns synthesized answers with source URLs.

Key parameters: query (required), model, workingDirectory, timeout (default 120s).

query

Lightweight, non-agentic text analysis. Spawns in an isolated temp directory so the bridge's repo context doesn't leak. Pass text to analyze in the context parameter. Supports reasoningEffort and maxResponseLength.

Key parameters: prompt (required), context, model, reasoningEffort, timeout (default 60s).

review

Thin wrapper around Codex CLI's native diff-aware review. The bridge passes the diff selector to codex exec review --json; upstream Codex owns the review prompt. Requires a real git repository via workingDirectory.

Key parameters: mode (required: uncommitted, base, or commit), workingDirectory (required), base (required for base mode), commit (required for commit mode), title, model, timeout (default 180s).

structured

Embeds a JSON Schema in the prompt and validates the response with Ajv. Returns clean JSON on success, validation errors on failure.

Key parameters: prompt (required), schema (required, JSON string), files, model, workingDirectory, timeout (default 60s).

ping

No parameters. Returns CLI version, auth status, model configuration, and concurrency diagnostics (activeCount, queueDepth).

mcpStatus

Reports per-server MCP state as Codex's own app-server protocol sees it. Unlike every other tool, it deliberately does not suppress Codex's MCP servers or harden the subprocess environment, because both would disable the thing being measured. It therefore boots the servers in ~/.codex/config.toml and is slower than a normal call.

Key parameters: diagnostics (default false), workingDirectory, timeout (per-request, default 90s).

ModeCostWhat you get
default~6-9sInventory: auth type, tool names and counts, and initialized / unknown per server. Creates no thread and writes no session record.
diagnostics: true~10-20sAdds an explicit failed state and the error text naming the cause (expired OAuth grant, missing binary, remote refusal). Starts an ephemeral thread, which is never materialised on disk.

Reading the output:

  • unknown is not a failure. It means the inventory carried no server info and no explicit verdict was available. Only diagnostics: true can report failed.
  • A degraded warning means don't trust unknown. Slow calls have been observed reporting healthy servers as uninitialized, so the tool reports how long the underlying call took and flags the result when it was slow enough to be suspect.
  • builtIn marks a server Codex injects that is not in your config; configuredButUnreported marks one in your config that Codex never mentioned.

Example:

atlassian            failed       auth=oAuth  tools=0
    error: MCP client for `atlassian` failed to start: MCP startup failed: failed to
    refresh OAuth tokens for server atlassian: ... invalid_grant: Grant not found
codex_apps           initialized  auth=bearerToken  tools=117  (builtIn)
linear               initialized  auth=oAuth  tools=57
serena               initialized  auth=unsupported  tools=22

All tools attach execution metadata (_meta) with durationMs, model, fallbackUsed, and session info where applicable. See DESIGN.md for details.

Code review with this CLI

This bridge does not bundle reviewer prompts. There are three paths for code review:

Native upstream codex review

codex review --base main
codex review --uncommitted
codex review --base main "Focus on security and error handling"

Diff-aware review built into Codex CLI. No bridge involvement. Use this when your client has shell access.

Bridge review tool for native diff-aware review

{
  "tool": "review",
  "arguments": {
    "mode": "base",
    "base": "main",
    "workingDirectory": "/path/to/worktree"
  }
}

The bridge runs codex exec review --json from workingDirectory, captures the final review text, and returns review metadata such as threadId, event counts, and redacted command output. It does not accept a prompt.

Bridge codex tool with caller-supplied prompt

{
  "tool": "codex",
  "arguments": {
    "prompt": "<your review prompt + diff or file references>",
    "sandbox": "read-only"
  }
}

The bridge runs codex exec --sandbox read-only with the supplied prompt and returns stdout. Use this for free-form review prompts or review inputs that are not expressible as uncommitted, base, or commit diff selectors.

Representative review prompt

A starting point; adapt freely:

Review the following diff:

<diff content>

Look for:
- Bugs that would surface in production
- Missing error handling on user-supplied input
- Tests modified to silence failures rather than verify behaviour
- Security issues (injection, missing auth checks, secret leaks)

For each finding cite file:line, severity (high/medium/low), and a suggested fix.
Skip style/formatting; assume an autoformatter handles those.

The bridge has no opinion on prompt content. See ADR-001 for the rationale.

Configuration

VariableDefaultDescription
CODEX_DEFAULT_MODEL(CLI default)Default model for all tools
CODEX_FALLBACK_MODELo3Fallback on quota exhaustion (none to disable)
CODEX_CLI_PATHcodexPath to CLI binary
CODEX_MAX_CONCURRENT3Max concurrent subprocess spawns
CODEX_MCP_SERVERS(unset)Control which Codex internal MCP servers stay enabled. See DESIGN.md.

Choosing a Codex MCP server

You need...Consider
Structured output, model fallback, concurrency management, session resumeThis bridge
Session threading with conversationId, callback URI forwarding@tuannvm/codex-mcp-server
Structured patch output with approval policiescexll/codex-mcp-server
Minimal codex exec wrapper with parallel subagentscodex-as-mcp
Native Codex MCP (experimental, no wrapper needed)codex mcp serve (docs)

Performance

Codex CLI has minimal startup overhead (<100ms), so wall time is dominated by model inference.

ScenarioTypical time
Trivial prompt9-12s
Web search~17s

Default timeouts (60-300s) are comfortable for typical workloads.

Bridge family

Two MCP servers, same architecture, different underlying CLIs. Each wraps a terminal agent as a subprocess and exposes it as MCP tools. Pick the one that matches your model provider, or run both for cross-model workflows.

codex-mcp-bridgeclaude-mcp-bridge
CLICodex CLIClaude Code
ProviderOpenAIAnthropic
Toolscodex, review, search, query, structured, ping, listSessionsquery, review, search, structured, ping, listSessions
Code reviewreview tool wrapping native codex exec review --json, or codex tool with caller-supplied promptreview tool with caller-supplied prompt and hardened isolation defaults
Structured outputAjv validationNative --json-schema
Session resumeSession IDs with multi-turnNative --resume
Budget capsNot supportedNative --max-budget-usd
Effort controlreasoningEffort (low/medium/high)--effort low/medium/high/max
Cold start<100ms (inference dominates)~1-2s
AuthOPENAI_API_KEYclaude login (subscription) or ANTHROPIC_API_KEY
CostPay-per-tokenSubscription (included) or API credits
Concurrency3 (configurable)3 (configurable)
Model fallbackAuto-retry with fallback modelAuto-retry with fallback model

Both share: subprocess env isolation, path sandboxing, output redaction (secret stripping), FIFO concurrency queue, MCP tool annotations, _meta response metadata, progress heartbeats.

Development

npm install
npm run build        # Compile TypeScript
npm run dev          # Watch mode
npm test             # Run tests
npm run lint         # ESLint
npm run typecheck    # tsc --noEmit

Further reading

  • DESIGN.md - Architecture, MCP server control grammar, sessions, output parsing, response metadata
  • SECURITY.md - Environment isolation, path sandboxing, output redaction, resource limits
  • CHANGELOG.md - Release history

License

MIT

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
inference shell
inference shell
create and run specialised agents in minutes
build now →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →

Configuration

CODEX_CLI_PATHdefault: codex

Path to the codex CLI binary. Defaults to 'codex' on PATH.

CODEX_DEFAULT_MODEL

Default Codex model for query/review/search.

CODEX_FALLBACK_MODEL

Model to use when the primary model hits a quota error.

CODEX_MAX_CONCURRENTdefault: 3

Maximum concurrent Codex CLI subprocesses (default 3).

CODEX_MCP_SERVERS

Controls which MCP servers from ~/.codex/config.toml stay enabled inside the Codex subprocess. Empty/unset disables all non-required servers; 'inherit' passes config through; comma-separated names (e.g. 'serena,github') enables those; values starting with '{' or '[' are raw TOML.

Categories
Search & Web Crawling
Registryactive
Packagecodex-mcp-bridge
TransportSTDIO
UpdatedApr 20, 2026
View on GitHub

More from hampsterx

  • Claude Mcp Bridge2
  • Gemini Mcp Bridge6

Related Search & Web Crawling MCP Servers

View all →
iamvibhorsingh avatar
Bbox Mcp Server

iamvibhorsingh/bbox-mcp-server

Geospatial toolkit for AI: spatial queries, coord conversion, H3, OSM search, map verification links
3
iggredible avatar
Vim Mcp

iggredible/vim-mcp

Connect Claude Code to Vim/Neovim - query state, execute commands, search help, record macros
3
buywhere avatar
BuyWhere MCP Server

io.github.buywhere/buywhere-mcp

Open-source MCP server for AI agent commerce. Search 50M+ products across 6 markets.
3
happygallo avatar
Apple Ads

io.github.happygallo/apple-ads

Manage Apple Search Ads campaigns, keywords, budgets, and reports via API v5.
3
kroq86 avatar
Vector DB MCP

io.github.kroq86/vector-db-mcp

Assembly-accelerated DuckDB MCP server for code search, indexing, and symbol lookup.
3
lipdog avatar
Fossick

io.github.lipdog/fossick

Search all of GitHub from your AI agent — find libraries, drill into repos, find code patterns.
3