codex-mcp-bridge: Instructions file for Codex

AGENTS.md

codex-mcp-bridge AGENTS.md is an instructions file for Codex, OpenCode from hampsterx/codex-mcp-bridge. It costs 3,746 tokens per session, scanned B, original, MIT.

Repository-specific instructions for codex-mcp-bridge, an open-source server that lets coding tools use the Codex command-line program through the Model Context Protocol.

In plain words
What is it for?
Guiding work on the TypeScript server, its subprocess architecture, prompt templates, code review paths, and exposed code-execution or search tools.
Why use it?
It explains the project’s structure, available tools, and which tool fits each task, reducing incorrect changes in an unfamiliar codebase.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; reads ~/.codex paths; runs codex exec.

This is hampsterx/codex-mcp-bridge's own configuration. It tells Codex and OpenCode how to work on codex-mcp-bridge itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codex-mcp-bridge configures →

Reuse

Borrowing it

Nothing to install: this file belongs to hampsterx/codex-mcp-bridge. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/hampsterx/codex-mcp-bridge/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/hampsterx/codex-mcp-bridge

Made for: Codex, OpenCode.

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 codex-mcp-bridge AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/hampsterx/codex-mcp-bridge/agents-md/github.svg)](https://agentmods.dev/instructions/hampsterx/codex-mcp-bridge/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/hampsterx/codex-mcp-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/hampsterx/codex-mcp-bridge/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codex-mcp-bridge AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/hampsterx/codex-mcp-bridge/agents-md"><img src="https://agentmods.dev/badge/instructions/hampsterx/codex-mcp-bridge/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,746 This file is loaded in full into every session.
When invoked 3,746 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.03746 $0.03746
Opus 5.5 $0.01498 $0.01498
Sonnet 5.5 $0.00749 $0.00749
Haiku 4.5 $0.00375 $0.00375

Measured 17d ago against content hash 0acde7749d9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

codex-mcp-bridge AGENTS.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 17d 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.

Controls which MCP servers from `~/.codex/config.toml`, and from any project
AGENTS.md · 242 lines

How it starts

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

AGENTS.md - codex-mcp-bridge

Guidance for AI coding agents working in the codex-mcp-bridge repository.

This file defines repository-specific operating rules for autonomous or semi-autonomous coding agents. Follow these instructions unless a maintainer explicitly tells you otherwise.

Project Overview

Open source MCP server that wraps Codex CLI as a subprocess, exposing code execution, web search, and structured output as MCP tools. Works with any MCP-compatible client: Claude Code, Gemini CLI, Cursor, Windsurf, VS Code.

  • npm package: codex-mcp-bridge
  • License: MIT
  • Language: TypeScript
  • Framework: @modelcontextprotocol/sdk

Architecture

MCP Client  --stdio-->  codex-mcp-bridge  --spawn-->  codex CLI subprocess

Prompts are assembled in TypeScript and spawned via the CLI. The search and query tools load prompt templates from prompts/*.md via src/utils/prompts.ts and fill placeholders. The codex tool is fully caller-driven: callers pass any prompt and pick the sandbox level. Code review has two paths per ADR-001: the review tool wraps upstream's diff-aware codex exec review --json and carries no prompt of its own, while free-form review is caller-authored through the codex tool with sandbox: "read-only" (see README § Code review with this CLI).

Tools

Tool Purpose Default Timeout
codex Execute prompts with file context, session resume, sandbox control 60s
review Native diff-aware review, prompt-free (see below) 180s
search Web search via codex --search 120s
query Lightweight text analysis (no repo context, no sessions) 60s
structured JSON Schema validated output (Ajv) 60s
ping Health check + CLI capability detection 10s
mcpStatus Per-server MCP boot state via codex app-server 90s/request
listSessions List active Codex conversation sessions 30s

Read the full file on GitHub · 242 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. 17d ago Changed · +20 lines · +303 tokens per session 0acde7749d9e
  2. 2mo ago First seen · 222 lines · 3,443 tokens per session scan B dc9b942ec0e6

Subscribe to this mod's changes

codex-mcp-bridge AGENTS.md is an instructions file published in the GitHub repository hampsterx/codex-mcp-bridge (3 stars, last pushed 18d ago), licensed MIT. It adds 3,746 tokens to every session, about $0.0150 per session on Opus 5.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.

Related

codex-mcp-bridge AGENTS.md compared with instructions from other repositories

codex-mcp-bridge AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codex-mcp-bridge AGENTS.mdhampsterx/codex-mcp-bridgeInstructions file318d agoMITB3,746Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k2d agoMITA4,313Codex, OpenCode