@iflow-mcp/bkalafat-diffpilot
v1.0.0
Published
MCP server for PR code review and developer productivity
Readme
DiffPilot TypeScript
Local AI Code Review for GitHub Copilot, Claude, and AI Assistants
🔌 MCP Server - TypeScript/Node.js Implementation
⚡ No .NET required - Just Node.js 18+
💡 What Does DiffPilot Do?
- Self-Review Before PR - After your last commit, run AI code review locally before pushing
- Reviewer Workflow - Checkout any branch and get AI-assisted code review
- Auto Branch Detection - No need to specify base branch - DiffPilot finds it
📦 Installation
VS Code Extension (Recommended)
Install from VS Code Marketplace
npm (Global)
npm install -g diffpilotnpx (Direct Usage)
npx diffpilotManual MCP Configuration
Add to your MCP settings (Claude Desktop, etc.):
{
"mcpServers": {
"diffpilot": {
"command": "npx",
"args": ["diffpilot"]
}
}
}🚀 Quick Start
# Review my changes (auto-detects main/master/develop)
@workspace #review_pr_changes
# Review with focus
@workspace #review_pr_changes focus on security
# Generate commit message
@workspace #generate_commit_message
# Scan for secrets
@workspace #scan_secrets🛠️ 9 MCP Tools
| Tool | Description |
|------|-------------|
| get_pr_diff | Get raw diff between branches |
| review_pr_changes | Diff with AI review instructions |
| generate_pr_title | Conventional PR title |
| generate_pr_description | Full PR description with checklist |
| generate_commit_message | Commit message from changes |
| scan_secrets | Detect API keys, passwords, tokens |
| diff_stats | Change statistics by file |
| suggest_tests | Recommend test cases |
| generate_changelog | Changelog from commits |
✨ Key Features
- 🔄 Auto Branch Detection - Finds
main,master,developautomatically - 🔐 Secret Scanning - Detects API keys, passwords, tokens, JWT, private keys
- 📊 Diff Statistics - Lines added/removed, file breakdown
- 🧪 Test Suggestions - Pattern-based recommendations
- 🏢 Enterprise Ready - Azure DevOps, TFS, air-gapped environments
- ⚡ Zero External Dependencies - Pure TypeScript/Node.js
📁 Project Structure
diffpilot-ts/
├── src/
│ ├── index.ts # MCP Server entry point
│ ├── git/ # Git operations
│ │ └── git-service.ts
│ ├── security/ # Security helpers
│ │ └── security-helpers.ts
│ ├── tools/ # MCP tool implementations
│ │ ├── pr-review.ts # PR review tools
│ │ ├── developer.ts # Developer tools
│ │ └── types.ts # Shared types
│ └── utils/ # Utilities
├── tests/ # Vitest tests
├── vscode-extension/ # VS Code Extension
│ ├── src/
│ │ └── extension.ts
│ ├── images/
│ └── package.json
├── package.json
├── tsconfig.json
└── vitest.config.ts🔧 Development
Prerequisites
- Node.js 18+
- Git
Setup
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Run in development
npm run devBuild Extension
cd vscode-extension
npm install
npm run packageThis creates diffpilot-2.0.0.vsix in the vscode-extension folder.
🆚 C# vs TypeScript Version
| Feature | C# (.NET 9) | TypeScript (Node.js) | |---------|-------------|---------------------| | Runtime | .NET 9 SDK | Node.js 18+ | | Startup | Slower (JIT) | Faster | | Binary Size | ~50MB | ~7MB | | Dependencies | None | @modelcontextprotocol/sdk | | Performance | Excellent | Very Good |
Choose TypeScript if:
- You don't have .NET SDK installed
- You want faster startup time
- You prefer smaller extension size
Choose C# if:
- You already have .NET 9 SDK
- You want maximum performance
- You're in a .NET-heavy environment
📄 License
MIT - Burak Kalafat
🔗 Links
- VS Code Marketplace: DiffPilot Extension
- C# Version: DiffPilot (C#)
- Issues: GitHub Issues
