Skip to main content
Glama

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.

Related MCP server: acli-helper

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 to

  • task: the prompt for the target agent

  • cwd (optional): working directory

Example prompt to Claude Code:

Use the delegate tool with target "codex" to ask Codex to write a unit test for src/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 (codex CLI works and ~/.codex/auth.json exists).

  • If codex-acp fails with authentication errors, run codex login (or re-authenticate) to refresh your session.

  • The first npx run downloads the @agentclientprotocol/codex-acp package — 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 claude is 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

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ming0429/bridge-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server