mcp-git-historian
Provides git archaeology tools such as hotspot analysis, blame summaries, bus factor calculation, commit forensics, and file history by shelling out to the local git CLI.
Click on "Install 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., "@mcp-git-historianShow hotspots for /path/to/repo"
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.
mcp-git-historian
MCP server for git archaeology — churn hotspots, blame summaries, bus factor, commit forensics and file history over any local repository.
Why
Every codebase carries answers to the questions that matter most during maintenance: Which files keep breaking? Who actually knows this legacy module? When did this weird constant appear? What happens if that one developer leaves? The answers are buried in git history, but digging them out means chaining log, blame, shortlog and pickaxe invocations with arcane flags — so nobody does it.
mcp-git-historian gives your AI assistant those forensic tools directly. It shells out to the git CLI you already have (no extra dependencies, no network calls, nothing leaves your machine) and returns structured, LLM-friendly summaries: hotspot rankings, ownership percentages, knowledge silos, and the exact commit where a piece of code first showed up.
Related MCP server: git-insights-mcp
Tools
Tool | Arguments | Returns |
|
| Current branch, total commits, first/last commit (hash + date), top 10 contributors, commits per month for the last 12 months |
|
| Files ranked by commits touching them + lines added/deleted; deleted files excluded; top 3 flagged as high-churn refactor candidates |
|
| Commits that touched the file (hash, date, author, subject, +/- lines), following renames via |
|
| % of surviving lines per author, dominant author, dates of the oldest and newest lines |
|
| Per top-level directory: dominant author and share of commits, knowledge silos (>80% one author); global bus factor (min authors covering >50% of commits) |
|
| Case-insensitive commit-message search ( |
|
| Commits that added/removed the pattern via pickaxe ( |
How it works
flowchart LR
A[Claude / MCP client] -->|tool call| B[server.py<br/>FastMCP wiring]
B --> C[core.py<br/>pure stdlib logic]
C -->|subprocess, 30s timeout| D[git -C repo_path<br/>log / blame / ls-files]
D --> E[(local git repository)]
D -->|"porcelain output<br/>(pretty %x1f/%x1e, numstat,<br/>blame --line-porcelain)"| C
C -->|structured dict| B
B -->|JSON result| AAll parsing relies on machine-friendly git output: custom --pretty formats with ASCII unit/record separators (%x1f/%x1e), --numstat for line churn, and blame --line-porcelain for ownership. Everything runs locally against repositories on your disk.
Quickstart
No install needed — uvx fetches and runs it:
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"git-historian": {
"command": "uvx",
"args": ["mcp-git-historian"]
}
}
}Claude Code:
claude mcp add git-historian -- uvx mcp-git-historianPrefer a permanent install? pip install mcp-git-historian, then use mcp-git-historian as the command.
Requires Python 3.10+ and the git CLI on your PATH.
Example session
User: Nobody on the team dares to touch
legacy/parser.py. Who actually knows that module, and how risky is it?Claude: (calls
blame_summary(repo_path="/work/acme-api", file="legacy/parser.py"))Ownership is extremely concentrated: Alice Dev wrote 94.6% of the surviving lines (Bob Ops has the remaining 5.4%). The oldest line dates to 2019-03-11 and the newest to 2024-08-02 — it is old code, but still being touched.
(calls
bus_factor(repo_path="/work/acme-api"))The
legacy/directory is a knowledge silo: Alice authored 96.2% of all commits touching it. The repository's global bus factor is 2 — just two people account for more than half of all commits. If Alice is unavailable,legacy/has no realistic second owner.User: And where did that
MAGIC_TOKENconstant in the parser even come from?Claude: (calls
find_change(repo_path="/work/acme-api", pattern="MAGIC_TOKEN", file="legacy/parser.py"))The pickaxe found exactly one commit that introduced it:
a1b2c3d(2019-04-02, Alice Dev) — "feat: add legacy parser handshake token". It has never been removed or re-added since, so that constant has survived untouched for years. I'd recommend pairing someone with Alice on the nextlegacy/change and starting with tests aroundparse().
Development
git clone https://github.com/AleBrito124356/mcp-git-historian
cd mcp-git-historian
pip install -e ".[dev]"
python -m pytestYou can also run the server straight from the source tree with python -m mcp_git_historian.server.
The test suite builds a real throwaway git repository (two authors, a rename, a deleted file, pinned commit dates) and never imports mcp, so it runs with plain pytest.
Related MCP servers
Part of a family of small, dependency-light MCP servers:
mcp-decision-lab — weighted decision matrices with sensitivity analysis
mcp-devils-advocate — stress-test a claim: devil's advocate, premortem, assumption audits
mcp-secret-sentinel — scan code for exposed secrets, always redacted
mcp-memory-vault — persistent memory with SQLite FTS5 search
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseCqualityDmaintenanceMCP server providing Git-related functionalities, primarily a tool to generate diffs for Git merge commits against their first parent.4
- Flicense-qualityCmaintenanceA local-only MCP server that exposes git repository history, diffs, and status as tools for LLM clients, working entirely against a local git repo on disk.
- AlicenseAqualityCmaintenanceA local Git intelligence MCP server that provides deep repository analytics including hotspots, churn, knowledge maps, and risk scoring, all computed from commit history without data leaving your machine.12MIT
- Flicense-qualityCmaintenanceThis MCP server provides a tool to analyze git repository hotspots, returning a sorted list of files with risk scores based on change frequency and author count.
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Revternal MCP — wraps the Revternal Developer Intelligence API
MCP server for hex.pm and hexdocs.pm: search, inspect, compare, and audit Elixir packages
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/AleBrito124356/mcp-git-historian'
If you have feedback or need assistance with the MCP directory API, please join our Discord server