Skip to main content
Glama

Farhan Agent Bridge

A local Windows stdio MCP plugin for delegating a task through your existing Codex or Claude Code subscription login, then retrieving its result.

Release: 0.2.0 · License: MIT · Runtime: Node.js 20+

This repository publishes the supplied v0.2.0 plugin. It is not a copy of the separately installed v0.3.0 bridge. Google/Antigravity support is not included. This is an independent community project, not an official provider integration.

What it does

  • Checks installed CLI compatibility and subscription authentication.

  • Runs one local background task at a time across bridge processes.

  • Provides separate submit/result tools for Codex and Claude.

  • Saves prompts, results and reported usage in a local runtime directory.

  • Allows optional public Claude web search/fetch with allow_web: true.

A separate authentication directory does not mean a separate account. Provider allowances remain separate; the bridge neither pools them nor provides unlimited usage. CLI cost estimates are not evidence of an additional subscription charge.

Related MCP server: codex-claude-bridge

Requirements

  • Windows and Node.js 20 or newer. Repository checks were run on Node.js 24.19.0.

  • An MCP client that supports local stdio servers, or the included plugin manifests.

  • The official Codex npm CLI and/or official Claude Code, separately installed and signed in through the subscription account you intend to use.

  • Compatible CLI flags. The bridge probes Codex exec --ignore-user-config and Claude's safe-mode/tool-configuration support. An incompatible CLI is rejected.

This project does not bundle provider CLIs, credentials or dependencies. Provider account terms and usage limits still apply.

Installation

Clone/download the repository. Point a local stdio MCP client at:

{
  "mcpServers": {
    "farhan-agent-bridge": {
      "command": "node",
      "args": ["C:/path/to/farhan-agent-bridge/server/bridge.mjs"]
    }
  }
}

The included .mcp.json, mcp.json, plugin.json and .codex-plugin/plugin.json are packaging variants using ${PLUGIN_ROOT}. Import the variant supported by your client; repository tests do not establish compatibility with every client.

Authentication and local storage

By default the runtime directory is %USERPROFILE%/.farhan-agent-bridge:

Directory

Purpose

codex-home

Dedicated Codex sign-in/configuration

claude-home

Dedicated Claude Code sign-in/configuration

workspace

Worker working directory

jobs

Plaintext task prompts, results and usage

FARHAN_BRIDGE_DATA can select another runtime directory. Keep it outside the repository. Do not upload it or place authentication state in an issue.

Use the official CLI login flows with CODEX_HOME or CLAUDE_CONFIG_DIR set to the appropriate dedicated directory. For Claude, use the Claude subscription login rather than API/Console authentication. The bridge does not log in for you, accept account terms, or copy browser credentials.

Claude runtime discovery in this release looks for runtimes/claude/claude.exe inside the runtime directory, then %USERPROFILE%/.local/bin/claude.exe. Codex discovery looks for its npm entrypoint in the usual Windows npm directory and PATH-related npm locations. This is Windows-oriented discovery, not a general cross-platform installer.

Tools

Tool

Purpose

bridge_status

Check compatibility and subscription sign-in; no inference

submit_codex_task

Submit authorized text to Codex

get_codex_task

Retrieve status, answer and usage

submit_claude_task

Submit text; public web access is opt-in

get_claude_task

Retrieve status, answer and usage

Call bridge_status, submit one authorized task and poll the returned task ID until completed or failed. Queued/running is not completion. A task prompt may contain at most 50,000 characters. Workers time out after 20 minutes; Claude also has a 12-turn cap. The Windows computer must stay awake and online.

For a minimal live check, ask the chosen provider to reply with a fixed test string, with no tools. Such a live check consumes provider allowance; it is not part of npm test.

Boundaries

Codex runs in a read-only shell sandbox with ordinary user configuration ignored. Read-only does not guarantee unrelated files are unreadable. Claude receives supplied text, no shell/local-file/MCP tools, and optional public WebSearch/WebFetch. Neither worker inherits an authenticated browser through this bridge.

Several API-key and provider-override environment variables are removed. There is no configured paid API fallback, provider fallback or purchase flow. This is not a comprehensive security audit or a guarantee about future CLI behavior. Keep paid extra usage disabled in the official account and inspect usage settings. Remaining Claude allowance and its billing switch are not exposed by auth status. Administrator-managed policies may still apply.

Share only authorized context. In particular, do not send a private CV, mailbox, ledger or personal export to an employer-managed provider account. Review worker findings before applications, messages, publication or other consequential actions.

See SECURITY.md.

Development and verification

No npm dependencies are required:

npm run check
npm test

The included tests check manifest version consistency, stdio initialization, tool discovery, ping, invalid task IDs, empty/oversized prompts and unsupported methods, using a temporary data directory. They make no provider inference calls.

These checks passed for this repository preparation. Live inference, authentication, provider billing behavior, concurrency and full worker lifecycle are not covered by the included tests. Earlier local setup claims are not presented as a portable release test suite.

License

MIT, copyright 2026 Farhan Shaikh.

Available Tools

5 tools
bridge_statusA
Read-only

Check local Codex and Claude subscription authentication. Returns Claude account and subscription type from official auth status. No inference call. Does not return remaining Claude allowance.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark this as read-only, and the description adds useful behavioral boundaries: it uses the official auth status, makes no inference call, and does not return remaining Claude allowance. It does not describe permissions or failure modes, but the added caveats are meaningful.

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?

Three tight sentences front-load the core purpose, then immediately add the most important behavioral limits. There is no redundant or filler content.

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 no-parameter, no-output-schema status tool, the description explains the Claude return value and rules out remaining allowance. However, it does not fully clarify what the tool returns for Codex authentication even though Codex is named in the primary check.

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 has zero parameters, so there is no parameter semantics to explain. The baseline score for a parameterless tool is appropriate, and the description does not need to invent parameter guidance.

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

Purpose5/5

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

The description gives a specific verb and resource: check local Codex and Claude subscription authentication. It also distinguishes itself from inference/task operations by stating 'No inference call', helping an agent separate it from the sibling task tools.

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

Usage Guidelines4/5

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

The description makes clear this is for authentication/status checking rather than task submission or inference. It also sets two exclusions, no inference call and no remaining Claude allowance, though it does not explicitly name which sibling to use for other operations.

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

get_claude_taskA
Read-only

Retrieve a Claude task status, final answer and usage. Cached input, cache creation and ordinary input are separate provider fields. A list-price estimate is not an actual subscription charge. Queued/running is not completion.

NameRequiredDescriptionDefault
task_idYes

TDQS

A3.6/5.0
Behavior4/5

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

The readOnlyHint annotation already covers the safety profile, and the description adds genuinely non-obvious interpretation context: that cache/input token fields are separate provider fields and that a list-price estimate is not an actual subscription charge. These caveats prevent misreading of returned usage data, though nothing is said about behavior for unknown or expired task ids.

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?

Four short sentences with no filler; the core purpose is front-loaded and each following sentence adds a distinct caveat. Phrasing is slightly telegraphic but every sentence carries information.

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?

With no output schema, the description does some of the work by characterizing the return (status, answer, usage) and warning about field semantics. It still omits the terminal-state list, how to obtain a valid task_id, and error behavior, which matter for a polling tool.

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

Parameters3/5

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

There is one parameter, task_id, with 0% schema description coverage, and the description says nothing about its expected format or provenance. The parameter is self-evident by name, but the description does not compensate for the missing schema documentation.

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 ('Retrieve') and resource ('a Claude task') plus exactly what is returned: status, final answer and usage. The 'Claude' qualifier implicitly separates it from the sibling get_codex_task, though the description never names that sibling explicitly.

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 line 'Queued/running is not completion' implies this should be polled until terminal state, which is useful implied usage. However, there is no explicit guidance on when to call this versus get_codex_task or bridge_status, and no note on where the task_id comes from (presumably submit_claude_task).

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

get_codex_taskA
Read-only

Retrieve status, final answer and provider-reported token usage for a previously submitted task. Do not treat queued/running as completed.

NameRequiredDescriptionDefault
task_idYes

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the description usefully spends its words on return contents and the non-obvious caveat that queued/running must not be treated as completed. That is genuine behavioral context beyond the annotations, though nothing is said about retention or error responses.

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?

Two tight sentences with the core action and return payload up front, followed by the critical interpretation caveat. No wasted text.

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

Completeness4/5

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

For a single-parameter read tool with no output schema, the description enumerates what comes back and warns about in-progress states, which is most of what an agent needs. The task_id provenance is the one remaining gap.

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

Parameters3/5

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

Schema coverage is 0% and the single task_id parameter is undocumented in the schema. The phrase 'previously submitted task' weakly links task_id to the submit tools, but the description does not state the ID's origin or format.

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?

Specific verb 'Retrieve' plus the concrete resources returned (status, final answer, token usage) for a 'previously submitted task'. The Codex scope is only conveyed by the tool name, not the description text, so the split from get_claude_task is implicit rather than stated.

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?

'For a previously submitted task' implies the polling/precondition context and the warning about queued/running states steers result interpretation. However it never says when to choose this over get_claude_task or how often to poll.

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

submit_claude_taskA

Delegate a user-authorized text-analysis task through official Claude Code subscription login. Optional public web research with allow_web=true. No shell, local-file, MCP, messaging or publishing tools. Uses Sonnet and checks subscription auth before each task. One shared active task, 20-minute timeout, polling required. First test: Reply exactly CLAUDE_BRIDGE_TEST_OK. Never infer allowance from token counts; no API fallback is configured.

NameRequiredDescriptionDefault
taskYes
allow_webNo

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say it is not read-only, not idempotent, not destructive): no shell/local-file/MCP/messaging/publishing capability, subscription auth checked before every task, model pinned to Sonnet, single shared active task, 20-minute timeout, no API fallback, and a warning not to infer allowance from token counts. This is exactly the operational context an agent needs before invoking.

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?

Dense and front-loaded, with the capability boundary and constraints stated early and no filler. The telegraphic sentence fragments ('No shell, local-file, MCP, messaging or publishing tools.') cost a little readability but each clause carries distinct information.

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

Completeness4/5

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

No output schema exists, and the description covers the operational essentials: async execution, timeout, polling, auth, one-task concurrency, and the no-fallback limitation. It does not say what the submission returns (e.g., a task identifier to use with get_claude_task), which is the one remaining gap.

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?

Schema description coverage is 0%, so the description carries the burden and does explain both parameters: task is a text-analysis payload (with the test string as an example) and allow_web enables optional public web research. It omits the task 1–50,000 character limits and the allow_web=false default, which remain schema-only.

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

Purpose5/5

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

States a specific verb ('Delegate') and resource ('a user-authorized text-analysis task') plus the execution channel ('official Claude Code subscription login', 'Uses Sonnet'). The Claude/Codex split is self-evident against sibling submit_codex_task, so an agent can pick the right submit tool without opening either schema.

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

Usage Guidelines4/5

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

Gives concrete usage conditions: allow_web=true for public web research, polling required after submission, one shared active task at a time, and a prescribed first test ('Reply exactly CLAUDE_BRIDGE_TEST_OK'). It stops short of explicitly naming get_claude_task as the polling companion, leaving that inference to the agent.

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

submit_codex_taskA

Delegate one user-authorized task to the locally signed-in Codex account using gpt-6.1-sol. Consumes that account allowance. Runs asynchronously in read-only mode with inherited user config disabled. No credentials or full ChatGPT memory are transferred; supply only relevant task context. First test: Reply exactly BRIDGE_TEST_OK without tools. The Windows computer must stay awake. Does not provide bulk scraping, Claude or Google access.

NameRequiredDescriptionDefault
taskYes

TDQS

A4.1/5.0
Behavior4/5

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

Rich disclosure beyond the annotations: it consumes a specific account's allowance, runs asynchronously, disables inherited user config, transfers no credentials or full memory, and requires the Windows host to remain awake. The 'read-only mode' phrase describes the delegated run rather than the tool itself, so it does not squarely contradict readOnlyHint=false, but the ambiguity is worth noting.

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?

Dense but efficient: the core action and its constraints are front-loaded, and each subsequent sentence adds a distinct operational fact (cost, async, isolation, host requirement, exclusions). No filler.

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 an async submission tool with no output schema, the description should say what comes back and how to retrieve the result; it never mentions get_codex_task or any task identifier. It covers the important preconditions well, but the post-call workflow is left to inference from sibling names.

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

Parameters3/5

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

The single 'task' parameter has 0% schema description coverage, so the description must compensate; it does partially by advising 'supply only relevant task context' and giving a concrete example task string (BRIDGE_TEST_OK). It says nothing about the 50,000-character limit, expected formatting, or how self-contained the task text must be.

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

Purpose5/5

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

States a specific verb (delegate/submit) and resource (a task to the locally signed-in Codex account) plus the exact model, gpt-6.1-sol. It also carves out scope against siblings by excluding Claude and Google access, so an agent can separate it from submit_claude_task.

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

Usage Guidelines4/5

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

Gives clear usage context: one task per call, only relevant context should be supplied, the host must stay awake, and it explicitly excludes bulk scraping and Claude/Google access. It does not, however, explicitly route to siblings such as get_codex_task for retrieval or submit_claude_task for Claude work.

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.2.0
    • First observedbridge_status
    • First observedget_claude_task
    • First observedget_codex_task
    • First observedsubmit_claude_task
    • First observedsubmit_codex_task

TDQS

A4.1/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct role: bridge authentication status, task submission, and task retrieval. The Codex and Claude variants are explicitly provider-scoped, so an agent can select the correct tool without ambiguity.

Naming Consistency4/5

The task tools follow a consistent verb_provider_task pattern: submit_codex_task, get_codex_task, submit_claude_task, get_claude_task. bridge_status is a minor deviation because it omits the verb-style prefix, but the overall convention remains readable and predictable.

Tool Count5/5

Five tools are well matched to a two-provider bridge: one shared status check plus submit/get pairs for Codex and Claude. Each tool has a clear purpose and there is no excessive surface area.

Completeness4/5

The surface covers the core lifecycle: checking authentication, submitting tasks, and retrieving status, answers, and usage for both providers. Missing cancellation or task-listing operations are minor gaps that do not block the primary bridge workflow.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers