grok-build-plugin: Grok Build for any coding agent
Want Claude Code, Codex, or Cursor to drive Grok Build? If you already pay for a Grok subscription, this gives any of those agents live X search and data right in their context. A couple of ways to wire it up.
Bring Grok Build's live X (Twitter) + web search (and its coding agent) into the tools you already use. Two ways to consume it:
- An MCP tool (
grok_search): works in any MCP-capable agent: Claude Code, OpenAI Codex, Cursor, and others. This is the cross-agent, real-time-search core.
- A Claude Code / Grok plugin: convenience slash commands (
/grok:search, /grok:review, /grok:rescue, and more) plus a delegation subagent, with the MCP tool auto-wired in.
Grok Build has native, real-time access to X and the web, strong for breaking news, social sentiment, current package/version facts, and anything where "what's true right now" matters, which a model's training cutoff can't provide. This project is a thin, auditable wrapper around your local grok CLI.
What you get
grok_search MCP tool: live X/web search with sources, callable autonomously by any MCP-capable agent (the cross-agent core)
/grok:search: the same search as an explicit slash command
/grok:review: a read-only Grok code review of your uncommitted changes or a branch
/grok:rescue: delegate a coding/investigation task to Grok (write-capable)
/grok:status, /grok:result, /grok:cancel: manage background jobs
/grok:setup: verify Grok is installed and signed in
- a
grok:grok-rescue subagent that Claude can hand substantial tasks to proactively
Quick start: add grok_search to your agent
Works today in any MCP-capable agent, no install or publish step. You just need the Grok Build CLI signed in (grok login).
// drop into your agent's MCP config (see the per-agent table below for the path)
{
"mcpServers": {
"grok": { "command": "npx", "args": ["-y", "grok-build-x-search-mcp"] }
}
}
Or one line for OpenAI Codex:
codex mcp add grok -- npx -y grok-build-x-search-mcp
Then just ask your agent to "search X for ..." and it will call grok_search. Verified live in Codex, Antigravity (agy), and Gemini CLI. Full per-agent paths are in Per-agent setup.
Requirements
- Grok Build CLI installed and on your
PATH as grok (or point GROK_BIN at it). Verify with grok --version.
- A signed-in Grok account (
grok login). Usage counts toward your Grok limits.
- Node.js 18.18 or later.
Install
Add the marketplace in Claude Code:
/plugin marketplace add VasiHemanth/grok-build-plugin
Install the plugin:
/plugin install grok@grok-build-plugin
Reload plugins:
/reload-plugins
Then run:
/grok:setup
/grok:setup reports whether Grok is installed and authenticated. If it is installed but not signed in, run !grok login and rerun setup.
Usage
/grok:search: live X + web search
Grok's specialty. Answers questions using current information from X and the web, then lists its sources (including x.com post links when used).
/grok:search what are people on X saying about the new React release this week
/grok:search latest stable version of Node.js, with a source
/grok:search --background deep dive on recent X discussion of AI agent frameworks
Read-only: it only searches and reads; it never edits files.
/grok:review: read-only code review
Runs a read-only Grok review of your current work. Grok will not modify any files.
/grok:review
/grok:review --base main
/grok:review --background look for race conditions in the new queue code
- Default target is your uncommitted changes.
--base <ref> reviews the current branch against that ref.
- Any text after the flags becomes extra reviewer focus.
- Supports
--background for large diffs.
/grok:rescue: delegate a task to Grok
Hands a task to Grok through the grok:grok-rescue subagent. Write-capable by default.
/grok:rescue investigate why the integration tests started failing
/grok:rescue fix the failing test with the smallest safe patch
/grok:rescue --read-only diagnose the memory leak without changing code
/grok:rescue --resume-last apply the top fix from the last run
/grok:rescue --background --effort high refactor the database connection layer
--read-only restricts Grok to reading/searching (no edits or shell).
--resume-last continues the latest Grok task session in this repo; --fresh forces a new one. If you omit both, the plugin offers to continue when a resumable session exists.
--model <id> and --effort <low|medium|high> are optional runtime controls.
You can also just ask in natural language, e.g. "Ask Grok to redesign the retry logic to be more resilient," and Claude will route it to the subagent.
/grok:status, /grok:result, /grok:cancel