npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-codex-bridge

v0.3.1

Published

Bidirectional MCP server bridge between Claude Code and Codex CLI

Readme

claude-codex-bridge

npm version npm downloads License: MIT Node.js

Bidirectional MCP server bridge between Claude Code and OpenAI Codex CLI.

Let Claude and Codex work as partners — each can ask the other for help, review code, explain logic, and plan performance improvements.

┌──────────────┐         MCP          ┌──────────────┐
│              │ ◄──────────────────► │              │
│  Claude Code │    claude-codex      │  Codex CLI   │
│              │ ◄───── bridge ─────► │              │
└──────────────┘                      └──────────────┘

Prerequisites

Quick Start

Set up everything with a single command:

npx claude-codex-bridge setup

This registers MCP servers for both Claude Code and Codex, and installs the /codex skill and codex-teammate agent.

Setup

Automatic (recommended)

npx claude-codex-bridge setup              # Full setup: both directions + skill + agent
npx claude-codex-bridge setup claude       # Only Claude Code → Codex
npx claude-codex-bridge setup codex        # Only Codex → Claude
npx claude-codex-bridge setup --skip-extras  # MCP servers only, no skill/agent

Use --global or --local to control where the skill and agent are installed (defaults to interactive prompt).

Manual

Add to your Claude Code MCP config:

claude mcp add codex -s user -- npx claude-codex-bridge serve codex

Or add to .mcp.json in your project:

{
  "mcpServers": {
    "codex": {
      "type": "stdio",
      "command": "npx",
      "args": ["claude-codex-bridge", "serve", "codex"]
    }
  }
}

Add to ~/.codex/config.toml:

[mcp_servers.claude]
command = "npx"
args = ["claude-codex-bridge", "serve", "claude"]
tool_timeout_sec = 600

Usage

Once set up, just talk to Claude Code or Codex naturally. The bridge tools are picked up automatically.

In Claude Code — ask Codex for help

> Ask Codex to review my recent changes

> Get Codex's opinion on whether this approach is correct: [paste plan]

> Have Codex explain how the parser in src/lib/codex-output-parser.ts works

> Ask Codex to analyze performance bottlenecks in the exec runner

> Ask Codex to implement error handling for the retry logic

In Codex — ask Claude for help

> Ask Claude to review the changes in HEAD~3..HEAD

> Have Claude explain the architecture of this project

> Ask Claude to critique my plan for adding caching

Using the /codex slash command (Claude Code)

Install the skill to get the /codex shortcut in Claude Code:

npx claude-codex-bridge install skill claude --global    # or --local

Then use it:

/codex review my recent changes
/codex explain src/lib/exec-runner.ts
/codex is my approach to caching correct?
/codex optimize the output parser for memory usage

Using the /claude slash command (Codex)

Install the skill to get the /claude shortcut in Codex:

npx claude-codex-bridge install skill codex --global    # or --local

Then use it:

/claude review my recent changes
/claude explain the architecture of this project
/claude critique my plan for adding caching

Spawning Codex as a teammate

For parallel work, spawn Codex as a subagent from Claude Code:

> Spawn a codex-teammate to review src/lib/exec-runner.ts while we keep working

Tools

ccb-codex — Claude calls Codex

| Tool | Description | | -------------------- | ------------------------------------------------ | | codex_query | Ask Codex a question or give it a task | | codex_review_code | Ask Codex to review code changes | | codex_review_plan | Ask Codex to critique an implementation plan | | codex_explain_code | Ask Codex to explain code / logic / architecture | | codex_plan_perf | Ask Codex to plan performance improvements | | codex_implement | Ask Codex to write or modify code |

ccb-claude — Codex calls Claude

| Tool | Description | | --------------------- | ------------------------------------------------- | | claude_query | Ask Claude a question or give it a task | | claude_review_code | Ask Claude to review code changes | | claude_review_plan | Ask Claude to critique an implementation plan | | claude_explain_code | Ask Claude to explain code / logic / architecture | | claude_plan_perf | Ask Claude to plan performance improvements | | claude_implement | Ask Claude to write or modify code |

Codex Teammate Agent

You can spawn Codex as a Claude Code teammate — a subagent that automatically uses the bridge tools to give you a second opinion, review code, or work on tasks in parallel.

Install the Agent

npx claude-codex-bridge install agent --global    # or --local

Usage

Once installed, spawn the teammate from Claude Code using the Task tool:

# Code review
Task(subagent_type: "codex-teammate", prompt: "Review src/lib/exec-runner.ts for bugs and performance issues")

# Explain unfamiliar code
Task(subagent_type: "codex-teammate", prompt: "Explain the architecture of the MCP server in codex-server.ts")

# Critique a plan
Task(subagent_type: "codex-teammate", prompt: "Critique this plan: [your plan here]")

# Performance analysis
Task(subagent_type: "codex-teammate", prompt: "Analyze performance bottlenecks in the output parser")

# General question
Task(subagent_type: "codex-teammate", prompt: "What's the best approach for adding retry logic to the bridge?")

The agent automatically picks the right Codex tool (codex_review_code, codex_explain_code, codex_plan_perf, etc.) based on your request.

Configuration

| Variable | Description | Default | | -------------------- | ------------------------------------------------------------ | ----------------- | | BRIDGE_TIMEOUT_MS | Subprocess timeout in milliseconds | 600000 (10 min) | | BRIDGE_MAX_RETRIES | Auto-retries on transient errors (rate limits, 5xx, network) | 2 | | BRIDGE_DEBUG | Enable debug logging to stderr | — | | BRIDGE_DEPTH | Current recursion depth (set automatically) | 0 |

Anti-Recursion Guard

The bridge automatically prevents infinite loops. If Claude calls Codex which tries to call Claude again, the second call is blocked (BRIDGE_DEPTH >= 2).

Development

git clone https://github.com/Dunqing/claude-codex-bridge.git
cd claude-codex-bridge
pnpm install

pnpm build         # Compile to dist/
pnpm test          # Run tests
pnpm lint          # Lint and type check

# Dev mode (no build needed)
pnpm dev:codex-server
pnpm dev:claude-server

License

MIT