cursor-mcp-bridge CLAUDE.md

cursor-mcp-bridge CLAUDE.md is an instructions file for Claude Code, Codex from JaimeJunr/cursor-mcp-bridge. It costs 5,978 tokens per session, scanned B, original, MIT.

Repository instructions for an MCP server, a program that lets coding-agent tools delegate work to command-line coding agents such as Codex, Grok, and Claude Code.

In plain words
What is it for?
Use them when building, testing, publishing, or changing the server and its tools.
Why use it?
They give contributors the project's commands, module layout, testing expectations, and type-checking rules in one place.

Instructions file for Claude CodeCodex

Written for Claude Code and Codex: PreToolUse hook event, but also runs codex exec. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/jaimejunr/cursor-mcp-bridge/claude-md
Clone the repo
git clone --depth 1 https://github.com/JaimeJunr/cursor-mcp-bridge

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cursor-mcp-bridge CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jaimejunr/cursor-mcp-bridge/claude-md.svg)](https://agentmods.dev/instructions/jaimejunr/cursor-mcp-bridge/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jaimejunr/cursor-mcp-bridge/claude-md"><img src="https://agentmods.dev/badge/instructions/jaimejunr/cursor-mcp-bridge/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,978 This file is loaded in full into every session.
When invoked 5,978 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05978 $0.05978
Opus 5 $0.02989 $0.02989
Sonnet 5 $0.01196 $0.01196
Haiku 4.5 $0.00598 $0.00598

Measured 5d ago against content hash 4df0b4f76ebe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

cursor-mcp-bridge CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

never loads `~/.codex/config.toml` (whose MCP servers hung the CLI, spawning runaway `mcp-server`
CLAUDE.md · 286 lines

How it starts

The opening of the file, as written. The whole thing — 286 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

An MCP server (stdio) that lets any MCP host delegate to headless coding-agent CLIs: Codex, Grok, Claude Code, and an opt-in Cursor fallback. The fleet handles implementation, project mapping, surgical reads, filtered command output, and web lookups without putting the worker's full raw context into the caller. The design goal of every tool is context economy: format() in src/index.ts logs the char count returned to context, because that char count is the real cost being optimized.

Commands

npm run build      # tsc → dist/ (the published/registered artifact is dist/index.js)
npm run dev        # run the server from source via tsx (no build step)
npm test           # vitest run — all unit tests
npx vitest run test/cli.test.ts   # single test file
npx vitest run -t "resolveModel"  # single test by name

There is no linter configured. npm run build (tsc, strict: true) is the type-check gate. prepublishOnly runs the build; only dist/ is published (see files in package.json).

Architecture

Five small modules under src/, with pure logic covered by test/*.test.ts. The split exists so the pure logic is testable without spawning a worker process:

  • index.ts — MCP server + tool registrations (twelve tools: delegate, fast_delegate, explore, read_slice, run_filtered, web_lookup, plan, build, fan_out, generate_image, follow_up, bridge_stats). Owns tool descriptions and the shared routing params (cwd/model/effort). The second arg to new McpServer(...) is an instructions string that states the routing boundary (read/locate/web/grunt-work → bridge tools; native Read only when about to edit). These load at startup and are visible to the host even while tool schemas are deferred — that is why they matter for adoption. The five core tools (delegate, explore, read_slice, run_filtered, web_lookup) register with _meta: { "anthropic/alwaysLoad": true } so Claude Code (≥2.1.121) eagerly loads their schemas; secondary tools (fast_delegate, plan, build, fan_out, generate_image, follow_up, bridge_stats) stay deferred. format() appends the session_id footer and logs usage; follow_up feeds that id back as RunOpts.resume so a prior worker session continues without resending its context — the footer and follow_up are two ends of the same loop. follow_up takes an optional mode — without it, a resumed session regains full tool access, so continuing a read-only session (explore/read_slice/web_lookup) must pass mode:'ask' to stay read-only. The default (no mode) is for continuing a delegate.
  • cli.ts — the only module that touches the child process. runCursor() spawns the engine's CLI; buildCursorArgs()/buildGrokArgs()/buildCodexArgs()/buildClaudeArgs() (+ buildArgs dispatcher), resolveModel(), parseCliJson()/parseCodexJsonl() (+ parseOutput dispatcher), resolveTier(), resolveFastTier(), hasEngine(), binExists(), budgetNote() are pure and unit-tested. Keep the spawn boundary here — do not spawn from elsewhere.
  • agents.ts — resolves an optional delegate/fast_delegate/build persona on the host. A name such as pit:issue-investigator searches project/home .claude/agents and ~/.claude/plugins; plugin collisions pick the newest match by mtime. An inline {prompt} skips lookup. Only the markdown body crosses into the worker, and names containing / or .. are rejected.

Read the full file on GitHub · 286 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 286 lines · 5,978 tokens per session scan B 4df0b4f76ebe

Subscribe to this mod's changes

cursor-mcp-bridge CLAUDE.md is an instructions file published in the GitHub repository JaimeJunr/cursor-mcp-bridge (2 stars, last pushed 9d ago), licensed MIT. It adds 5,978 tokens to every session, about $0.0299 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.