Git Forensics MCP
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Git Forensics MCP analyze file changes in src/ for main and feature branches"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: git-intel
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 writtenAdditional 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
Available Tools
4 toolsanalyze_file_changesC
Analyze changes to specific files across branches
Inputs: repoPath (required), branches (required), files (required), outputPath (required).
analyze_time_periodC
Analyze detailed development activity in a specific time period
Inputs: repoPath (required), branches (required), timeRange (required), outputPath (required).
get_branch_overviewC
Get high-level overview of branch states and relationships
Inputs: repoPath (required), branches (required), outputPath (required).
get_merge_recommendationsC
Get detailed merge strategy recommendations
Inputs: repoPath (required), branches (required), outputPath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: analyze_file_changes focuses on file-level changes, analyze_time_period covers time-based activity, get_branch_overview provides branch states, and get_merge_recommendations handles merge strategies. The descriptions make it easy to differentiate between them.
All tools follow a consistent verb_noun pattern (analyze_file_changes, analyze_time_period, get_branch_overview, get_merge_recommendations) with clear, descriptive names. There are no deviations in naming conventions.
With 4 tools, the count is reasonable for a Git forensics server, though it feels slightly minimal. Each tool appears to serve a distinct function, but the scope might benefit from a few more tools for broader coverage without being excessive.
The tools cover analysis and recommendations well, but there are notable gaps for a Git forensics domain, such as missing CRUD operations (e.g., no tools for creating or modifying data) and limited coverage of common forensic tasks like commit history analysis or user activity tracking. Agents might need workarounds for some scenarios.
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Repository knowledge graph MCP server for codebase understanding and debugging.
Create, deploy, and operate MCP servers directly from your GitHub repositories.
Related MCP Servers
- AlicenseAqualityDmaintenanceA local Git intelligence MCP server that provides deep repository analytics including hotspots, temporal coupling, knowledge maps, churn analysis, and risk scoring for AI agents.1212MIT
- AlicenseAqualityDmaintenanceA local Git intelligence MCP server that provides deep repository analytics including hotspots, churn, knowledge maps, and risk scoring, all computed from commit history without data leaving your machine.12MIT
- AlicenseNot gradedqualityDmaintenanceA production-grade MCP server for local git repositories that provides tools for code search, git history analysis, complexity metrics, test discovery, and dependency management.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants deep understanding of your local Git repositories, providing instant repo overviews, change summaries, blame analysis, changelogs, branch health checks, and history search.80 npmMIT