grok-mcp

v0.2.0
io.github.howardpen9/grok-mcp Checked 13 hours ago Published 5 months ago

Use 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.

ParameterTypeDescription
prompt *stringThe prompt to send to Grok.
modelstringOverride default Grok model (e.g. 'grok-4').
timeoutnumberPer-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).

ParameterTypeDescription
base_refstringGit ref to diff against when diff is not provided. Defaults to 'main'.
cwdstringWorking directory for git diff. Defaults to process cwd.
diffstringUnified diff to review. If omitted, runs `git diff <base_ref>`.
focusstringOptional focus area (e.g. 'security', 'performance', 'API design').
formatstringOutput format. 'markdown' (default) returns a human-readable review. 'json' returns a machine-parseable verdict suitable for CI gating.
modelstring
timeoutnumberPer-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.

ParameterTypeDescription
messages *arrayConversation history. Caller maintains state across turns.
modelstring
timeoutnumberPer-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.

ParameterTypeDescription
code *stringThe code or design to attack.
contextstringOptional context: language, framework, intended behaviour, constraints.
modelstring
timeoutnumberPer-call timeout in seconds. Defaults to 300. Raise for long grok-4 reasoning.