grok-diff-guard-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GROK_MODEL | No | The Grok model to use. | grok-4.6 |
| XAI_API_KEY | Yes | Your xAI API key. Required for live Grok reviews; mock mode via the MCP tool needs no key. | |
| XAI_BASE_URL | No | The xAI API base URL. | https://api.x.ai/v1 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Local git diff review. Call review_git_diff after editing a repository to get structured, high-signal findings; call list_changed_files to inspect what is staged.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| review_git_diffA | Review a repository's git diff and return structured findings. Args: repo_path: Path to the repository (any directory inside the work tree). mode: Diff source: "staged" (default), "working", or "base". base_ref: Branch or commit to diff against; required when mode="base". mock: Use the offline heuristic analyzer instead of calling the xAI API. Returns: A JSON-serialisable report with summary, overall_risk, findings and metrics. Findings flagged in mock mode never came from the xAI API. |
| list_changed_filesA | List reviewable files in the repository's current git diff. Args: repo_path: Path to the repository (any directory inside the work tree). mode: Diff source: "staged" (default), "working", or "base". "base" is not supported here; use review_git_diff for branch comparisons. Returns: One entry per changed file with path, status, additions, deletions. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 2 tools
list_changed_files enumerates changed files while review_git_diff performs analysis, so their purposes are distinct. However, both operate on the same git diff and share arguments, which could cause minor hesitation about when to use which.
Both tool names follow a clear verb_noun pattern in snake_case (list_changed_files, review_git_diff), making the naming fully predictable.
Two tools is slightly under the typical 3–15 range but appropriate for this narrow diff-review purpose: one to preview changed files and one to produce findings.
The core workflow (list changed files, then review the diff) is fully covered, including staged/working/base modes and mock fallback. Minor gaps exist, such as no way to filter review to a specific file or manage rule configuration.