harness-bridge
Bridges Claude Code and OpenAI Codex through MCP, allowing cross-harness querying, code review, explanation, and implementation delegation.
README
Harness Bridge
Harness Bridge connects coding-agent harnesses through MCP so one harness can query, review, explain, and delegate implementation work to another.
It currently ships two adapters:
| Calling harness | Connected harness | MCP tools |
|---|---|---|
| Claude Code | OpenAI Codex | codex_* |
| OpenAI Codex | Claude Code | claude_* |
The adapter boundary keeps harness-specific execution, sessions, models, and capabilities separate while preserving a consistent set of task-oriented MCP tools.
Execution contract
[!WARNING] Every Claude-to-Codex call runs Codex without approvals or sandboxing. The exec backend always uses
--dangerously-bypass-approvals-and-sandbox; the app-server backend always usesdangerFullAccess. Thecodex_*MCP tools expose no sandbox argument, so callers cannot change this policy.
Only connect Harness Bridge to projects and harnesses you trust with the permissions of your user account.
Prerequisites
- Claude Code CLI, installed and authenticated
- OpenAI Codex CLI, installed and authenticated
- Node.js 18 or newer
Quick start
Configure both routes and install the bundled skills and Codex teammate agent:
npx harness-bridge setup
Configure one route without installing extras:
npx harness-bridge connect claude --to codex
npx harness-bridge connect codex --to claude
The compatibility forms remain available:
npx harness-bridge setup claude
npx harness-bridge setup codex
npx harness-bridge setup --skip-extras
setup claude means “configure Claude Code as the calling harness”; setup codex configures Codex as the caller.
Manual configuration
Claude Code calls Codex
claude mcp add codex -s user -- npx harness-bridge serve codex
Project-local .mcp.json:
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "npx",
"args": ["harness-bridge", "serve", "codex"]
}
}
}
Codex calls Claude Code
Add this to ~/.codex/config.toml:
[mcp_servers.claude]
command = "npx"
args = ["harness-bridge", "serve", "claude"]
tool_timeout_sec = 600
Tools
Each adapter exposes the same task categories with a harness-specific prefix:
| Task | Codex tool | Claude tool |
|---|---|---|
| General query | codex_query |
claude_query |
| Code review | codex_review_code |
claude_review_code |
| Plan review | codex_review_plan |
claude_review_plan |
| Code explanation | codex_explain_code |
claude_explain_code |
| Performance planning | codex_plan_perf |
claude_plan_perf |
| Implementation | codex_implement |
claude_implement |
All tools accept workingDirectory. Both adapters also accept an optional threadKey for deliberate multi-turn continuity:
- Omit
threadKeyfor independent calls. This is the concurrency-safe default. - Reuse a stable key to continue one conversation.
- Calls sharing a key are serialized; different keys and keyless calls remain independent.
For Codex, omit model unless a specific override is required so the current default from ~/.codex/config.toml applies.
Bundled skills and agent
setup can install:
- a
/codexskill for Claude Code - a
codex-teammateagent for Claude Code - a
/claudeskill for Codex-compatible agent directories
Install them individually with:
npx harness-bridge install skill claude --global
npx harness-bridge install skill codex --global
npx harness-bridge install agent --global
Use --local instead to install into the current project.
Configuration
| Variable | Purpose | Default |
|---|---|---|
HARNESS_BRIDGE_TIMEOUT_MS |
Per-call process timeout | 1800000 |
HARNESS_BRIDGE_MAX_RETRIES |
Retries for transient CLI failures | 2 |
HARNESS_BRIDGE_DEBUG |
Enable debug logging on stderr | unset |
HARNESS_BRIDGE_DEPTH |
Recursion depth propagated to child harnesses | 0 |
HARNESS_BRIDGE_CODEX_MAX_CONCURRENT |
Maximum simultaneous codex exec processes |
4 |
HARNESS_BRIDGE_CODEX_BACKEND |
exec or opt-in app-server |
exec |
The previous BRIDGE_* and CODEX_BRIDGE_* names remain accepted for compatibility. New configuration should use HARNESS_BRIDGE_*.
Codex app-server backend
HARNESS_BRIDGE_CODEX_BACKEND=app-server npx harness-bridge serve codex
The experimental app-server backend keeps one persistent Codex process, supports first-class threads, and can interrupt active turns. It uses the same unrestricted execution policy as the default exec backend.
Migrating from claude-codex-bridge
See MIGRATION.md for the package, command, configuration, and environment-variable changes. MCP server names and tool names are unchanged.
Development
git clone https://github.com/rbutera/harness-bridge.git
cd harness-bridge
pnpm install
pnpm check
pnpm check runs formatting, lint/type checking, all tests, the production build, and package linting.
Origin and license
Harness Bridge began from Dunqing’s claude-codex-bridge v0.3.1. The original Git history and authorship are preserved; ORIGIN.md records the lineage and subsequent divergence.
Licensed under the MIT License.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。