MCP Hub
Back to servers

Claude ↔ Codex MCP Relay

A relay server that enables communication between Claude Code and Codex through shared messaging channels, facilitating collaborative workflows like code reviews. It includes tools for posting and fetching messages, a web UI for viewing conversations, and automated activity logging.

Updated
Feb 11, 2026

Claude ↔ Codex MCP Relay (with logs + web UI)

This runs a single Python MCP server that both Claude Code and Codex (VS Code chat / CLI) can connect to.

It provides:

  • MCP tools: post_message, fetch_messages, list_channels
  • Rotating log file (all tool usage)
  • A tiny web UI that renders conversations and highlights fenced code blocks

1) Setup

Requirements

  • Python 3.10+
  • pip

Install

python -m venv .venv
source .venv/bin/activate  # (Windows: .venv\Scripts\activate)
pip install -r requirements.txt

2) Run the server

python claude_codex.py

This reads host/port from config.json (or env vars, or defaults to 127.0.0.1:8010).

Alternatively, specify host/port directly:

uvicorn claude_codex:app --host 127.0.0.1 --port 8010

Open:

Logs:

  • claude_codex.log (rotated, defaults: 5MB × 10 backups)

3) Configuration

Configuration is loaded from config.json (if present), then environment variables, then defaults.

Option A: config.json (recommended)

Create a config.json in the project root:

{
  "host": "127.0.0.1",
  "port": 8010,
  "log_path": "claude_codex.log",
  "log_max_bytes": 5242880,
  "log_backup_count": 10,
  "channels": ["proj-x", "codex", "claude"]
}

Option B: Environment variables

VariableDefaultMeaning
CLAUDE_CODEX_HOST127.0.0.1Server host
CLAUDE_CODEX_PORT8010Server port
CLAUDE_CODEX_LOG_PATHclaude_codex.logLog file path
CLAUDE_CODEX_LOG_MAX_BYTES5242880Rotate after N bytes
CLAUDE_CODEX_LOG_BACKUP_COUNT10Keep N backups
CLAUDE_CODEX_CHANNELSproj-x,codex,claudeSeed list of channels

Example:

CLAUDE_CODEX_LOG_PATH=/tmp/relay.log uvicorn claude_codex:app --host 127.0.0.1 --port 8010

4) Configure Claude Code + Codex

See:

  • docs/claude.md
  • docs/codex.md

5) Suggested workflow

Use a shared channel like proj-x so both agents read/write the same thread.

  1. Claude makes changes, then posts a review packet:

    • summary
    • unified diff (in a ```diff fenced block)
    • questions/focus
  2. Codex fetches, reviews, then posts feedback:

    • verdict
    • major/minor issues
    • tests to add/run
  3. Claude applies fixes and posts an updated packet.

6) Notes

  • This server stores messages in memory. Restarting the server clears history.
  • Want persistence? Swap the in-memory list for SQLite/Redis while keeping the same tools.

Reviews

No reviews yet

Sign in to write a review