Git Forensics MCP

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.

davidorex

Version Control
Visit Server

Tools

get_branch_overview

Get high-level overview of branch states and relationships

analyze_time_period

Analyze detailed development activity in a specific time period

analyze_file_changes

Analyze changes to specific files across branches

get_merge_recommendations

Get detailed merge strategy recommendations

README

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:

  1. 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
  2. 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
  3. 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
  4. 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 repository
  • branches: Array of branch names to analyze
  • outputPath: Path where analysis results will be written
  • Additional tool-specific parameters:
    • timeRange: Start and end dates for period analysis
    • files: 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

Recommended Servers

MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Gitingest-MCP

Gitingest-MCP

An MCP server for gitingest. It allows MCP clients like Claude Desktop, Cursor, Cline etc to quickly extract information about Github repositories including repository summaries, project directory structure, file contents, etc

Featured
Local
Python
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
JSON Resume MCP Server

JSON Resume MCP Server

A server that enhances AI assistants with the ability to update your JSON Resume by analyzing your coding projects, automatically extracting skills and generating professional descriptions.

Official
Local
TypeScript
Edit File Lines MCP Server

Edit File Lines MCP Server

A TypeScript-based MCP server that provides tools for making precise line-based edits to text files within allowed directories.

Local
TypeScript
MCP Source Relation Server

MCP Source Relation Server

Analyzes source code dependencies across multiple programming languages in the specified directory to identify file relationships, assisting in dependency management and project structure understanding.

Local
Python
Git File Forensics MCP

Git File Forensics MCP

Provides deep git file-level forensics tools to analyze detailed file histories, changes, and patterns within git repositories, focusing on individual file analysis rather than repository-wide operations.

Local
JavaScript
MCP Git Repo Browser

MCP Git Repo Browser

A Node.js server that allows browsing Git repositories through MCP, providing tools to view directory structures and read important files from repositories.

Local
JavaScript
MCP Code Indexer

MCP Code Indexer

A smart code retrieval tool based on Model Context Protocol that provides efficient and accurate code repository search capabilities for large language models.

Local
Python