MCP stdio server exposing the Grok Build CLI as tools for Claude Code, Cursor, and any other MCP client
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add grok-build-to-claude -- npx -y grok-build-mcp-server{
"mcpServers": {
"grok-build-to-claude": {
"command": "npx",
"args": ["-y", "grok-build-mcp-server"]
}
}
}MCP Servers overview
# grok-build-mcp-server
[](https://www.npmjs.com/package/grok-build-mcp-server)
[](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.Nuruvala/grok-build-mcp-server)
[](https://github.com/Nuruvala/grok-build-to-claude/actions/workflows/ci.yml)
[](https://nodejs.org)
[](LICENSE)
[](https://insiders.vscode.dev/redirect/mcp/install?name=grok-build&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22grok-build-mcp-server%22%5D%7D)
[](https://cursor.com/install-mcp?name=grok-build&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImdyb2stYnVpbGQtbWNwLXNlcnZlciJdfQ%3D%3D)
An [MCP](https://modelcontextprotocol.io) stdio server that exposes the [Grok Build](https://x.ai)
CLI (`grok`) as tools you can call from Claude Code, Cursor, VS Code, or any other MCP client.
```
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](CHANGELOG.md) for what shipped and
> [ROADMAP.md](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:
```
#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](https://x.ai) 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
```bash
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:
```
> 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:
```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](https://registry.modelcontextprotocol.io) 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:
```bash
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` | `--sandbox` | What it allows |
| --------------------- | ------------------- | ----------- | ---------------------------------- |
| `read-only` (default) | `plan` | `read-only` | Reading and reasoning. No edits |
| `write` | `auto` | `workspace` | Edits inside the working directory |
| `full` | `bypassPermissions` | `off` | Unattended 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 sandbox refusal is not mistaken
for a model that gave up. 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:
```bash
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
| Variable | Default | Purpose |
| ------------------------------ | -------------------------- | ---------------------------------------------------------------- |
| `GROK_BINARY` | `grok` | Path to the `grok` executable |
| `GROK_MCP_PERMISSION_CEILING` | `read-only` | Highest level any call may request |
| `GROK_MCP_DEFAULT_PERMISSION` | `read-only` | Level used when a call requests none |
| `GROK_MCP_DEFAULT_MODEL` | `grok-4.6` | Model when a call omits one. `none` defers to the CLI |
| `GROK_MCP_DEFAULT_EFFORT` | `high` | Reasoning effort when a call omits one. `none` defers to the CLI |
| `GROK_MCP_TIMEOUT_MS` | `1800000` | Wall clock for a single run |
| `GROK_MCP_STATE_DIR` | `$XDG_STATE_HOME/grok-mcp` | Background job records |
| `GROK_MCP_MAX_CONCURRENT_RUNS` | `4` | Background runs alive at once. `off` for no cap |
| `GROK_MCP_LOG_LEVEL` | `info` | `debug`, `info`, `warn`, `error`. Logs go to stderr |
| `STRUCTURED_CONTENT_ENABLED` | off | Also emit `structuredContent` alongside `_meta` |
Grok's own variables (`XAI_API_KEY`, `GROK_HOME`, `GROK_DISABLE_AUTOUPDATER`) pass through to the
child process untouched.
## Tools
| Tool | Read-only | Purpose |
| ----------- | ---------- | ----------------------------------------------------------------------------------------------- |
| `grok` | by ceiling | Run a headless Grok agent. Prompt, session resume/continue/fork, model, effort, tool allow/deny |
| `review` | always | Review a git diff: working tree, a merge-base diff against a ref, or a single commit |
| `websearch` | always | Research a question on the web, and report which searches and sources it actually used |
|What people ask about grok-build-to-claude
What is Nuruvala/grok-build-to-claude?
+
Nuruvala/grok-build-to-claude is mcp servers for the Claude AI ecosystem. MCP stdio server exposing the Grok Build CLI as tools for Claude Code, Cursor, and any other MCP client It has 1 GitHub stars and its last recorded update is dated 2026-08-18.
How do I install grok-build-to-claude?
+
You can install grok-build-to-claude by cloning the repository (https://github.com/Nuruvala/grok-build-to-claude) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is Nuruvala/grok-build-to-claude safe to use?
+
Our security agent has analyzed Nuruvala/grok-build-to-claude and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains Nuruvala/grok-build-to-claude?
+
Nuruvala/grok-build-to-claude is maintained by Nuruvala. The last recorded GitHub activity is dated 2026-08-18, with 0 open issues.
Are there alternatives to grok-build-to-claude?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy grok-build-to-claude to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/nuruvala-grok-build-to-claude)<a href="https://claudewave.com/repo/nuruvala-grok-build-to-claude"><img src="https://claudewave.com/api/badge/nuruvala-grok-build-to-claude" alt="Featured on ClaudeWave: Nuruvala/grok-build-to-claude" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!