The Git Forensics MCP server is a specialized tool for deep analysis of git repositories with these capabilities:
- Branch Overview: Provides insights into branch states, relationships, commit information, and statistical summaries of branch activities
- Time Period Analysis: Analyzes development activity within specific date ranges, categorizes commits (feature, fix, refactor, docs), and generates activity summaries
- File Changes Analysis: Tracks changes to specific files across branches, identifies potential conflicts, assesses risks, and recommends review order based on risk levels
- Merge Recommendations: Determines optimal merge strategies, evaluates conflict risks, identifies code hotspots, and provides step-by-step merge guidance
All outputs are provided in JSON format for further integration.
Provides deep git repository analysis tools for investigating branch relationships, development patterns, file changes, and merge strategies without requiring GitHub or other git hosting services.
Git Forensics MCP
A specialized Model Context Protocol (MCP) server for deep git repository investigation and analysis. This forensics tool provides detailed insights into repository history, branch relationships, and development patterns, focusing solely on git repository analysis rather than general GitHub or git operations.
Features
The server provides four main analysis tools:
- Branch Overview (
get_branch_overview
)- Provides high-level overview of branch states and relationships
- Analyzes last commits, commit counts, and merge bases
- Generates statistical summaries of branch activities
- Time Period Analysis (
analyze_time_period
)- Analyzes detailed development activity in specific time periods
- Categorizes commits (feature, fix, refactor, docs, other)
- Provides activity summaries with commit patterns
- File Changes Analysis (
analyze_file_changes
)- Tracks changes to specific files across branches
- Identifies potential conflict areas
- Provides risk assessment for file modifications
- Generates recommended review order based on risk levels
- Merge Recommendations (
get_merge_recommendations
)- Determines optimal merge strategies
- Assesses conflict risks
- Identifies code hotspots
- Provides step-by-step merge guidance
Input Parameters
Each tool requires specific parameters:
repoPath
: Path to the git repositorybranches
: Array of branch names to analyzeoutputPath
: Path where analysis results will be written- Additional tool-specific parameters:
timeRange
: Start and end dates for period analysisfiles
: Array of file paths for file change analysis
Output Format
All tools output JSON files containing:
- Detailed analysis results
- Summary statistics
- Risk assessments (where applicable)
- Recommendations based on analysis
Technical Details
- Built with TypeScript
- Uses MCP SDK for server implementation
- Executes git commands through child processes
- Provides error handling and validation
- Runs on stdio transport
Dependencies
- @modelcontextprotocol/sdk
- Node.js
- Git (must be installed and accessible)
Usage
The server runs as an MCP service and can be integrated with any MCP-compatible client. All analysis results are written to specified output files in JSON format.
Contributing and License
This project is licensed under the Apache License, Version 2.0 - see the LICENSE.txt file for details.
Collaboration Welcome
Forks and contributions welcome.
All contributions will be under the Apache License 2.0. This permissive license allows you to:
- Use the code commercially
- Modify and distribute the code
- Create derivative works
- Include in other projects
Copyright 2025. Licensed under the Apache License, Version 2.0; you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
local-only server
The server can only run on the client's local machine because it depends on local resources.
A specialized MCP server for in-depth analysis of git repositories, offering tools for branch overview, time period analysis, file changes, and merge recommendations.
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityThe Git MCP Server allows AI assistants to perform enhanced Git operations via the Model Context Protocol, supporting core Git functions, branch and tag management, GitHub integration, and more.Last updated -21396TypeScript
- AsecurityFlicenseAqualityMCP server for managing Git operations on local repositories, allowing users to list repositories, get and create tags, list commits, push tags, and refresh repositories through a standardized interface.Last updated -63Python
- -securityAlicense-qualityAn MCP server that provides tools for standardized Git branch management and Jira integration, allowing developers to create, validate branches according to conventions and synchronize with Jira issues.Last updated -2PythonMIT License
- AsecurityFlicenseAqualityMCP server providing Git-related functionalities, primarily a tool to generate diffs for Git merge commits against their first parent.Last updated -2TypeScript