@gongrzhe/server-git-diff-reviewer
v1.0.0
Published
Git Diff Reviewer MCP App Server with side-by-side diff viewer
Readme
Git Diff Reviewer MCP Server
Rich side-by-side diff viewer with syntax highlighting, unified/split view modes, and file tabs.
Features
- Side-by-side diff viewer - Compare old and new file versions in split-pane layout
- Unified diff parsing - Automatically parse and structure standard unified diff format with chunk tracking
- File tabs - Navigate between multiple changed files with visual indicators for additions/deletions
- Syntax highlighting - Language-aware highlighting for code changes across file types
- Structured change data - Line-by-line change tracking with old/new line numbers and change type classification
- Change statistics - Per-file and total counts of additions and deletions
Installation
npm install @gongrzhe/server-git-diff-reviewerUsage
As a CLI
npx @gongrzhe/server-git-diff-reviewerClaude Desktop Configuration
{
"mcpServers": {
"git-diff-reviewer": {
"command": "npx",
"args": ["-y", "@gongrzhe/server-git-diff-reviewer"]
}
}
}Claude Code Configuration
claude mcp add git-diff-reviewer -- npx -y @gongrzhe/server-git-diff-reviewerTools
review-diff
Parse a unified diff and display it in an interactive side-by-side viewer.
Input:
diff(string) - Unified diff text to parse and review
Output:
files(array) - Array of changed files with:filename- Current file nameoldFilename- Previous file name (if renamed)chunks- Array of change hunks with line-by-line diffsadditions- Count of added linesdeletions- Count of deleted lines
totalAdditions- Total lines added across all filestotalDeletions- Total lines deleted across all files
Example Prompt
Review this diff:
diff --git a/src/app.ts b/src/app.ts
index abc123..def456 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -1,3 +1,4 @@
+import { Logger } from './logger';
export class App {
- start() {}
+ start(port = 3000) { Logger.info('started'); }
}License
MIT
