grok
Allows Grok to review GitHub pull requests and branches, post pending review comments, and monitor open PRs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@grokReview the current branch against main with focus on security issues."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
grok-plugin-codex
Chinese | English
A plugin that uses Grok directly in Codex.
You still talk to Codex. Reviews, hard bug fixes, proposals, design docs, PR babysitting, docs / images / videos — hand those to your local Grok Build.
Chinese search terms | Codex 调用 Grok · 在 Codex 上用 Grok · Codex Grok 插件 · OpenAI Codex 用 xAI Grok · Codex MCP Grok |
English search terms | Codex Grok plugin · use Grok in Codex · Grok MCP for Codex · Grok Build Codex · delegate Codex tasks to Grok |
Not an official xAI / OpenAI product. Current version 0.6.0. Apache-2.0. Derived from stdevMac/grok-in-codex.
What this is
Codex stays the foreman: you talk to it, it breaks down tasks and tracks progress.
This repo is just a very thin MCP plugin — it doesn't replace Codex, and it doesn't embed the Grok model into Codex. It calls the grok CLI you already have installed locally.
Good for: adding a second capable agent inside Codex; getting a structured review before merging; following a "proposal → design → implementation" flow; or using Grok's image / video / document capabilities (which Codex doesn't have).
Not needed for: one-line fixes, renames, or chit-chat that never touches the repo.
Related MCP server: Grok-in-Codex
What it can do
You want | Say to Codex | Tool |
Fix / troubleshoot | "Have Grok look into why the tests fail" |
|
Proposal only, no code changes | "Use Grok to plan an auth rewrite" |
|
Design doc + PR breakdown | "Have Grok write a design doc" |
|
Implement per design | "Execute the latest Grok plan, dry-run first" |
|
Review a branch / PR | "Have Grok review this branch against main" |
|
Challenge assumptions | "Do an adversarial review of the billing design" |
|
Babysit CI / review comments | "Have Grok watch the open PRs" |
|
Named workflows | "List / run a Grok workflow" |
|
PDF / Word / PPT | "Make a one-page release PDF" |
|
Images / short videos | "Use Grok to make a 16:9 release banner" |
|
Task board | "Check Grok task status" |
|
Don't cram bigger product work into one giant rescue:
Artifacts land in the project directory (gitignore recommended): .grok-plans/ .grok-designs/ .grok-reviews/ .grok-docs/ .grok-media/ .grok-workflows/.
Environment
Node.js 18.18+
Grok Build CLI (
grok) onPATH, commonly at~/.grok/bin/grokgrok loginGrok Build ≥ 1.0.5 recommended (0.2.118 still starts; specific flags are gated by capability detection)
ghonly needed if you want to post comments on PRs
This plugin doesn't ship a model and won't log you into Grok for you.
Installation
codex plugin marketplace add /path/to/grok-plugin-codex/.agents/plugins
codex plugin add grok@grok-plugin-codexOpen a new Codex session for the MCP tools to load. Then:
node plugins/grok/scripts/grok-companion.mjs setupOr have Codex call grok_setup.
Codex may launch the plugin from its install cache. Pass the real project path as cwd on every tool call so tasks and artifacts land in that repo:
grok_review cwd="/path/to/project" base=main
grok_status cwd="/path/to/project" json=trueGetting started
Just say it in Codex:
让 Grok 对照 main 评审这个分支。
用 Grok 规划一次鉴权重写。
让 Grok 出一份设计文档,然后 dry-run 执行最新方案。
给重试重构开一个后台 Grok rescue。
用 Grok 生成一张 16:9 发布 banner。
看看 Grok 任务状态。MCP example:
grok_plan prompt="plan the auth rewrite" background=true
grok_design prompt="design multi-tenant billing" background=true
grok_execute_plan latest=true dryRun=true
grok_workflow action=list
grok_review base=main focus="auth, data loss, and race conditions"
grok_rescue prompt="investigate why npm test is failing" background=true
grok_babysit action=list
grok_document type=pdf prompt="one-pager for the launch"
grok_image aspect="16:9" prompt="Dark developer-tool launch banner"
grok_video image="./.grok-media/image/hero.png" duration="6" prompt="gentle camera push-in"
grok_status
grok_result jobId="plan-abc123"Tool overview
Tool | Purpose |
| CLI + login + version + doctor; optional stop-review gate |
| Troubleshoot / implement (writable by default) |
| Proposal only → |
| Read-only review (tree / branch / PR; optional |
| Challenge designs and assumptions |
| List / run Grok Rhai workflows |
| Design doc + PR plan → |
| Execute the PR DAG from a design doc |
| Babysit PRs / fix CI and review comments ( |
| docx / pdf / pptx → |
| Generate or edit images → |
| Short videos → |
| List / search / export Grok sessions |
| Context handoff notes for Grok |
| Tasks + live progress / log tail + usage |
| Final output ( |
| Cancel background tasks |
Control parameters for long tasks: sandbox (workspace, read-only, strict, devbox, off; the old alias workspace-write normalizes to workspace), planMode / permissionMode, agent, noSubagents, memory / noMemory, allow / deny, disableWebSearch, forkSession, maxTurns.
Aligned with Grok CLI 1.0.x: if the CLI has no --check / --best-of-n, they aren't force-passed. check=true is written into the prompt. Write tasks that only read for many turns without writing files are stopped on execution drift.
Usage notes
Rescue — writable by default. readOnly=true for troubleshooting only. worktree=true for safer changes.
Plan / design / execute — artifacts go to .grok-plans/ and .grok-designs/. latest=true picks the newest design. dryRun=true is read-only.
Review — never applies patches. With postPending=true on a PR, it only posts PENDING GitHub comments when it finds something.
Media — files are copied into .grok-media/ to stay within the project path contract.
Jobs — background=true returns a job id. Multiple Grok tasks can run at once. Track them with grok_status / grok_result / grok_cancel.
CLI posture — uses a denylist (--disallowed-tools) rather than an allowlist. Media, dry-run / validate-only, and babysit list are read-only (no yolo). Reviews default to --sandbox read-only and don't strip shell tools (Grok 1.0.x needs them to produce task results).
Environment variables
Variable | Purpose |
| Overrides the |
| Root directory for this plugin's task state |
| Host plugin data directory; only trusted when the basename is |
Default state directory: ~/.grok/codex-plugin/state/. Not shared with the Claude plugin state.
Task control
No global single-task lock. Prefer
background=truefor long tasks.Status follows the text stream and thought stream; still shows
runningon whitespace-only tokens. Status also records the most recent tool and whether a write tool has run.Plan results prefer harvesting
plan.md. Completed tasks storeconfig,usage,artifacts(v3).Reaper: pid dead and
result.jsoncomplete → completed; pid dead but result truncated → failed (never stuck on running forever).Background
result.jsonis written atomically (tmp + rename).PR post-pending also runs when background jobs finish; empty / oversized diffs fail closed, findings go to
.grok-reviews/.
Development
npm test
node plugins/grok/scripts/grok-companion.mjs setup --json
node plugins/grok/mcp/server.mjs # stdio NDJSON MCP serverVersion numbers in package.json, plugins/grok/.codex-plugin/plugin.json, and .agents/plugins/marketplace.json must match.
License
Apache-2.0. See LICENSE and NOTICE.
This project is derived from stdevMac's stdevMac/grok-in-codex.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityBmaintenanceEnables using the xAI Grok CLI as an MCP sub-agent for code review, asking questions, and continuing conversations within MCP hosts like Claude Code.4
- AlicenseNot gradedqualityDmaintenanceEnables Codex to delegate code reviews, coding tasks, image/video generation, and background investigations to Grok via MCP tools.10Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables Codex to use Grok Build CLI as a controlled subagent via MCP tools for independent investigation, review, and isolated implementation tasks.4MIT
- AlicenseNot gradedqualityBmaintenanceConnects OpenAI Codex and Claude Code to the local Grok Build CLI for second-opinion code reviews, bounded coding tasks, web research, media generation, and TTS.2Apache 2.0
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
A paid remote MCP for OpenAI Codex memory MCP, built to return verdicts, receipts, usage logs, and a
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bigu1/grok-plugin-codex'
If you have feedback or need assistance with the MCP directory API, please join our Discord server