Git File Forensics MCP
Análisis forense de archivos Git (MCP)
Una herramienta MCP para análisis forense profundo a nivel de archivos Git que ayuda a obtener información detallada sobre historiales de archivos, cambios y patrones, centrándose en el análisis de archivos individuales en lugar de operaciones de todo el repositorio.
Instalación
Clonar y construir el servidor:
git clone [repository-url]
cd git-file-forensics
npm install
npm run buildAgregue a su configuración de MCP (
~/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
Herramientas disponibles
1. versiones de archivo de pista
Realiza un seguimiento del historial de versiones completo de un archivo específico, incluidos cambios de nombre y movimientos.
{
"method": "tools/call",
"params": {
"name": "track_file_versions",
"arguments": {
"repoPath": "/path/to/repo",
"file": "path/to/file",
"outputPath": "output.json"
}
}
}2. analizar_diferencia_de_archivo
Analiza cambios específicos entre dos versiones de un archivo.
{
"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. analizar_el_contexto_del_archivo
Analiza el contexto más amplio de los cambios de archivos en una confirmación específica.
{
"method": "tools/call",
"params": {
"name": "analyze_file_context",
"arguments": {
"repoPath": "/path/to/repo",
"file": "path/to/file",
"commit": "commit-hash",
"outputPath": "output.json"
}
}
}4. analizar_la_semántica_del_archivo
Analiza cambios semánticos y patrones en el historial de archivos.
{
"method": "tools/call",
"params": {
"name": "analyze_file_semantics",
"arguments": {
"repoPath": "/path/to/repo",
"file": "path/to/file",
"outputPath": "output.json"
}
}
}Formato de salida
Todas las herramientas generan archivos JSON que contienen:
Resultados detallados del análisis
Estadísticas resumidas
Cambiar patrones y relaciones
Evaluaciones de riesgos (cuando corresponda)
Requisitos
Node.js
Git (debe estar instalado y accesible)
Kit de desarrollo de software de MCP
Licencia
Este proyecto está licenciado bajo la Licencia Apache, versión 2.0 - consulte el archivo LICENSE.txt para obtener más detalles.
Copyright davidorex.ai. Licenciado bajo la Licencia Apache, Versión 2.0; no puede usar este proyecto sin cumplir con la Licencia. Puede obtener una copia de la Licencia en http://www.apache.org/licenses/LICENSE-2.0
Available Tools
4 toolsanalyze_file_contextC
Analyze broader context of file changes in a specific commit
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Path to git repository | |
| file | Yes | File to analyze | |
| commit | Yes | Commit hash to analyze | |
| outputPath | Yes | Path to write analysis output |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Path to git repository | |
| file | Yes | File to analyze | |
| versions | Yes | ||
| outputPath | Yes | Path to write analysis output |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Path to git repository | |
| file | Yes | File to analyze | |
| outputPath | Yes | Path to write analysis output |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | Yes | Path to git repository | |
| file | Yes | File to analyze | |
| outputPath | Yes | Path to write analysis output |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v1.0.0- Added
analyze_file_context - Added
analyze_file_diff - Added
analyze_file_semantics - Added
track_file_versions
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
- AlicenseAqualityAmaintenanceProvides tools for analyzing project structures, searching through codebases, managing dependencies, and performing file operations with advanced filtering capabilities.6333 npm1MIT
- AlicenseAqualityCmaintenanceProvides 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.16MIT
- FlicenseAqualityCmaintenanceEnables local forensic analysis of files by orchestrating system binaries (file, exiftool, strings, Volatility) via safe subprocess execution.3-
- FlicenseNot gradedqualityBmaintenanceEnables analysis of local Git repositories via standard git commands, providing insights like line authorship, commit frequency, code churn, and co-changed files.-