Labsco
MCP SERVER

Git File Forensics

by davidorex

Four tools for one file's history — version tracking through renames, diffs between any two commits, the context around one change, and semantic patterns over time.

Git Hosting & Code Review
Summary
One file's story, not the repository's.

Most git tooling loses a file at its rename; this follows it, and then puts the interesting questions in reach — what actually changed between these two commits, what else moved in the same commit, whether this file has a pattern of churn. Results land as JSON files on disk rather than in the response, which is what keeps it usable on a file with a long history.

What it is

An MCP server for file-level git forensics. Repository-wide tooling answers what changed across a project; this narrows to a single file — where it came from, what happened to it between two commits, what else moved alongside it, and what its history looks like as a pattern.

What you get
  • Complete version history for one file, following renames and moves — `track_file_versions`
  • The specific changes between any two versions, given a `from` and a `to` commit hash — `analyze_file_diff`
  • The broader context of a file's change in one commit — what else that commit touched around it — `analyze_file_context`
  • Semantic changes and patterns across the file's history — `analyze_file_semantics`
  • Every tool takes a `repoPath`, a `file` and an `outputPath`, and writes analysis results, summary statistics, change patterns and — where applicable — risk assessments as JSON
Requirements

Node.js, git installed and reachable on the path, and the MCP SDK. There is no published package: clone the repository, `npm install`, `npm run build`, then point the client's `command` at `node` with `/path/to/git-file-forensics/build/index.js`. It works against whatever repository path you pass, so any checkout the account can read is in scope. Apache License, Version 2.0.