codex-mcp: Instructions file for Codex

AGENTS.md

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

A repository guide for a local coding system built around ChatGPT, with a controller, a message-protocol runtime, project sessions, authentication, and a Vue web console. It defines the execution order, security boundaries, and lifecycle rules for starting and stopping components.

In plain words
What is it for?
Use it before changing the controller, command-line tool, web console, runtime, authentication, tunnels, or persistent project state.
Why use it?
It prevents an agent from guessing how the system works, duplicating business logic, or weakening protections such as request forgery and path-isolation checks.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex.

This is meesii/codex-mcp's own configuration. It tells Codex and OpenCode how to work on codex-mcp 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 configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/lkw/workspace/桔道商城/jdny-shop-admin.

Reuse

Borrowing it

Nothing to install: this file belongs to meesii/codex-mcp. 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/meesii/codex-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/meesii/codex-mcp

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/meesii/codex-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/meesii/codex-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/meesii/codex-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/meesii/codex-mcp/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 AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/meesii/codex-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/meesii/codex-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,201 This file is loaded in full into every session.
When invoked 2,201 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02201 $0.02201
Opus 5 $0.01100 $0.01100
Sonnet 5 $0.00440 $0.00440
Haiku 4.5 $0.00220 $0.00220

Measured today against content hash f4b19f221a2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-16, from the pricing page.

Security

Grade A, and why

codex-mcp 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 today.

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 · 97 lines

How it starts

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

AGENTS.md

项目身份

  • 本仓库是面向 ChatGPT 的本机 coding MCP,核心由本机 Controller、MCP Runtime、项目注册/会话绑定、OAuth/公网入口和 Web Console 组成。
  • Web Console 是本机控制面,不是独立 SaaS:主要入口为 src/ui/console/**,技术栈固定为 Vue 3 + TypeScript + Element Plus + Vite。
  • Controller 与 CLI 应尽量复用 src/control/services.ts 等共享 service;除纯 UI 状态外,不在 Web 或 CLI 复制一套业务规则。
  • 优先最小、可运行、可验证的实现;不要为了统一风格、提前抽象或顺手清技术债扩大 diff。
  • 不得以“个人工具”为理由削弱已有的 OAuth、CSRF、Origin、SSRF、路径隔离、Cloudflare 所有权或持久化事务边界。

执行协议

开始修改前按顺序执行:

  1. 读取当前路径生效的 AGENTS.md
  2. 检查 git status,区分已有脏文件和本任务改动;不要碰与任务无关的脏文件。
  3. 确认真正生效的 CLI → Controller → service → Runtime / Tunnel 调用链,以及 Web route → component → API → service 调用链;存在但没有入口或调用方的旧文件不能作为当前事实。
  4. 先检查用户需求是否存在错误前提、逻辑跳跃或信息缺失;区分事实、推测和主观判断,发现冲突直接指出。
  5. 涉及外部系统时确认所有权与回滚边界:Cloudflare DNS/Tunnel、OAuth client、文件系统、项目状态都不能靠名称或猜测直接覆盖/删除。
  6. 定义最小必要修改范围和能证明结果的最低成本验证方式,再开始修改。
  7. 修改过程中如果真实测试暴露新的根因,先补行为回归,再修实现;不要顺着现有代码写只会通过的测试。

生命周期不变量

  • project add/remove 只改变项目注册状态,不隐式启动 Runtime。
  • open 只确保 Controller / Web Console 可用,不启动 Runtime。
  • start 启动 Runtime,并使用显式模式或已持久化的运行偏好;项目注册应先于 Runtime 前置校验完成。
  • stop 只停止 Runtime/Tunnel,Controller 与 Web Console 保持在线。
  • shutdown 才完全关闭 Runtime 与 Controller。
  • 配置状态、持久化状态和当前运行状态是不同概念;UI/CLI 不得把其中一个伪装成另一个。
  • Runtime、Tunnel、Controller 的长生命周期操作必须使用各自真实 deadline;探活 timeout 不能复用于启动/停止操作。

Web Console 架构

  • 页面组件负责页面编排和交互状态;网络请求统一通过 src/ui/console/api.ts,页面不得自行拼 Controller URL、CSRF 或 fetch 基础设施。
  • Web 只调用 Controller API;业务语义放到共享 service,确保 CLI 与 Web 对同一操作具有一致行为。
  • App.vue 负责全局导航、跨页面状态和生命周期;View/Component 保持局部职责,不把所有逻辑重新堆回根组件。
  • 外部 CLI、Runtime 或配置文件可能在页面打开期间改变状态;Web 必须有明确的状态同步策略,不能只依赖用户手动刷新。
  • 异步请求、EventSource、timer、AbortController、原生文件选择等由谁创建就由谁 cleanup;组件卸载、Dialog 关闭或 Controller 替换后不得留下 owner 不明的后台任务。
  • 异步旧结果不得覆盖更新后的页面状态;轮询/刷新要防并发竞态,长操作结束后再解锁相关 UI。
  • 用户未保存的本地表单编辑不能被后台状态刷新静默覆盖;需要同步外部变化时先区分 server state 与 draft state。

Vue / Element Plus

  • 使用 Vue Composition API 和明确 TypeScript 类型;当前规模不引入 Pinia,除非出现真实跨页面状态复杂度证明需要。
  • Element Plus 使用当前按需导入方案;禁止恢复 app.use(ElementPlus)element-plus/dist/index.css 全量导入。
  • 通用 Button、Dialog、Drawer、Table、Tabs、Form、Switch、Message、MessageBox 等优先 Element Plus,不再自建一套通用 UI primitives。
  • 所有 Dialog/Drawer 必须有明确取消或关闭路径;异步提交期间防重复触发,同时允许用户理解当前正在做什么。
  • 面向用户的默认文案使用中文;内部 PID、revision、Tunnel ID、命令等技术信息只在需要的位置展示,避免首页堆内部术语。
  • 操作名称必须描述真实副作用,例如“生成并设置密码”不能写成看起来只会生成。

Read the full file on GitHub · 97 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. today First seen · 97 lines · 2,201 tokens per session scan A f4b19f221a2e

Subscribe to this mod's changes

codex-mcp AGENTS.md is an instructions file published in the GitHub repository meesii/codex-mcp (21 stars, last pushed today), licensed MIT. It adds 2,201 tokens to every session, about $0.0110 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-09-16.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 8,838 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens