Grok Build logo

Grok Build

Run the Grok Build CLI as MCP tools: agent runs with live progress, code review, web research.

Install Grok Build

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "grok-build": {
      "command": "npx",
      "args": [
        "-y",
        "grok-build-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Tools8

What Grok Build lets your agent do. Expand a tool for its parameters.

Self-reported~141 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

6/6 checks healthy over the last 60d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · grok-build-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads530Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.

From the project README

grok-build-mcp-server

npm MCP Registry CI Node License

Install in VS Code Install in Cursor

An MCP stdio server that exposes the Grok Build CLI (grok) as tools you can call from Claude Code, Cursor, VS Code, or any other MCP client.

Code
Claude Code  ──stdio/MCP──▶  grok-build-mcp-server  ──spawn──▶  grok CLI  ──▶  xAI API

It is a thin process wrapper. It does not reimplement agent logic and does not talk to the xAI API directly — all the intelligence stays in the grok CLI. What this server adds is faithful argument construction, robust process supervision, and clean MCP-shaped output.

Status: 0.2.2. The tool surface is complete. The server runs real headless Grok agents in the foreground or detached in the background, streams progress while they run, stops a run on request, reviews git diffs, researches questions on the web, lists the sessions those runs created, and reports session, usage, and cost. See CHANGELOG.md for what shipped and ROADMAP.md for what was considered and rejected.

Progress

A long agent run is visible while it happens, rather than a silent wait ending in a wall of text. When your client sends a progressToken, the server runs Grok with --output-format streaming-json and forwards a notification per event:

Code
#5  list_dir .
#6  read_file README.md
#7  read_file — completed
#8  thinking: the user asked me to list files, read README.md, then …
#10 writing: DONE
#11 finished: end_turn (2 turns)

Progress tracks what the agent is doing, not what phase it is in. Reasoning and response text are coalesced so a token stream does not flood your client, while tool calls are reported as they happen. Clients that support resetTimeoutOnProgress will not time out mid-run.

A client that sends no progressToken gets the cheaper non-streaming path and pays nothing for this.

Requirements

  • Grok Build CLI 1.0.0 or newer, authenticated (grok models should succeed)
  • Node.js 22 or newer

If grok is not on your PATH, set GROK_BINARY to its full path when you register the server.

Install

Claude Code

Terminal
claude mcp add grok-build -s user -- npx -y grok-build-mcp-server

-s user registers the server for your whole account rather than for the directory you happen to be in. Without it the scope is that one project, which is rarely what you want for a general coding assistant, and the symptom is a server that is missing the next time you start Claude Code somewhere else.

Then, in Claude Code:

Code
> use the grok-build check tool

check reports the resolved binary, the CLI version, whether you are authenticated, and the active permission ceiling. If it is happy, the rest will work.

Any other MCP client

The server speaks MCP over stdio and takes no arguments of its own:

config.json
{
  "mcpServers": {
    "grok-build": {
      "command": "npx",
      "args": ["-y", "grok-build-mcp-server"]
    }
  }
}

VS Code and Cursor accept the install badges at the top of this page, which carry exactly that configuration.

Clients that install from the MCP Registry know this server as io.github.Nuruvala/grok-build-mcp-server. The registry entry is published from the same tag as the npm release and points at the same package.

If npx cannot find the server

npx resolves a bare package name against the local project first. If your MCP client's working directory is a checkout of this repository — or of anything else whose package.json is named grok-build-mcp-server — npx -y grok-build-mcp-server runs the local entry point, does not find one, and fails with command not found. Install it somewhere of its own and register that path:

Terminal
npm install --prefix ~/.local/share/grok-build-mcp grok-build-mcp-server
claude mcp add grok-build -s user -- ~/.local/share/grok-build-mcp/node_modules/.bin/grok-build-mcp-server

Permissions

Grok runs launched through this server are read-only by default: --permission-mode plan with --sandbox read-only. Nothing can modify your files until you say so.

Permission is a ceiling, set once when you register the server, rather than a prompt on every call. Three levels:

Level--permission-mode--sandboxWhat it allows
read-only (default)planread-onlyReading and reasoning. No edits
writeautoworkspaceEdits inside the working directory
fullbypassPermissionsoffUnattended full approval

The sandbox is not advisory, and a refusal is not a warning. Under write the run cannot write outside cwd, and a refused tool call ends the whole run: the CLI reports stopReason: cancelled, exits 0, and returns only whatever the model had said before the refusal. The server names the refused call and its path in that case, so a refused tool is not mistaken for a model that gave up. The server can see which call failed, not why the CLI refused it. If a run must write somewhere else, say a report outside the repository, either point it at a path inside cwd or use full.

write uses --permission-mode auto rather than acceptEdits, which is measured rather than inherited from the flag's name. Headless grok has no human to accept an edit, so under acceptEdits, dontAsk and default every file mutation is refused and the run dies, on both sandbox profiles. auto and bypassPermissions both work; auto is the narrower one, and it still refuses a write outside the workspace, so full remains a real step up rather than a synonym.

To let Grok make edits:

Terminal
claude mcp add grok-build -s user \
  -e GROK_MCP_PERMISSION_CEILING=write \
  -e GROK_MCP_DEFAULT_PERMISSION=write \
  -- npx -y grok-build-mcp-server

Use full only if you already run your MCP client with full approval and want the delegated Grok run to be equally unattended. It grants the spawned grok process the same authority you have.

A call that requests more than the ceiling is rejected, not silently downgraded — a clamped run would report success while changing nothing, which is worse than a clear error.

Environment variables

VariableDefaultPurpose
GROK_BINARYgrokPath to the grok executable
GROK_MCP_PERMISSION_CEILINGread-onlyHighest level any call may request
GROK_MCP_DEFAULT_PERMISSIONread-onlyLevel used when a call requests none
GROK_MCP_DEFAULT_MODELgrok-4.6Model when a call omits one. none defers to the CLI
GROK_MCP_DEFAULT_EFFORThighReasoning effort when a call omits one. none defers to the CLI
GROK_MCP_TIMEOUT_MS1800000Wall clock for a single run
GROK_MCP_STATE_DIR$XDG_STATE_HOME/grok-mcpBackground job records
GROK_MCP_MAX_CONCURRENT_RUNS4Background runs alive at once. off for no cap
GROK_MCP_LOG_LEVELinfodebug, info, warn, error. Logs go to stderr
STRUCTURED_CONTENT_ENABLEDoffAlso emit structuredContent alongside _meta

Grok's own variables (XAI_API_KEY, GROK_HOME, GROK_DISABLE_AUTOUPDATER) pass through to the child process untouched.

Tools

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Grok Build

Grok Build is an MCP server that exposes the Grok Build CLI as tools for MCP clients such as Claude Code, Cursor, and VS Code. It runs headless Grok agents, supports foreground or detached runs, streams progress, stops runs, reviews git diffs, researches web questions, lists sessions, and reports usage and cost.

Install it with npx using your MCP client; for Claude Code, run `claude mcp add grok-build -s user -- npx -y grok-build-mcp-server`. The server requires Node.js 22 or newer and the Grok Build CLI 1.0.0 or newer.

The server runs Grok agents in the foreground or detached in the background, streams progress, stops active runs, reviews git diffs, researches questions on the web, lists created sessions, and reports session, usage, and cost information.

Yes, the server forwards progress notifications while an agent runs when the MCP client sends a `progressToken`. It reports tool activity, coalesced reasoning and response text, and completion events; without a progress token, it uses a non-streaming execution path.

You need the Grok Build CLI 1.0.0 or newer, Node.js 22 or newer, and an authenticated Grok CLI installation where `grok models` succeeds. If `grok` is not on your PATH, set `GROK_BINARY` to its full path when registering the server.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGrok Build AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/grok-build?style=directory)](https://allmcps.com/mcp/grok-build)
HTML Embed
<a href="https://allmcps.com/mcp/grok-build"><img src="https://allmcps.com/api/badge/grok-build?style=directory" alt="Grok Build on AllMCPs" /></a>