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.
npx agentmods add instructions/x51xxx/codex-mcp-tool/agents-mdgit clone --depth 1 https://github.com/x51xxx/codex-mcp-toolWrote 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.
[](https://agentmods.dev/instructions/x51xxx/codex-mcp-tool/agents-md)<a href="https://agentmods.dev/instructions/x51xxx/codex-mcp-tool/agents-md"><img src="https://agentmods.dev/badge/instructions/x51xxx/codex-mcp-tool/agents-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00661 | $0.00661 |
| Opus 5 | $0.00331 | $0.00331 |
| Sonnet 5 | $0.00132 | $0.00132 |
| Haiku 4.5 | $0.00066 | $0.00066 |
Grade A, and why
codex-mcp-tool AGENTS.md scanned grade A with 0 findings 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 6d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repository Guidelines
Project Structure
src/index.ts— MCP server entry (stdio transport, tool dispatch, 25s keepalive)src/constants.ts— CLI flags, models, sandbox modes,ToolArgumentsinterfacesrc/tools/— MCP tools (*.tool.ts), registered viatoolRegistry.push()inindex.tssrc/utils/— CLI execution, version detection, session storage, output parsingdist/— compiled output (tsc)docs/— VitePress documentation site
Build & Development
| Command | Description |
|---|---|
npm run build |
Compile TypeScript to dist/ |
npm run lint |
Type-check (tsc --noEmit) |
npm run dev |
Build + run once |
npm start |
Run compiled server |
npm run docs:dev |
VitePress dev server |
Requirements: Node >=18, codex CLI installed and authenticated.
Coding Style
- TypeScript ESM — use
.jsextensions in imports - 2-space indent, single quotes, kebab-case filenames
- Tools:
*.tool.ts— exportUnifiedToolwith zod schema - Use
cross-spawn(not nativespawn) for Windows compatibility
Architecture Notes
Request Flow
- MCP client →
index.tsdispatches to tool - Tool validates args (zod) → passes to executor
CodexCommandBuilder.build()constructs CLI argsexecuteCodex()spawnscodex exec ...viacross-spawn- Output parsed → formatted → returned as MCP response
CodexCommandBuilder Gotchas
--oss/--local-providermust come afterexecsubcommandexec resumedoesn't support--oss; use-c model_provider=<provider>instead- OSS mode: model name passed as-is (skip OpenAI model validation)
search,oss,localProviderauto-set--sandbox workspace-write
Tools (13 registered)
ask-codex, batch-codex, review-changes, do-act, brainstorm, fetch-chunk, list-sessions, list-skills, health, ping, help, version, timeout-test
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.
- 6d ago First seen · 67 lines · 661 tokens per session scan A 62eb938f4d9e
codex-mcp-tool AGENTS.md is an instructions file published in the GitHub repository x51xxx/codex-mcp-tool (24 stars, last pushed 1mo ago), licensed MIT. It adds 661 tokens to every session, about $0.0033 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
gortex CLAUDE.md
Claude Code instructions for zzet/gortex, covering gortex, build & test, codebase overview, discovery (read once, then keep using) and llm provider (powers ask and searchsymbols assist: modes).
ChatCrystal AGENTS.md
AGENTS.md instructions for ZengLiangYi/ChatCrystal, covering agents.md, project overview, commands, development (server port 3721 + client port 13721) and build for production.
agent-toolkit AGENTS.md
AGENTS.md instructions for ulises-jeremias/agent-toolkit, covering agents.md — ai agent contract, what this toolkit does, repository structure, operating rules and how to add a skill.
core-ai CLAUDE.md
Claude Code instructions for helius-labs/core-ai, covering core ai, compiler-managed sync, mcp server pin, skill versioning and router surface maintenance.
core-ai AGENTS.md
AGENTS.md instructions for helius-labs/core-ai, covering core ai — agent instructions, repository overview, mcp server setup, api key setup and public tool surface.
cursor-studio copilot-instructions.md
Copilot instructions for DearLicy/cursor-studio, a project described as: Local-first Windows control center for Cursor: manage AI providers, balances, usage and costs, sessions, prompts, MCP, Skills, appearance, and integrations. | Cursor 本地桌面管理工具.