Skip to main content
Glama

# claude-agent-bridge

MCP bridge for using local Claude CLI as a bounded reviewer and analysis delegate for Codex.

Goals

  • Let Codex delegate small, bounded tasks to Claude.

  • Keep Codex responsible for final decisions, file edits, commits, deploys, and verification.

  • Redact sensitive-looking lines before sending context.

  • Save Claude outputs for audit and follow-up review.

  • Avoid mixing bridge infrastructure experiments into work repos.

Related MCP server: codex-in-claude

Tools

  • claude_status: check delegation state.

  • claude_set_enabled: enable or disable delegation.

  • claude_ask: ask Claude for bounded analysis with optional files.

  • claude_review_diff: ask Claude to review current git diff or selected paths.

  • claude_read_result: read saved Claude output.

claude_status also reports whether the local claude executable can be found and queried for its version. Delegation runs Claude Code in non-interactive print mode (claude -p) so Codex can capture stdout, but it now injects the claude-reviewer custom agent with --agents and selects it with --agent. Use --no-agent only for troubleshooting.

Install Into Any Repo

Codex CLI Plugin Install

For Codex CLI, add this repository as a marketplace first, then install the plugin from that marketplace:

codex plugin marketplace add https://github.com/pinkpanther7929/claude-agent-bridge
codex plugin add claude-agent-bridge@claude-agent-bridge

codex plugin add claude-agent-bridge@https://github.com/... does not work because plugin add expects plugin@marketplace-name, not a Git URL.

The repository root is a marketplace. The plugin package lives under plugins/claude-agent-bridge.

After install, open a new Codex session. The plugin manifest contributes the Claude MCP server automatically; no separate setup script is required for normal plugin use.

Update later with:

codex plugin marketplace upgrade
codex plugin add claude-agent-bridge@claude-agent-bridge

Or from a local clone:

.\scripts\update-codex.ps1

Start a new Codex session after updating so changed MCP tools and skills are loaded.

Codex Config Fallback

Use this only when you want to register the MCP server directly in ~/.codex/config.toml without using the plugin system:

git clone https://github.com/pinkpanther7929/claude-agent-bridge D:\claude-agent-bridge
cd D:\claude-agent-bridge
.\scripts\install-codex.ps1

Restart Codex after registration. Codex will start the MCP server automatically.

VS Code UI

For VS Code Agent Plugin source install, point the UI at the plugin package folder:

  1. Open the Command Palette.

  2. Run Chat: Install Plugin From Source.

  3. Enter or select plugins/claude-agent-bridge from a local clone.

  4. Open a new chat/workspace session after the plugin installs.

The plugin contributes the claude_delegate MCP server and starts it with the current workspace as the default working directory.

For one-off local setup without installing a plugin, use the Command Palette flow MCP: Add Server, choose a stdio server, and point it at:

python -X utf8 <path-to-this-repo>/mcp/claude_mcp_server.py

Scripted Setup

Clone this bridge once, then install it into any repo/workspace with one command:

git clone https://github.com/pinkpanther7929/claude-agent-bridge D:\claude-agent-bridge
python D:\claude-agent-bridge\scripts\install_mcp_config.py D:\your-repo
git clone https://github.com/pinkpanther7929/claude-agent-bridge ~/claude-agent-bridge
python ~/claude-agent-bridge/scripts/install_mcp_config.py ~/your-repo

The installer creates or updates <your-repo>/.mcp.json and preserves existing MCP servers. If claude_delegate already exists with different settings, pass --force to replace only that server entry. The file is written as UTF-8 without a BOM so JSON parsers can read it reliably.

Open a new Codex session from D:\your-repo after installing. The Claude tools will use that repo as their default workspace, including diff review and saved outputs under .tmp/claude_delegate.

Dry-run and JSON output are available for automation:

python D:\claude-agent-bridge\scripts\install_mcp_config.py D:\your-repo --dry-run --json

Local Checks

python -m py_compile scripts\claude_delegate.py scripts\install_mcp_config.py mcp\claude_mcp_server.py
python -X utf8 -m json.tool .agents\plugins\marketplace.json
python -X utf8 -m json.tool plugins\claude-agent-bridge\.mcp.json
powershell.exe -NoProfile -File scripts\install-codex.ps1 -ConfigPath .tmp\codex-test.toml
python -m unittest discover -s tests
python scripts\claude_delegate.py status --json
python scripts\claude_delegate.py --prompt "Build prompt only." --dry-run --json

Plugin manifest validation uses the Codex plugin creator validator, which requires PyYAML in the active Python environment.

Actual Claude delegation may need to run outside the managed Codex sandbox:

python scripts\claude_delegate.py --task second-opinion --prompt "Reply with exactly: OK" --timeout-seconds 30 --json

Safety Rules

  • Do not send secrets, tokens, webhooks, passwords, API keys, or tickets.

  • Do not ask Claude to edit files, run live operations, commit, push, or deploy.

  • Pass only the smallest useful diff, file excerpt, or log excerpt.

  • Treat Claude output as review input, not authority.

Available Tools

5 tools
claude_askC

Ask Claude for bounded read-only analysis using an optional file list.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
taskNosecond-opinion
agentNoclaude-reviewer
filesNo
promptYes
no_agentNo
max_file_charsNo
timeout_secondsNo

TDQS

C2.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose two real traits: the operation is read-only and 'bounded' (echoing the max_file_chars/timeout params). It says nothing about the agent subprocess implied by 'agent'/'no_agent', whether the call blocks, or how results relate to claude_read_result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, which is structurally sound. However, the brevity here reads as under-specification rather than disciplined conciseness given the tool's 8-parameter surface.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no annotations and no output schema, the description is not complete enough to invoke correctly. It omits agent selection, task modes, timeout/char limits, and result retrieval, leaving the agent to guess at behavior beyond the read-only claim.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 8 parameters, so the description must compensate and does not. It explains only the 'files' argument ('optional file list') and vaguely gestures at bounds; cwd, task's review/analyze/second-opinion enum, agent, no_agent, max_file_chars and timeout_seconds are all undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a clear verb-resource pair ('ask Claude for ... analysis') and qualifies scope with 'bounded read-only', which separates it from mutation-style siblings. It stops short of contrasting itself with claude_review_diff or claude_read_result, so sibling differentiation is only implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this over claude_review_diff or claude_read_result, and no exclusions. The only usage cue is 'using an optional file list', which does not tell an agent which conditions select this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

claude_read_resultC

Read a Claude delegation output file, or the latest output when no path is provided.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
pathNo
max_charsNo
output_rootNo.tmp/claude_delegate

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it only discloses one trait: the fallback to the latest output when path is omitted. It says nothing about truncation (despite a max_chars cap), what happens when no output exists, or any permission/error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler or repetition. It is tight and readable, though its brevity borders on under-specification given four parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 4-parameter tool with no annotations, no output schema, and 0% schema descriptions is covered by only one sentence. Critical context, notably the meaning of max_chars/output_root and the fallback semantics, is missing for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and there are 4 parameters, so the description must compensate but does not. Path is only loosely referenced ('no path is provided'), while cwd, max_chars (with its truncation/limit semantics), and output_root are entirely unexplained in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a clear verb+resource (read a Claude delegation output file) and adds the useful default case of returning the latest output when no path is given. It differentiates adequately from 'ask'/'review_diff' by implication, but never names or contrasts a sibling explicitly, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the use case (retrieving delegated Claude output) and discloses the no-path fallback, which is a form of usage guidance. However, it never says when to prefer this over claude_status or claude_ask, so guidance remains inferred rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

claude_review_diffC

Ask Claude to review the current git diff or selected diff paths.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
agentNoclaude-reviewer
promptYes
no_agentNo
diff_pathsNo
max_diff_charsNo
timeout_secondsNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and largely fails: it says nothing about whether a subagent is spawned, whether the call blocks for up to timeout_seconds, cost/latency, what no_agent changes, or how results are surfaced (presumably via claude_read_result). 'Ask Claude to review' omits all operational context for a 7-parameter tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single clean, front-loaded sentence with no wasted words, but for a 7-parameter tool with defaults and truncation limits, this level of brevity reads as under-specification rather than tightness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A complex invocation (agent selection, diff scoping, character cap, timeout) with no annotations and no output schema, yet the description covers only the top-level intent. An agent cannot confidently set the optional parameters or predict the outcome.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters, so the description must compensate and mostly doesn't. It hints at 'selected diff paths' for diff_paths, but cwd, agent, no_agent, max_diff_chars, timeout_seconds, and even the required prompt are unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('review') and resource ('current git diff or selected diff paths'), which is distinguishable from generic siblings like claude_ask. It doesn't explicitly name or contrast with siblings, but the diff-scoped framing is clear enough to route selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus claude_ask or claude_read_result, no prerequisites, and no mention of agent configuration or result retrieval. The diff context implies usage but nothing is stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

claude_set_enabledC

Enable or disable bounded Claude delegation.

ParametersJSON Schema
NameRequiredDescriptionDefault
enabledYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavior traits. It doesn't say whether toggling requires authentication, what 'bounded' means, what effect enabling/disabling has, or how the change is confirmed. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence, front-loaded and with no wasted words. However, it is under-specified rather than optimally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, 0% schema coverage, and a mutation operation, the description is incomplete. It should clarify 'bounded', permissions, and effects, but does none of that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single parameter is undocumented in the schema. The description only implies the boolean nature via 'enable or disable', but adds no meaning like default state, idempotency, or side effects.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action (enable or disable) on a specific configuration (bounded Claude delegation), which is clearer than a tautology. It distinguishes from siblings enough, though 'bounded' is unexplained.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like claude_status or claude_ask is given. There are no conditions, prerequisites, or exclusions mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

claude_statusB

Check whether Claude delegation is enabled and reachable.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose the two things checked (enabled state and reachability), implying a non-mutating probe. However, it doesn't say what the result looks like, whether it can fail/succeed independently on each dimension, or whether it has side effects, leaving real behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler. The condition being tested is stated immediately and nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a trivial zero-param probe this is nearly sufficient, but with no output schema the description should describe the return shape (e.g., a boolean or an enabled/reachable status pair). Without that, an agent can't anticipate what a "not reachable" result looks like.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters and the schema is empty, so there is nothing for the description to clarify. Baseline 4 applies since no parameter semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ("Check") and the exact conditions tested ("whether Claude delegation is enabled and reachable"), which is more precise than a bare "get status". It doesn't explicitly name how it differs from siblings like claude_set_enabled or claude_read_result, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this versus alternatives — no guidance such as "call before claude_ask to verify delegation is available," and no mention of the sibling tools. The only cue is the tool name itself, which is weak routing information for an agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedclaude_ask
    • First observedclaude_read_result
    • First observedclaude_review_diff
    • First observedclaude_set_enabled
    • First observedclaude_status

TDQS

B3.3/5.0

Scored across 5 tools

Disambiguation4/5

Most tools have clearly distinct purposes: status, enable/disable, read result, and review diff are unambiguous. claude_ask and claude_review_diff both invoke Claude for analysis, so an agent could occasionally confuse the general ask path with the specialized diff-review path.

Naming Consistency5/5

All tools use the same claude_ prefix and snake_case convention, with predictable verb or verb_noun forms. The pattern is consistent throughout the set.

Tool Count5/5

Five tools is well-scoped for a delegation bridge: check status, toggle it, invoke Claude in two modes, and read output. Each tool earns its place without redundancy.

Completeness4/5

The surface covers configuration, status, invocation, diff review, and result retrieval. A minor gap exists around listing or managing multiple output files, though reading the latest output or a specified path largely covers the workflow.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    The self-hosted MCP bridge between Claude Chat and Claude Code.
    46
    AGPL 3.0