Git File Forensics MCP
The Git File Forensics MCP server provides deep file-level analysis for git repositories, allowing you to:
Track complete version history of files, including renames and moves
Analyze specific changes between any two versions of a file
Investigate broader context of file changes within specific commits
Study semantic changes and patterns throughout a file's history
Generate detailed JSON reports with analysis results, statistics, and risk assessments
Provides tools for detailed file-level forensics in Git repositories, enabling tracking of file version history, analyzing changes between versions, examining commit contexts, and evaluating semantic patterns in file history.
Serves as the runtime environment for the MCP server, required for execution of the Git file forensics tools.
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 File Forensics MCP track the version history of src/utils/logger.js in my project"
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 File Forensics MCP
An MCP tool for deep git file-level forensics that helps get detailed insights into file histories, changes, and patterns, focusing on individual file analysis rather than repository-wide operations.
Installation
Clone and build the server:
git clone [repository-url]
cd git-file-forensics
npm install
npm run buildAdd to your MCP settings (
~/Library/Application Support/Code/User/globalStorage/david-dafu-dev.dafu/settings/cline_mcp_settings.json):
{
"mcpServers": {
"git-file-forensics": {
"command": "/opt/homebrew/bin/node",
"args": ["/path/to/git-file-forensics/build/index.js"],
"alwaysAllow": []
}
}
}Related MCP server: git-repo-analyzer-mcp
Available Tools
1. track_file_versions
Tracks complete version history of a specific file, including renames and moves.
{
"method": "tools/call",
"params": {
"name": "track_file_versions",
"arguments": {
"repoPath": "/path/to/repo",
"file": "path/to/file",
"outputPath": "output.json"
}
}
}2. analyze_file_diff
Analyzes specific changes between any two versions of a file.
{
"method": "tools/call",
"params": {
"name": "analyze_file_diff",
"arguments": {
"repoPath": "/path/to/repo",
"file": "path/to/file",
"versions": {
"from": "commit-hash-1",
"to": "commit-hash-2"
},
"outputPath": "output.json"
}
}
}3. analyze_file_context
Analyzes broader context of file changes in a specific commit.
{
"method": "tools/call",
"params": {
"name": "analyze_file_context",
"arguments": {
"repoPath": "/path/to/repo",
"file": "path/to/file",
"commit": "commit-hash",
"outputPath": "output.json"
}
}
}4. analyze_file_semantics
Analyzes semantic changes and patterns in file history.
{
"method": "tools/call",
"params": {
"name": "analyze_file_semantics",
"arguments": {
"repoPath": "/path/to/repo",
"file": "path/to/file",
"outputPath": "output.json"
}
}
}Output Format
All tools output JSON files containing:
Detailed analysis results
Summary statistics
Change patterns and relationships
Risk assessments (where applicable)
Requirements
Node.js
Git (must be installed and accessible)
MCP SDK
License
This project is licensed under the Apache License, Version 2.0 - see the LICENSE.txt file for details.
Copyright davidorex.ai. 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_contextC
Analyze broader context of file changes in a specific commit
Inputs: repoPath (required), file (required), commit (required), outputPath (required).
analyze_file_diffC
Analyze specific changes between any two versions of a file
Inputs: repoPath (required), file (required), versions (required), outputPath (required).
analyze_file_semanticsC
Analyze semantic changes and patterns in file history
Inputs: repoPath (required), file (required), outputPath (required).
track_file_versionsC
Track complete version history of a specific file, including renames and moves
Inputs: repoPath (required), file (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: analyze_file_context focuses on broader changes in a commit, analyze_file_diff examines specific changes between versions, analyze_file_semantics looks at semantic patterns in history, and track_file_versions tracks complete version history including renames. There is no overlap or ambiguity between these tools.
All tools follow a consistent verb_noun pattern with 'analyze' or 'track' as the verb and descriptive nouns like 'file_context', 'file_diff', 'file_semantics', and 'file_versions'. The naming is uniform and predictable throughout the set.
With 4 tools, this server is well-scoped for its purpose of Git file forensics. Each tool earns its place by covering distinct aspects of file analysis and tracking, avoiding bloat while providing comprehensive coverage for the domain.
The tool set provides complete coverage for Git file forensics: analyzing context, diffs, semantics, and version tracking. There are no obvious gaps, as these tools cover the core lifecycle of file changes, renames, and historical patterns without dead ends.
Maintenance
Related MCP Connectors
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Risk-scan a diff, flag AI-generated-code tells, find secrets. 5 of 7 tools need no account.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables local forensic analysis of files by orchestrating system binaries (file, exiftool, strings, Volatility) via safe subprocess execution.3-
- FlicenseNot gradedqualityDmaintenanceEnables analysis of local Git repositories via standard git commands, providing insights like line authorship, commit frequency, code churn, and co-changed files.-
- AlicenseNot gradedqualityCmaintenanceProvides read-only, structured access to a Git repository's history through seven typed tools, enabling search commits, file evolution, blame, churn, contributors, commit details, and ref comparisons without a shell.MIT
- FlicenseNot gradedqualityBmaintenanceEnables analysis of multi-file git workspaces to synthesize dependency diffs and refactor sequences.8-