codex
Enables Grok Build to orchestrate the local Codex CLI for code reviews, adversarial reviews, task rescue, session transfer, and background job management through MCP tools.
README
Grok Codex Plugin
Grok Build 指挥本地 Codex CLI 干活的开源插件。
它把 OpenAI 官方 Codex plugin for Claude Code 的 companion 运行时、任务队列、review / rescue / transfer / review-gate 逻辑移植到 Grok:走你本机已经登录的 codex,不是另一套 API。
A Grok Build plugin that delegates reviews and coding tasks to the local Codex CLI, following the same companion-runtime logic as OpenAI's Claude Code plugin.
What you get
/codex:reviewfor a normal read-only Codex review/codex:adversarial-reviewfor a steerable challenge review/codex:rescue,/codex:transfer,/codex:status,/codex:result, and/codex:cancelto delegate work, hand off sessions, and manage background jobs- MCP tools (
codex_setup,codex_review,codex_rescue, …) so Grok can command Codex without shelling out - A
codex:codex-rescuesubagent that only forwards to the companion
Requirements
- Grok Build (
grok) - Node.js 18.18 or later
- Local Codex CLI, installed and logged in (
npm install -g @openai/codexthencodex login) - ChatGPT subscription (incl. Free) or an OpenAI API key. Usage counts against your Codex limits.
Install
Add the marketplace in Grok Build, then install and trust the plugin:
grok plugin marketplace add jinxlzc/grok-codex-plugin
grok plugin install codex --trust
Or install straight from the repo:
grok plugin install jinxlzc/grok-codex-plugin --trust
Reload plugins (r in the Plugins tab, or start a new session), then run:
/codex:setup
/codex:setup will tell you whether Codex is ready. If Codex is missing and npm is available, it can offer to install Codex for you.
If Codex is installed but not logged in yet, run:
codex login
After install you should see the slash commands below, the codex:codex-rescue subagent, and (when the plugin is trusted) the codex MCP server.
Usage
/codex:setup
Checks whether Codex is installed and authenticated.
/codex:setup
/codex:setup --enable-review-gate
/codex:setup --disable-review-gate
When the review gate is enabled, a Stop hook runs a targeted Codex review of Grok's last turn. If that review finds issues, the stop is blocked so Grok can address them first.
/codex:review
Runs a normal Codex review on your current work. It gives you the same quality of code review as running /review inside Codex directly.
/codex:review
/codex:review --base main
/codex:review --background
This command is read-only and will not perform any changes.
/codex:adversarial-review
Runs a steerable review that questions the chosen implementation and design. It uses the same review target selection as /codex:review, including --base <ref> for branch review.
/codex:adversarial-review
/codex:adversarial-review --base main challenge whether this was the right caching and retry design
/codex:rescue
Hands a task to Codex through the codex:codex-rescue subagent.
Use it when you want Codex to:
- investigate a bug
- try a fix
- continue a previous Codex task
- take a faster or cheaper pass with a smaller model
/codex:rescue investigate why the tests started failing
/codex:rescue --resume apply the top fix from the last run
/codex:rescue --model gpt-5.4-mini --effort medium investigate the flaky integration test
/codex:rescue --model spark fix the issue quickly
/codex:rescue --background investigate the regression
You can also just ask:
Ask Codex to redesign the database connection to be more resilient.
让 Codex 把失败的单测修掉
Notes:
- if you do not pass
--modelor--effort, Codex chooses its own defaults. - if you say
spark, the plugin maps that togpt-5.3-codex-spark - follow-up rescue requests can continue the latest Codex task in the repo
/codex:transfer
Creates a persistent Codex thread from the current Grok session and prints a codex resume <session-id> command.
/codex:transfer
/codex:transfer --source ~/.grok/sessions/%2Fpath%2Fto%2Frepo/<session-id>
Claude Code JSONL under ~/.claude/projects is still accepted and uses Codex's native importer.
/codex:status
Shows running and recent Codex jobs for the current repository.
/codex:status
/codex:status task-abc123
/codex:result
Shows the final stored Codex output for a finished job.
/codex:cancel
Cancels an active background Codex job.
How it works
Grok session
│ slash command / skill / MCP / rescue subagent
▼
codex-companion.mjs
│ Codex app-server JSON-RPC (same local binary + auth + config)
▼
local `codex` CLI
The plugin is not a separate Codex runtime. It uses:
- the same
codexbinary you already have - the same local authentication
- the same
~/.codex/config.tomland project.codex/config.toml
Background jobs are tracked per workspace under GROK_PLUGIN_DATA (falling back to CLAUDE_PLUGIN_DATA).
Typical flows
Review before shipping:
/codex:review
Hand a problem to Codex:
/codex:rescue investigate why the build is failing in CI
Start something long-running:
/codex:adversarial-review --background
/codex:rescue --background investigate the flaky test
Then check in with /codex:status and /codex:result.
Development
npm test
The companion talks to Codex through the app-server protocol. Tests use a fake Codex fixture, so you do not need a live login to run the suite.
License
Apache-2.0.
Runtime design and a large part of the companion are derived from openai/codex-plugin-cc (Apache-2.0, Copyright 2026 OpenAI). See NOTICE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。