claude-code

claude-code

Enables Codex to delegate tasks to Claude Code, allowing Claude to investigate, edit, and verify changes in the repository with background job management.

Category
访问服务器

README

claude-plugin-codex

Consult Claude Code from inside Codex.

English | 한국어 | 日本語 | 简体中文 | 繁體中文

tests license: MIT

This plugin is for Codex users who want an easy way to consult Claude Code from the workflow they already have. Describe a task in plain language and Claude runs in the same repository — with the Claude login you already have — and reports back with a careful second pass.

It is a companion to openai/codex-plugin-cc, which connects the same two tools in the other direction. If you work with both agents, the two plugins complete the circle.

you   ▸ have claude redesign the landing page and make sure it still builds

codex ▸ claude-code.consult(prompt=…, edit=true, background=true, verify="auto")
        Started background consult job job-a1b2c3.

codex ▸ 🤝 Claude Code made changes in ~/projects/site.
        Redesigned src/app/page.tsx with a bolder hero and …
        Files Claude touched:
        - src/app/page.tsx
        🔍 Verification: `node --check 'src/app/page.tsx'` → ✅ exit 0
        ( 14 turns · 3m41s · ≈$0.42 of plan usage )

What You Get

A claude-code MCP server (Node, zero dependencies) with six tools:

  • consult — hand a task to Claude Code, advisory by default
  • review — a careful, read-only review of your uncommitted changes or branch
  • consult_status / consult_result / consult_cancel — manage background jobs
  • setup — check that Claude Code is installed and signed in

You don't call these directly. The bundled skill teaches Codex to pick the right tool and options (edit, background, verify, resume) from what you say.

Requirements

  • Claude Code, installed and signed in:

    curl -fsSL https://claude.ai/install.sh | bash
    claude   # run once to sign in
    

    Consults run through your existing Claude login, so usage draws on your Claude plan — there is no separate bill. Results include an estimate such as ≈$0.42 of plan usage for transparency. (Only if you set ANTHROPIC_API_KEY are calls API-billed, and labeled accordingly.)

  • Node.js 20+

  • Codex with plugin support, on Linux or macOS.

Install

codex plugin marketplace add xavierchoi/claude-plugin-codex
codex plugin add claude-code@claude-plugin-codex

Then ask Codex: “Is Claude ready?” — it runs the setup tool and reports anything that needs fixing, with the exact commands to fix it.

Usage

Ask for a second opinion

Get a second opinion from Claude on this change.
Ask Claude why this query is slow.

By default Claude runs in plan mode: it investigates and advises without touching files.

Ask for a review

Have Claude review my changes.
Have Claude review this branch against main — focus on the retry logic.

The server collects the git diff itself — your uncommitted changes, or everything since a base branch — and Claude reviews it read-only: a short summary, what works well, findings by severity with file:line references, and an honest verdict.

Let Claude make changes

Have Claude clean up the data layer and check it still compiles.

When you ask for changes, Codex sets edit: true and, for code edits, verify: "auto" — after Claude finishes, the server runs a quick syntax check on the touched files and appends the outcome to the result.

Longer tasks

Have Claude redesign the dashboard — take its time.

Work beyond a quick pass runs as a background job. Codex reports the job id, waits efficiently (consult_status supports long-polling), and presents the result when it's done. You can ask for the status or cancel at any time, and every run writes a live log you can follow:

tail -f ~/.cache/cc-plugin-codex/logs/latest.log

[!NOTE] Foreground consults show no progress in the UI and are capped at 28 minutes. For anything substantial, background is the comfortable path — the skill steers Codex there on its own.

Continue where Claude left off

Have Claude refine that, and also fix the tests.

Session ids are remembered per directory, so follow-ups continue the same Claude conversation.

Use your Claude Code skills

Claude runs with the skills you have installed in Claude Code:

Have Claude use the frontend-design skill to redesign this page.

Choose model and effort

Have Claude take a quick, cheap look at this.        → effort: low
Ask Claude to think hard about this race condition.  → effort: high
Have opus review this design.                        → model: opus

Mention it and Codex passes it through (--model accepts aliases like sonnet/opus/fable or full names; --effort is lowmax). When you don't, the default model is fable — the newest Claude — falling back automatically to opus, then sonnet, when a plan can't serve it. The result's meta line shows which model actually answered. To change the default, add to ~/.config/cc-plugin-codex/settings.json:

{ "model": "opus", "effort": "medium" }

Set "model": "inherit" to defer to your own Claude configuration instead.

Verification policy

The verify command runs from the MCP server without an approval gate, so it is policy-gated for safety. The default policy safe allows "auto" and plain invocations of well-known build/test tools (npm, pytest, cargo, go, make, …) with no shell operators. Configure in ~/.config/cc-plugin-codex/settings.json:

{ "verify": "safe" }
  • "auto-only" — only verify: "auto" may run
  • "safe" — the default, described above
  • "all" — any command; use only if you trust everything that can reach the tool

Updating

codex plugin marketplace upgrade claude-plugin-codex
codex plugin add claude-code@claude-plugin-codex

Then start a fresh Codex session: sessions that were already open keep the old server process, and upgrading underneath them can close their bridge (tool calls would fail with "Transport closed").

How It Works

Codex ──(MCP: consult)──▶ claude-code MCP server (Node, zero deps)
                               │
                               ├─▶ claude -p  (headless, in your repo,
                               │              your login, plan mode unless edit)
                               ├─▶ optional verify command after the edits
                               └─▶ parsed result ──▶ back to Codex

Background jobs are detached workers with file-backed state: a 45-minute watchdog, a concurrency cap, stale-job reconciliation, and process-group cancellation — a cancelled or abandoned consult never leaves a Claude process running.

Development

npm test        # full suite against a fake claude binary — fast, no usage
npm run test:live   # opt-in smoke tests against the real claude

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选