A Model Context Protocol (MCP) server that analyzes git repository changes by comparing against a base branch.
- File Change Analysis: List all modified, added, and deleted files
- Diff Statistics: Show summary statistics of changes
- Commit History: Display commits between base and current branch
- Full Diff Output: Optional detailed diff with smart truncation
- Configurable Base Branch: Compare against any branch (default: main)
- Working Directory Support: Analyze repositories in any directory
# Build with timestamp version (builds to bin/pull-request-analyzer)
make build
# Clean build artifacts
make clean
# See all available targets
make helpThe server supports multiple transport modes:
# HTTP mode (default) - Best for web applications and API access
./bin/pull-request-analyzer -transport http -addr :8080
# SSE mode - Server-Sent Events for real-time updates
./bin/pull-request-analyzer -transport sse -addr :8080
# stdio mode - For MCP client integration (Claude Desktop, etc.)
./bin/pull-request-analyzer -transport stdioThe server provides the following tools:
| Tool Name | Description | Key Parameters |
|---|---|---|
analyze-file-changes |
Analyze file changes in a git repository by comparing against a base branch | baseBranch (default: "main"), includeDiff (default: false), maxDiffLines (default: 500), workingDirectory (optional) |
list-pr-templates |
List available PR templates with their content | None |
suggest-template |
Suggest the most appropriate PR template based on changes analysis and change type | changes_summary (required), change_type (required) |
# Start HTTP server
./bin/pull-request-analyzer -transport http -addr :8080
# The server will be accessible at http://localhost:8080
# Use with MCP clients that support HTTP transport# Start SSE server
./bin/pull-request-analyzer -transport sse -addr :8080
# Connect with SSE clients at http://localhost:8080
# Provides real-time streaming updates# Start stdio server (for MCP clients like Claude Desktop)
./bin/pull-request-analyzer -transport stdio
# Add to your MCP client configuration:
# {
# "mcpServers": {
# "pull-request-analyzer": {
# "command": "/path/to/bin/pull-request-analyzer",
# "args": ["-transport", "stdio"]
# }
# }
# }- Go 1.25 or later
- Git installed and available in PATH
- Repository must be a valid git repository
- Base branch must exist in the repository
Upcoming features planned for future releases:
- Custom Template Folders: Ability to provide local folder with custom templates
- Git Repo Templates: Support for git repo based templates
- GitHub PR Integration: Tool for opening the PR in GitHub