agent-bridge
An MCP server that lets Claude Code and Codex delegate tasks to each other via the Agent Client Protocol.
README
agent-delegate-bridge
An MCP server that lets Claude Code and Codex delegate tasks to each other.
Claude Code (or Codex, or any MCP-capable desktop tool) registers this server
and calls the delegate tool. Claude tasks run through claude -p (which
reads the provider proxy env from the cc-switch host-creds file, so it works
from any caller); Codex tasks run through the Agent Client Protocol (ACP).
[Claude Code] --MCP(stdio)--> [agent-delegate-bridge] --claude -p-----> [Claude Code CLI]
[Codex] --MCP(stdio)--> [agent-delegate-bridge] --ACP(stdio)-----> [codex-acp]
Install
npm install -g agent-delegate-bridge
After installing, the agent-delegate-bridge binary is on your PATH.
Register in Claude Code
claude mcp add bridge -- agent-delegate-bridge
Register in Codex
codex mcp add bridge -- agent-delegate-bridge
(For development from source, use node dist/index.js instead of agent-delegate-bridge.)
Usage
The delegate tool takes:
target:"codex"or"claude"— which agent to delegate totask: the prompt for the target agentcwd(optional): working directory
Example prompt to Claude Code:
Use the
delegatetool with target "codex" to ask Codex to write a unit test forsrc/util.ts.
Requirements
- Node.js 22+
- Codex CLI (for delegating to Codex)
- Claude Code (for delegating to Claude)
- The ACP adapters are fetched automatically via
npx.
Troubleshooting
Codex delegation fails
- Ensure you are logged into Codex (
codexCLI works and ~/.codex/auth.json exists). - If
codex-acpfails with authentication errors, runcodex login(or re-authenticate) to refresh your session. - The first
npxrun downloads the@agentclientprotocol/codex-acppackage — this may take 30-60 seconds. - If delegation fails with a network error, run
codex doctor. If it reports provider endpoints as unreachable, your machine cannot access the ChatGPT API (you may need a proxy/VPN) — this is not a bridge issue. - If delegation fails with "You've hit your usage limit", your ChatGPT/Codex account has run out of credits — wait for the quota reset or upgrade. This is an account-level limit, not a bridge issue.
Claude delegation fails
- Ensure Claude Code is installed and
claudeis on your PATH. - If your Claude is behind a cc-switch proxy, make sure cc-switch is running — the bridge reads the proxy env (ANTHROPIC_BASE_URL, token) from the cc-switch host-creds file so delegation works from any caller.
- If the proxy env can't be found, delegation falls back to
claude's own claude.ai login (OAuth must be valid).
Delegation times out
The default timeout is 120 seconds. If the agent takes longer (e.g., complex tasks or slow network), the call will fail with a timeout error. For longer tasks, increase the timeout via the delegateTo function's timeoutMs parameter.
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。