codex-mcp-tool AGENTS.md

codex-mcp-tool AGENTS.md is an instructions file for Codex, OpenCode from x51xxx/codex-mcp-tool. It costs 661 tokens per session, scanned A, original, MIT.

Repository instructions for a TypeScript server that exposes coding-agent tools through MCP, a standard way for programs to call tools.

In plain words
What is it for?
Use them when adding or changing tools, argument validation, server dispatch, command execution, tests, or documentation.
Why use it?
They explain where tools belong, how requests move through the server, and which commands and coding rules to follow.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: runs codex exec, but also the file is AGENTS.md. Also seen: mentions Codex.

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/x51xxx/codex-mcp-tool/agents-md
Clone the repo
git clone --depth 1 https://github.com/x51xxx/codex-mcp-tool

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-tool AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/x51xxx/codex-mcp-tool/agents-md.svg)](https://agentmods.dev/instructions/x51xxx/codex-mcp-tool/agents-md)
Your own site
<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>
Per session 661 This file is loaded in full into every session.
When invoked 661 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00661 $0.00661
Opus 5 $0.00331 $0.00331
Sonnet 5 $0.00132 $0.00132
Haiku 4.5 $0.00066 $0.00066

Measured 6d ago against content hash 62eb938f4d9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

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.

AGENTS.md · 67 lines

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, ToolArguments interface
  • src/tools/ — MCP tools (*.tool.ts), registered via toolRegistry.push() in index.ts
  • src/utils/ — CLI execution, version detection, session storage, output parsing
  • dist/ — 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 .js extensions in imports
  • 2-space indent, single quotes, kebab-case filenames
  • Tools: *.tool.ts — export UnifiedTool with zod schema
  • Use cross-spawn (not native spawn) for Windows compatibility

Architecture Notes

Request Flow

  1. MCP client → index.ts dispatches to tool
  2. Tool validates args (zod) → passes to executor
  3. CodexCommandBuilder.build() constructs CLI args
  4. executeCodex() spawns codex exec ... via cross-spawn
  5. Output parsed → formatted → returned as MCP response

CodexCommandBuilder Gotchas

  • --oss / --local-provider must come after exec subcommand
  • exec resume doesn't support --oss; use -c model_provider=<provider> instead
  • OSS mode: model name passed as-is (skip OpenAI model validation)
  • search, oss, localProvider auto-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

Read the full file on GitHub · 67 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. 6d ago First seen · 67 lines · 661 tokens per session scan A 62eb938f4d9e

Subscribe to this mod's changes

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.

Related

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).

zzet/gortex · 5,172 tokens

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.

ZengLiangYi/ChatCrystal · 2,922 tokens

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.

ulises-jeremias/agent-toolkit · 4,514 tokens

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.

helius-labs/core-ai · 1,334 tokens

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.

helius-labs/core-ai · 2,000 tokens

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 本地桌面管理工具.

DearLicy/cursor-studio · 176 tokens