DiffPilot 1.0.7
dotnet tool install --global DiffPilot --version 1.0.7
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local DiffPilot --version 1.0.7
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DiffPilot&version=1.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package DiffPilot --version 1.0.7
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
๐ DiffPilot
MCP Server for AI-Powered PR Code Review
Works with GitHub Copilot, Claude, Azure DevOps, TFS โข 100% Local โข Zero Dependencies
Features โข Installation โข Tools โข Configuration
๐ฏ What is DiffPilot?
DiffPilot is an MCP (Model Context Protocol) server that provides AI-powered PR code review and developer productivity tools. It runs locally and works with any MCP-compatible AI client.
Key Benefits
- ๐ Auto Branch Detection - Automatically detects your base branch
- ๐ Smart PR Generation - Conventional commit titles & comprehensive descriptions
- ๐ Secret Scanning - Detects API keys, passwords, tokens before commit
- ๐งช Test Suggestions - Analyzes code patterns and recommends test cases
- โก Zero Dependencies - Only uses .NET BCL, no external packages
โจ Features
| Feature | Description |
|---|---|
| ๐ PR Diff | Get diff between branches |
| ๐ Code Review | AI-structured diff output for review |
| ๐ท๏ธ PR Title | Conventional commit format titles |
| ๐ PR Description | Full description with checklist |
| ๐ฌ Commit Message | Generate from staged/unstaged changes |
| ๐ Secret Scan | Detect API keys, passwords, tokens |
| ๐ Diff Stats | Lines added/removed, file breakdown |
| ๐งช Test Suggestions | Pattern-based test case recommendations |
| ๐ Changelog | Keep a Changelog format from commits |
โก Installation
VS Code Extension (Recommended)
- Install from VS Code Marketplace
- The extension automatically registers as an MCP server
- Use with GitHub Copilot Agent Mode or any MCP client
Manual Setup
# Prerequisites: .NET 9 SDK, Git
# Clone and build
git clone https://github.com/bkalafat/DiffPilot.git
cd DiffPilot
dotnet build
# Run tests
dotnet test
# Run server
dotnet run
MCP Client Configuration
{
"mcpServers": {
"diffpilot": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/DiffPilot"],
"cwd": "/your/git/repository"
}
}
}
๐ ๏ธ Tools
PR Review Tools
| Tool | Purpose |
|---|---|
get_pr_diff |
Raw diff between branches |
review_pr_changes |
Diff with AI review instructions |
generate_pr_title |
Conventional PR title (feat/fix/refactor) |
generate_pr_description |
Full PR description with checklist |
Developer Tools
| Tool | Purpose |
|---|---|
generate_commit_message |
Commit message from staged/unstaged changes |
scan_secrets |
Detect API keys, passwords, tokens |
diff_stats |
Change statistics (lines, files, types) |
suggest_tests |
Test case recommendations |
generate_changelog |
Changelog from commits (Keep a Changelog) |
โ๏ธ Configuration
VS Code Settings
{
"diffpilot.dotnetPath": "dotnet",
"diffpilot.serverPath": "",
"diffpilot.defaultBaseBranch": "main",
"diffpilot.prTitleStyle": "conventional",
"diffpilot.commitMessageStyle": "conventional"
}
๐ Usage Examples
# Get PR diff
"Show me the changes compared to main branch"
# Code review
"Review this PR for security and performance issues"
# Generate PR title
"Suggest a PR title for these changes"
# Scan for secrets
"Check if there are any secrets in my changes"
# Generate commit message
"Create a commit message for my staged changes"
๐๏ธ Architecture
DiffPilot/
โโโ src/
โ โโโ Program.cs # Entry point (JSON-RPC loop)
โ โโโ Git/GitService.cs # Git command execution
โ โโโ Protocol/ # JSON-RPC & MCP handlers
โ โโโ Tools/ # Tool implementations
โโโ tests/ # Unit tests
โโโ vscode-extension/ # VS Code extension wrapper
Tech Stack: C# 13 / .NET 9 | JSON-RPC 2.0 | MCP stdio | xUnit
๐ License
MIT License - see LICENSE file.
GitHub โข VS Code Marketplace โข @bkalafat
โญ Star this repo if you find it useful!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.