grok-mcp
v0.2.0Use xAI Grok as a peer reviewer + PR gate from Claude Code, Cursor, Cline and any MCP host.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
grok_chat
Send a one-shot prompt to xAI Grok and return its reply. Stateless — for multi-turn use grok_consult.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | The prompt to send to Grok. |
model | string | Override default Grok model (e.g. 'grok-4'). |
timeout | number | Per-call timeout in seconds. Defaults to 300. Raise for long grok-4 reasoning. |
grok_review
Have 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).
| Parameter | Type | Description |
|---|---|---|
base_ref | string | Git ref to diff against when diff is not provided. Defaults to 'main'. |
cwd | string | Working directory for git diff. Defaults to process cwd. |
diff | string | Unified diff to review. If omitted, runs `git diff <base_ref>`. |
focus | string | Optional focus area (e.g. 'security', 'performance', 'API design'). |
format | string | Output format. 'markdown' (default) returns a human-readable review. 'json' returns a machine-parseable verdict suitable for CI gating. |
model | string | |
timeout | number | Per-call timeout in seconds. Defaults to 300. Raise for long grok-4 reasoning. |
grok_consult
Continue a conversation with Grok by replaying the full message history each call. Stateless on the server side — the caller owns the thread.
| Parameter | Type | Description |
|---|---|---|
messages * | array | Conversation history. Caller maintains state across turns. |
model | string | |
timeout | number | Per-call timeout in seconds. Defaults to 300. Raise for long grok-4 reasoning. |
grok_challenge
Ask Grok to adversarially break a piece of code: edge cases, race conditions, security holes, adversarial inputs. Returns severity-ranked issues with reproductions.
| Parameter | Type | Description |
|---|---|---|
code * | string | The code or design to attack. |
context | string | Optional context: language, framework, intended behaviour, constraints. |
model | string | |
timeout | number | Per-call timeout in seconds. Defaults to 300. Raise for long grok-4 reasoning. |