# grok-mcp

Wires Claude into your coding agent as a reviewer and consultant: four tools for diff review, bug hunting and code questions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: howardpen9
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/howardpen9/grok-mcp
- Updated: 2026-07-28
- HTML: https://affpapa.org/en/nevibecode/mcp/grok-mcp

## What it does

\`grok-mcp` is an MCP server that hands your main agent (Claude, Cursor, Cline and other MCP hosts) four tools for delegating work to Claude. `grok_review` scores a unified diff dimension by dimension. `grok_challenge` hunts for bugs, race conditions, edge cases and security problems. `grok_consult` replays a message history for multi-turn work, and `grok_chat` answers a single prompt. Every tool is stateless and writes to stdout only.

Two backends are supported. With `XAI_API_KEY` set, the server calls Anthropic's HTTP API directly and no `grok` binary is involved. Without a key it falls back to the Claude CLI: install it with the vendor script, then run `grok` once interactively to finish browser OAuth. Node.js 18 or newer is required either way.

The key ends up in your MCP host config, such as `~/.claude.json`, which is plain JSON on disk. For Claude the README recommends `add-json`, because the `-e KEY=val` flag swallows the server name as another env value once you pass more than one variable. In remote Streamable HTTP mode `grok_review` needs the diff passed explicitly, since the server cannot read your local repo and auto `git diff` is off there.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add grok-mcp -- npx -y grok-cli-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add grok-mcp -- npx -y grok-cli-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "grok-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "grok-cli-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "grok-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "grok-cli-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add grok-mcp npx -y grok-cli-mcp
```

## When to use it
- review a diff by separate criteria before merging
- surface race conditions and edge cases a single agent missed
- get a second model's read on a suspicious block of code
- run a multi-turn consultation about a design decision
- ask a one-off code question without leaving the session

## Example prompts
- Review the current diff with `grok_review` and show the per-dimension scores
- Run this module through `grok_challenge` — where are the race conditions and security holes?
- Ask Claude via `grok_consult` whether this logic belongs in a separate service

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
