Skip to main content
Glama
davidorex

Git File Forensics MCP

by davidorex

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

  1. Clone and build the server:

git clone [repository-url]
cd git-file-forensics
npm install
npm run build
  1. Add 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: AI FileSystem 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 tools
analyze_file_contextC

Analyze broader context of file changes in a specific commit

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesPath to git repository
fileYesFile to analyze
commitYesCommit hash to analyze
outputPathYesPath to write analysis output

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions analysis and output writing, but doesn't clarify what 'broader context' entails (e.g., historical changes, related files, impact analysis), whether it's read-only or modifies data, or any performance or permission considerations. This leaves significant gaps for a tool with 4 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and target, making it easy to parse quickly, which is ideal for conciseness in tool descriptions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of analyzing file changes in commits (which could involve historical data, cross-file dependencies, or output formats), the description is incomplete. With no annotations to cover behavioral traits and no output schema to explain return values, it lacks details on what 'broader context' means, how analysis is performed, or what the output contains, making it inadequate for informed tool selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for all 4 parameters (repoPath, file, commit, outputPath). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, but the schema adequately documents the inputs, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('analyze broader context') and target ('file changes in a specific commit'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from its siblings like 'analyze_file_diff' or 'analyze_file_semantics', which likely have overlapping domains but different analytical focuses.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'analyze_file_diff' or 'analyze_file_semantics'. It mentions the context ('broader context of file changes in a specific commit') but doesn't specify use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

analyze_file_diffC

Analyze specific changes between any two versions of a file

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesPath to git repository
fileYesFile to analyze
versionsYes
outputPathYesPath to write analysis output

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states what the tool does but doesn't disclose behavioral traits like whether it's read-only vs. destructive (though 'analyze' implies read-only), what format the output takes, whether it writes to disk (implied by 'outputPath'), or any rate limits or error conditions. This leaves significant gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose with zero waste. Every word earns its place, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It doesn't explain the analysis output format, error handling, or how to interpret results, leaving the agent with insufficient context to use the tool effectively beyond basic invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75% (3 of 4 parameters have descriptions), so the baseline is 3. The description adds no additional parameter semantics beyond what's in the schema—it doesn't explain what 'versions' object should contain (e.g., commit hashes, tags) or clarify the 'outputPath' format. It relies entirely on the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Analyze specific changes between any two versions of a file'. It uses specific verbs ('analyze') and identifies the resource ('file'), but doesn't explicitly differentiate from sibling tools like 'analyze_file_context' or 'track_file_versions', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'analyze_file_context' and 'track_file_versions' available, there's no indication of when this diff analysis is preferred over those other tools, nor any mention of prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

analyze_file_semanticsC

Analyze semantic changes and patterns in file history

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesPath to git repository
fileYesFile to analyze
outputPathYesPath to write analysis output

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool analyzes semantic changes and patterns, but doesn't describe what the analysis entails (e.g., output format, whether it writes to a file or returns data, error handling, or performance considerations). For a tool with 3 parameters and no output schema, this lack of detail is a significant gap, making it hard for an agent to predict behavior beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and every part earns its place by conveying the core functionality. There's no redundancy or fluff, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what the analysis outputs, how to interpret results, or any behavioral traits like side effects (e.g., writing to 'outputPath'). For a tool that likely involves file operations and semantic analysis, more context is needed to guide effective use, leaving gaps in understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for each parameter (repoPath, file, outputPath). The description doesn't add any meaning beyond the schema, such as explaining how 'file' relates to 'repoPath' or what 'outputPath' expects. Since the schema already documents parameters adequately, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('analyze') and the target ('semantic changes and patterns in file history'), which is specific and meaningful. It distinguishes this tool from siblings like 'analyze_file_diff' (which likely focuses on textual differences) and 'track_file_versions' (which might track version metadata), though it doesn't explicitly differentiate them. The purpose is not vague or tautological, but it lacks explicit sibling differentiation for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose it over siblings like 'analyze_file_context' or 'analyze_file_diff', nor does it specify any prerequisites or exclusions. The context is implied (analyzing file history), but without explicit usage instructions, it leaves the agent to guess based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

track_file_versionsC

Track complete version history of a specific file, including renames and moves

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesPath to git repository
fileYesFile to analyze
outputPathYesPath to write analysis output

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'track' implies a read-only operation, the description doesn't specify whether this tool requires specific permissions, how it handles errors, or what the output entails (e.g., format, location). For a tool with three parameters and no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. It avoids redundancy and wastes no words, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (three required parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the output format, error handling, or behavioral traits like rate limits or authentication needs. For a tool that likely involves file system operations and version tracking, more context is needed to ensure proper usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents all three parameters ('repoPath', 'file', 'outputPath') with descriptions. The description adds no additional meaning beyond what the schema provides, such as examples or constraints. Baseline 3 is appropriate when the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Track complete version history of a specific file, including renames and moves.' It specifies the verb ('track'), resource ('version history of a specific file'), and scope ('including renames and moves'). However, it doesn't explicitly differentiate from sibling tools like 'analyze_file_context' or 'analyze_file_diff,' which likely focus on different aspects of file analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It lacks any mention of prerequisites, context for usage, or comparisons to sibling tools such as 'analyze_file_context' or 'analyze_file_diff.' This absence leaves the agent without clear direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.0
    • Addedanalyze_file_context
    • Addedanalyze_file_diff
    • Addedanalyze_file_semantics
    • Addedtrack_file_versions

TDQS

A3.5/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Provides intelligent file system operations with advanced features including code analysis and modification across multiple languages, version control (Git/GitHub), file compression, encryption, semantic search, batch operations, and secure shell command execution.
    1
    6
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables analysis of local Git repositories via standard git commands, providing insights like line authorship, commit frequency, code churn, and co-changed files.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/davidorex/git-file-forensics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server