git forensics mcp
A specialized MCP server for in-depth analysis of git repositories, offering tools for branch overview, time period analysis, file changes, and merge recommendations.
A specialized MCP server for in-depth analysis of git repositories, offering tools for branch overview, time period analysis, file changes, and merge recommendations.
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.
The server provides four main analysis tools:
get_branch_overview
)Generates statistical summaries of branch activities
Time Period Analysis (analyze_time_period
)
Provides activity summaries with commit patterns
File Changes Analysis (analyze_file_changes
)
Generates recommended review order based on risk levels
Merge Recommendations (get_merge_recommendations
)
Each tool requires specific parameters:
repoPath
: Path to the git repositorybranches
: Array of branch names to analyzeoutputPath
: Path where analysis results will be writtentimeRange
: Start and end dates for period analysisfiles
: Array of file paths for file change analysisAll tools output JSON files containing: - Detailed analysis results - Summary statistics - Risk assessments (where applicable) - Recommendations based on analysis
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.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE.txt file for details.
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
[
{
"description": "Get high-level overview of branch states and relationships",
"inputSchema": {
"properties": {
"branches": {
"description": "Branches to analyze",
"items": {
"type": "string"
},
"type": "array"
},
"outputPath": {
"description": "Path to write analysis output",
"type": "string"
},
"repoPath": {
"description": "Path to git repository",
"type": "string"
}
},
"required": [
"repoPath",
"branches",
"outputPath"
],
"type": "object"
},
"name": "get_branch_overview"
},
{
"description": "Analyze detailed development activity in a specific time period",
"inputSchema": {
"properties": {
"branches": {
"description": "Branches to analyze",
"items": {
"type": "string"
},
"type": "array"
},
"outputPath": {
"description": "Path to write analysis output",
"type": "string"
},
"repoPath": {
"description": "Path to git repository",
"type": "string"
},
"timeRange": {
"properties": {
"end": {
"type": "string"
},
"start": {
"type": "string"
}
},
"required": [
"start",
"end"
],
"type": "object"
}
},
"required": [
"repoPath",
"branches",
"timeRange",
"outputPath"
],
"type": "object"
},
"name": "analyze_time_period"
},
{
"description": "Analyze changes to specific files across branches",
"inputSchema": {
"properties": {
"branches": {
"description": "Branches to analyze",
"items": {
"type": "string"
},
"type": "array"
},
"files": {
"description": "Files to analyze",
"items": {
"type": "string"
},
"type": "array"
},
"outputPath": {
"description": "Path to write analysis output",
"type": "string"
},
"repoPath": {
"description": "Path to git repository",
"type": "string"
}
},
"required": [
"repoPath",
"branches",
"files",
"outputPath"
],
"type": "object"
},
"name": "analyze_file_changes"
},
{
"description": "Get detailed merge strategy recommendations",
"inputSchema": {
"properties": {
"branches": {
"description": "Branches to analyze",
"items": {
"type": "string"
},
"type": "array"
},
"outputPath": {
"description": "Path to write analysis output",
"type": "string"
},
"repoPath": {
"description": "Path to git repository",
"type": "string"
}
},
"required": [
"repoPath",
"branches",
"outputPath"
],
"type": "object"
},
"name": "get_merge_recommendations"
}
]