Grok MCP server
io.github.howardpen9/grok-mcp·v0.2.0·11 starsUse xAI Grok as a peer reviewer + PR gate from Claude Code, Cursor, Cline and any MCP host.
11 stars90 downloads/wk
Reviews
Write oneNobody has reviewed Grok yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Grok tools (4, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
grok_challengeAsk Grok to adversarially break a piece of code: edge cases, race conditions, security holes, adversarial inputs. Returns severity-ranked issues with reproductions.
grok_chatwrite actionSend a one-shot prompt to xAI Grok and return its reply. Stateless — for multi-turn use grok_consult.
grok_consultContinue a conversation with Grok by replaying the full message history each call. Stateless on the server side — the caller owns the thread.
grok_reviewHave Grok review a git diff. If no diff is provided, runs `git diff <base_ref>...HEAD` (default base: main). Returns a per-dimension review. Use format='json' for CI gating (verdict + scores + blockers).
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan17 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 61 days ago12/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Grok compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 88/100
- higher than 75% of 48,255 servers
- Tools
- 4
- the typical server has 7
- Tools that change things
- 25%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 11
- more than 88% of 28,688 servers
- Downloads a week
- 90
- more than 60% of 12,191 servers with a package
What its tools let an agent do: 3 read · 1 change
Install Grok in Claude Code, Cursor or VS Code
Runs npx -y grok-cli-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add grok-mcp -- npx -y grok-cli-mcp
What the publisher says
From the Grok repository's README, as published. We do not edit it. Read it on GitHub
grok-mcp
Use Grok as a peer code reviewer and rigorous second-opinion consultant inside Claude Code, Cursor, Cline, OpenClaw, and any other MCP host — talking to xAI's API directly (just an XAIAPIKEY, no install) or via the official Grok CLI.
grok-mcp (npm: grok-cli-mcp) is a Model Context Protocol server for Grok. It gives your primary agent (Claude, Cursor, etc.) four tools so it can delegate to Grok for high-quality second opinions and rigorous validation without leaving the session. As of v0.3.0 it talks to xAI's API directly — no grok binary required — and still supports the CLI for OAuth users:
- grok_review — structured diff review with per-dimension scores
- grok_challenge — thorough analysis for bugs, races, edge cases and security issues
- grok_consult — multi-turn consultation (caller owns history)
- grok_chat — one-shot questions
English | 繁體中文
Why grok-mcp?
Most "Grok MCP" packages expose Grok's chat/search/image capabilities so Claude can use Grok. grok-mcp lets your main coding agent (Claude/Cursor/…) ask Grok for a rigorous second opinion on its own work. A different model providing thorough review often catches issues that single-model loops miss.
What you get
Four tools, all stateless, all stdout-only:
Prerequisites
- Node.js ≥ 18
- A backend (the server picks one automatically — see Backends):
- API mode (recommended, zero install): an XAIAPIKEY from console.x.ai. The server calls xAI's HTTP API directly — no extra binary needed.
- CLI mode: the Grok CLI installed, used when no XAIAPIKEY is set:
curl -fsSL https://x.ai/cli/install.sh | bashThen authenticate with browser OAuth (run grok once interactively). See Authentication below.
Install
npm install -g grok-cli-mcp
# or use npx — no install needed
npx grok-cli-mcpWhy the npm name is grok-cli-mcp instead of grok-mcp? The bare grok-mcp name on npm was already taken by an unrelated project (a Grok HTTP-API integration). The brand, GitHub repo, and MCP server identity stay grok-mcp; only the npm install identifier is grok-cli-mcp — chosen to highlight that this server wraps the official Grok CLI.
Authentication
There are two auth methods, each tied to a backend:
Setting XAIAPIKEY switches the server to API mode, so you can keep your browser login for interactive grok use and use a key just for this MCP server via its env block:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Grok: common questions
- Is Grok MCP server safe?
- Yes, by our scan: it is graded A (88/100). Read the Grok safety report
- How do I install Grok?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Grok need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Grok maintained?
- The last commit was 99 days ago (2026-07-28). The latest release is v0.2.0.
- How does Grok compare with other MCP servers?
- safety score 88/100 (higher than 75% of 48,255 servers); tools 4 (the typical server has 7); tools that change things 25% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.