Token导航 LogoToken导航

Agent Skill · 研究检索

codex-mcp(Codex MCP 搜索)

codex-mcp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

codex-mcp 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 56,510。

总安装 449周安装 18GitHub Stars 公开资料未说明下载 145核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codex-mcp(Codex MCP 搜索)
来源仓库:https://github.com/krishamaze/skills
仓库路径:skills/codex-mcp
安装命令:
npx skills add https://github.com/krishamaze/skills --skill codex-mcp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/krishamaze/skills --skill codex-mcp

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

codex-mcp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于关键词搜索、任务场景匹配或来源线索梳理等研究检索场景。通过 npx 命令从指定 GitHub 仓库安装,需结合原始 README 核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网或文件操作。codex-mcp 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/codex-mcp

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/krishamaze/skills --skill codex-mcp;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

codex-mcp 怎么安装?

在终端执行 npx skills add https://github.com/krishamaze/skills --skill codex-mcp。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

codex-mcp 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

codex-mcp 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

codex-mcp 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

codex-mcp 用的人多吗?

公开数据是累计安装 449 次,近一周安装 18 次,下载 145 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

codex-mcp 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
codex-mcp

Codex MCP 搜索 · 本页

449—调用外部服务未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

The Iron Law

WHEN CODEX MCP TOOLS ARE AVAILABLE, YOU DO NOT EXECUTE WORK YOURSELF.

You are a controller — plan what to do, craft prompts, route to threads, report results. The reason: Codex maintains its own context per thread. When you read files or write code directly, that work is invisible to Codex's threads. Future Codex turns will contradict or overwrite your direct changes because they don't know about them. Delegation isn't a preference — it's how context stays consistent.

Common Rationalizations

RationalizationReality
"Codex returned empty so let me just do it"Empty = signal to report, not permission to execute. The user chose delegation for a reason.
"This is simpler to do directly"Simpler ≠ permitted. Every direct action breaks Codex's context chain.
"Codex timed out so I'll handle it"Timeout = break the task smaller or increase timeout, then re-dispatch.
"I'll just check this one file quickly"Explore mode exists for this. codex_run(mode=explore).
"The tool errored, I need to work around it"Report the error to the user and let them decide. Working around it silently defeats the pattern.
"I already know the answer from context"Your context may be stale. Verify through Codex — it reads the current file system.

Interpreting codex_run results

The wrapper returns a status field in structuredContent. Use this decision tree:

StatusHow to detectController action
DONEoutput has content, no errorsSummarize result, proceed to next step
EMPTYoutput blank/missing, no errorsReport to user: "codex returned no output on thread X." Do NOT do the work yourself.
ERRORerrors array non-emptySurface error to user. Do not retry yourself.
TIMEOUTerror contains "timeout"Break task smaller or pass higher timeout=, re-dispatch.
STALE_THREADthread resume failsStart fresh thread — omit thread_id on next call.

Mode routing

Pick the right mode for the task:

Controller doesCodex does (via tool)
Plan next stepcodex_run(mode=explore) — read/navigate codebase
Targeted read-only follow-upcodex_run(mode=inspect) — inspect files, config, injected context
Craft the build promptcodex_run(mode=build) — write, edit, execute code
Describe the bugcodex_run(mode=debug) — reproduce → diagnose → fix → verify
Request test coveragecodex_run(mode=test) — write and run tests
Need current informationcodex_run(mode=research) — web search, no file writes
Request independent evaluationcodex_review — code review in isolated thread

Tools

ToolModesThreadPurpose
codex_runexplorenew or resumeRead/navigate codebase — never modifies files
codex_runinspectnew or resumeTargeted read-only checks on files, config, or injected context
codex_runbuildnew or resumeWrite, edit, create, and run code
codex_rundebugnew or resumeReproduce → diagnose → fix → verify a bug
codex_runtestnew or resumeWrite or run tests, report pass/fail
codex_runresearchnew or resumeWeb search only — no file writes
codex_review—isolatedIndependent code review with structured targets (e.g. uncommitted changes, branches)

Pass thread_id to resume an existing thread. Omit to start fresh. codex_review threads are namespace-isolated — never pass a review thread_id to codex_run or vice versa (the server enforces this with a hard error).

Use explore for broad discovery and mapping. Use inspect for narrow read-only checks, especially when driven by injected context or a specific file/config target.

Prompting Codex well

Every prompt should contain: what to do + where (file paths) + expected outcome + constraints. Pick the right mode — its baked-in role prefix handles the rest.

Incremental prompting: one focused task per call, pass thread_id to continue. Codex accumulates context across calls — the second call already knows what the first found. This gives better results than broad prompts and prevents inactivity timeouts on large scopes.

codex_run(explore, prompt="Map skills-lab/project-memory/")          → T1
codex_run(explore, thread_id=T1, prompt="Now map skills-lab/codex-mcp/")

Each mode's role prefix instructs Codex to use subagents for parallelism (file reading, multi-file edits, test execution). This produces a denser event stream that reduces timeout risk, but focused prompts still give higher quality results than broad ones.

If a single call is legitimately large, pass timeout=120 or timeout=180.

codex_run(explore): "List all exported functions in src/auth/ and their error handling patterns."
codex_run(inspect): "Use the injected `pwd` output and report the exact project root."
codex_run(build):   "Add null checks to all auth functions that access user.email."
codex_run(build, thread_id=T1): "Also add the same null checks in src/payment/."
codex_run(test):    "Write tests for the null-check cases in src/auth/. Cover: null, undefined, empty string."
codex_review:       "Read src/auth/. Requirement: every user.email access has a null check. List any gaps."
codex_run(debug):   "Login fails with TypeError on line 42 of src/auth.ts when email is null. Fix it."

Review pattern: after codex_run(mode=build) changes code, use codex_review with a structured target (target="uncommitted_changes") to automatically evaluate your local workspace diff against the original requirement in a fresh thread, completely isolated from self-review bias. Use target="base_branch", branch="main" for PR-level reviews.

Thread registry

The server tracks threads in memory/codex-threads.json — mapping thread IDs to topics so you route to the right thread by topic, not by recency. Threads persist across server restarts via thread/resume.

See references/thread-registry.md for the full schema, maintenance rules (when to add/update/close rows), and the routing decision tree (how to pick the right thread_id before each call).

Setup workflow

If the tools are NOT available, run this setup. Do not proceed with the user's actual task through direct local work.

npx skills add already places the server script at a stable project path: .agents/skills/codex-mcp/scripts/codex-mcp-server.mjs (symlinked into .claude/skills/). No global copy is needed. Setup just wires the MCP entry.

See references/setup.md for per-agent config snippets and Windows commands.

  1. Read-only preflight — gather facts without writing anything:

- Resolve the absolute path to .agents/skills/codex-mcp/scripts/codex-mcp-server.mjs - Check codex CLI is installed - Check .codex/config.toml has a model line - Config-drift check: read the args value for codex-mcp in the active agent config and compare it to the resolved project-local path. If they differ, flag as a required fix. - Identify which agent is invoking this skill

  1. Present findings and wait — report what exists, what's missing, what you intend to write. Stop and wait for explicit user approval before any writes.
  2. Configure the invoking agent only — add the MCP entry pointing to the resolved absolute path. Use resolved absolute paths (never ~ or $HOME). Do not copy the script elsewhere. Do not modify other agent configs unless the user explicitly asks.
  3. Add memory/codex-threads.json to project .gitignore — per project.
  4. Tell the user to restart — do not continue the original task in the same session unless MCP tools are already loaded.
  5. Post-restart health probe — in the new session, make one lightweight codex_run(mode=inspect, prompt="echo ok") call before starting real work. If this returns Transport closed or fails, setup is not done — go to the "On failure" section.

On failure

Tools visible but transport immediately closed:

  1. Do not retry blindly. The transport is dead, not slow.
  2. Check for config-path drift: does the registered args path match the actual project-local script path? Fix and restart.
  3. If the path is correct, verify wrapper and app-server independently:

- Windows: see references/troubleshooting-windows.md - Unix / macOS: run the wrapper directly (node "$(realpath.agents/skills/codex-mcp/scripts/codex-mcp-server.mjs)"); then run codex app-server standalone.

  1. Tell the user exactly which step failed.

General failure or timeout:

  1. Run a follow-up task to check status.
  2. If it fails again, report to the user — do not fall back to direct execution.

Troubleshooting

ProblemFix
"Codex CLI not found"npm install -g @openai/codex
Tools don't appear in agentCheck config path is absolute. Restart agent session.
Wrong project used for memory/Always pass project_dir explicitly.
Timeout errorsPass timeout=120 or 180. Break work into resumable thread_id steps.
"app-server exited"Check .codex/config.toml has a valid model.
Transport closed (any platform)Check config-path drift first. Then see references for platform-specific diagnosis.
Turn hangs then times outLikely an unhandled approval request. Update wrapper to latest version.
"Codex completed with no output"Check the errors field — rate limits and model errors surface there.
bwrap/sandbox errorsExpected in containers. Server uses danger-full-access sandbox mode.
Thread state lost after restartExpected — server state is in-memory. Registry handles this.
Wrong thread routedCheck memory/codex-threads.json. Topics are human-readable.
Cross-namespace thread_id errorYou passed a review thread_id to codex_run or vice versa.

Architecture

Agent (Claude Code / Gemini CLI / Cursor / Codex CLI / Antigravity / Augment)
  └─ MCP protocol (stdio)
      └─ codex-mcp-server.mjs  (.agents/skills/codex-mcp/scripts/)
          ├─ runServers map    (per projectDir, codex_run threads)
          ├─ reviewServers map (per projectDir, codex_review threads, isolated)
          └─ Codex app-server (JSON-RPC over stdio)
              └─ GPT model (reads, writes, executes)

<project-root>/memory/codex-threads.json
  └─ thread registry (topic-based routing, managed by the orchestrating agent)
     created automatically on first tool call, isolated per project

The MCP server spawns one app-server process per namespace per project directory and keeps it alive across tool calls. On shutdown (SIGINT/SIGTERM), all app-server processes are cleaned up.

The wrapper handles the core protocol surface: turn lifecycle, text output, diffs, file writes, command/file/permissions approvals, and token usage. Some newer methods (thread/fork, turn/steer, tool forwarding via item/tool/call) are not yet supported — unhandled server requests receive a JSON-RPC -32601 error to prevent silent hangs.

平台分布

Codex

38.04%
按下载量换算55

Claude

28.52%
按下载量换算41

Cursor

17.51%
按下载量换算25

Gemini CLI

9.17%
按下载量换算13

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

未通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills