Git Why
Overview
Description from the maker (original English)
Finds the Git commits that explain why code is the way it is: semantic and full-text history search.
What you can do with it
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
- Connection: Runs on your computer
- Transport: stdio
- Category: Developer tools
Install
Pick the AI app you use, then copy the settings.
Passed 2/2 checks · Runs on your computer
First: which AI do you use?
Pick your app and the steps appear below.
Works with Claude, with some setup first
Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
Install Node.js
One time only; it works for every server that needs Node.js
Open the Claude desktop app’s settings file
SettingsDeveloperEdit Config
Paste these settings and save the file
{ "mcpServers": { "git-why": { "command": "npx", "args": [ "-y", "@alliecatowo/git-why", "mcp" ] } } }Quit Claude and open it again
Try it
Use Git Why and tell me what you can do for me, then show me one thing✓ If Claude says it is using Git Why or shows a Git Why tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
ChatGPT cannot connect Git Why yet
Git Why runs on your computer, but ChatGPT can only connect servers that run on the web
What you can do instead
A · Use an app that can connect Git Why
- Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
- Install Node.js on your computer first (one time)
- Install Node.js on your computer first (one time)
- Install Node.js on your computer first (one time)
B · Others in Developer tools that work with ChatGPT
Picked from the most used in the same category, only ones that connect by address with no key
- Sentry✓ ChatGPT
- Front-End Checklist✓ ChatGPT
- Compiler Explorer✓ ChatGPT
Works with Claude Code, with some setup first
Install Node.js on your computer first (one time)
Install Node.js
One time only; it works for every server that needs Node.js
Open Terminal
Mac: press Command+Space and type Terminal · Windows: open PowerShell
Paste this command and press Enter
claude mcp add git-why -- npx -y @alliecatowo/git-why mcpType /mcp in Claude Code
You should see Git Why listed as connected
Try it
Use Git Why and tell me what you can do for me, then show me one thing✓ If Claude Code says it is using Git Why or shows a Git Why tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with Cursor, with some setup first
Install Node.js on your computer first (one time)
Install Node.js
One time only; it works for every server that needs Node.js
Open the AI chat in Cursor in Agent mode
Try it
Use Git Why and tell me what you can do for me, then show me one thing✓ If Cursor says it is using Git Why or shows a Git Why tool in the answer, you are connected
Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with VS Code, with some setup first
Install Node.js on your computer first (one time)
Install Node.js
One time only; it works for every server that needs Node.js
Open the AI chat in VS Code in Agent mode
Try it
Use Git Why and tell me what you can do for me, then show me one thing✓ If VS Code says it is using Git Why or shows a Git Why tool in the answer, you are connected
Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version
For developers: Terminal commands and JSON settings
Installed on your computer
Claude Code
claude mcp add git-why -- npx -y @alliecatowo/git-why mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"git-why": {
"command": "npx",
"args": [
"-y",
"@alliecatowo/git-why",
"mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"git-why": {
"command": "npx",
"args": [
"-y",
"@alliecatowo/git-why",
"mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"git-why": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@alliecatowo/git-why",
"mcp"
]
}
}
}These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
At a glance
- Downloads per weeki
- 70/wk
- Connection
- Runs on your computer
- Transport
- stdio
- Latest versioni
- 0.2.0
- Categoryi
- Developer tools
- Published to registryi
- Oct 5, 2026
- Code last changedi
- Nov 7, 2026
- Maker
- alliecatowo
- Packages
npm: @alliecatowo/git-why- Website
- alliecatowo.github.io
- Registry status
- Active
Which apps can use it
Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.
Run on your computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Related guides
What it can do
Runs on your computer; the tool list appears in your AI app after you install it.
Basic checksi
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 11, 2026
- ✓ Pass
Maker matches the repo
The registry name was verified with the GitHub account alliecatowo, which owns the repo
- ✓ Pass
Still maintained
Code last changed 5 days ago
- … Not checked yet
Has a licence
We have not read this repo from GitHub yet
- – Not applicable
Endpoint responds
This one runs on your computer; there is no internet endpoint
- – Not applicable
Sign-in with OAuth
Runs on your computer and uses local settings instead
- … Not checked yet
No hidden instructions in tool descriptions
Runs on your computer; we can only read tool lists from internet endpoints
Discussion
Ask, share a tip or report that it does not work. Sorted by what people marked helpful.
No posts yet. Be the first to ask or share.
Posts here are written by users, not the PopNx team.
User reviews
No reviews yet
Compared with others in Developer toolsi
- More stars than 0% of the other 5769 servers in this category
- Published to the registry more recently than 47% of the other 5769 servers in this category
- Basic checks equal to or better than 100% of the other 5769 servers in this category
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
Common questions
Is Git Why safe?
It passed 2 of 2 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
What keys or codes does it need?
The registry does not list a required key, though some servers ask you to sign in on first use.
Does it run on my computer or in the cloud?
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
Is it still maintained?
The GitHub repo last changed 5 days ago, and the latest version (0.2.0) reached the registry 38 days ago.
Which apps can use it?
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.
What can I use instead?
In the same category: REA, Netdata, Front-End Checklist
Alternatives
Servers in the same category from other makers, sorted by stars.
Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
Netdata
Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Front-End Checklist
Review frontend code and live pages against 386 quality-gated web development rules.
README from the maker
Open the README
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
Git Why
`git blame` tells you who changed the code. `git why` finds the history that explains it.
Local-first semantic + full-text search over Git history. It returns the actual commit, its author's real words, and the relevant diff. It retrieves evidence; it does not generate an explanation of its own.
Real output from mise run demo, which rebuilds a small fixture repository from bench/fixtures/demo/build.mjs and runs these two queries against it. Nothing here is hand-written, and you can reproduce it in one command.
For output against real repositories — curl, zod, redis — including a worked case where this is the wrong tool, see docs/examples.md or the recorded terminal sessions.
$ git why "that bizarre bug where reconnecting subscribed twice"
- 7deab42 Stop duplicate subscriptions after reconnect 2025-11-20 · Maya Chen
Reconnecting re-ran the subscribe handler without clearing the previous registration, so every reconnect doubled the delivered events.
src/net/socket.ts -export function connect(url) { return new Socket(url); } +export function connect(url) {
- const s = new Socket(url);
- s.on('reconnect', () => resubscribeOnce(s));
- return s; +}
$ git why "why do we keep the session when the refresh token is empty?"
- f17db20 Fix infinite token-refresh loop 2025-11-03 · Maya Chen
Provider X can return an empty refresh token while the current access token remains valid. Retrying here puts clients into an infinite loop.
src/auth/refresh.ts export function refresh(session, refreshToken) {
- if (!refreshToken) throw new InvalidTokenError();
- if (!refreshToken) return session; return exchange(refreshToken); }
Install
Install from npm (Node >= 22.12):
npm install -g @alliecatowo/git-why
Or with Homebrew (macOS and Linux; pulls in node):
brew install alliecatowo/tap/git-why
Or build from source:
git clone https://github.com/alliecatowo/git-why.git
cd git-why npm ci npm run build npm install -g .
The package installs a git-why executable, which Git dispatches as the subcommand git why. No alias setup needed. More install paths — pinned versions, a GitHub release tarball, building from source, uninstalling — are in docs/install.md.
First run
cd your-repo
git why "why do we retry twice before giving up"
The first query downloads a small embedding model (about 32 MB, checksum-verified, cached under ~/.cache/git-why/models) and indexes the repository's history into .git/why/; later queries are incremental. Behind a proxy or offline, see HTTPS_PROXY, GIT_WHY_MODEL_BASE_URL (mirror) and GIT_WHY_OFFLINE in docs/operations.md. git why status shows whether the index is current.
Use it with an agent
Two plugins ship in plugins/:
| plugin | what you get |
|---|---|
git-why | The MCP server, a routing skill, and an index-management skill. |
git-why-full | The same, plus zg for current-code search and a history-explorer agent for questions that need several searches. |
OpenCode users get opencode/ — an opencode.json with the MCP registration and an AGENTS.md fragment.
What the skill actually teaches is when not to reach for history. It tells an agent to use git log -S when it can name the symbol, because that is a case this tool measurably loses (Hit@10 0.950 against 0.350), and to use code search rather than history for the current state of the code. A skill that claims its own tool is always best makes an agent worse at its job.
Any other MCP client can run the server directly: npx -y @alliecatowo/git-why mcp (or git why mcp once installed). It is also listed in the MCP registry as io.github.alliecatowo/git-why.
See docs/plugin.md.
Make it faster (optional)
git why server on
Holds the index, the embedding model and the lineage table open between queries. On curl — 30,000 commits — that is 569 ms a query down to 286 ms. Searches use it automatically once it is running.
It can never be the reason a search fails: if no daemon is running, or it is unreachable, or your index moved under it, the query runs directly instead. --daemon=direct opts out, --daemon=server requires one. See docs/daemon.md.
Why
git log --grep only matches words you already know. The reason code changed usually lives in a commit message, but you rarely remember its exact wording — you remember the _problem_, in your own words, months later.
Look again at the first example above: the query is "reconnecting subscribed twice" and the commit is titled "Stop duplicate subscriptions after reconnect." They share almost no vocabulary. That's not a coincidence Git Why is showing off — it's the actual point of a semantic index. It carries the meaning of the change, not just its words, alongside an ordinary keyword index for when you _do_ know the exact term.
Git Why retrieves historical evidence: the commit, the author's actual words, and the relevant diff. Historical commit messages are assertions by their authors, not infallible accounts of intent, and some reasons were never committed at all — Git Why will not manufacture those.
Measured, not claimed
Every number below is written into this file by bench/report.mjs from raw run data, and CI fails if it drifts — no figure here was typed by hand. Full methodology, limits, and the negative results are in docs/report.md.
Against the tools you would otherwise use
174 recall questions — you remember a problem but cannot name anything in the commit that fixed it — derived mechanically from 6 pinned real repositories (curl, redis, requests, ripgrep, caddy, zod). Every question is verified unanswerable by keyword search before it enters the set: if git log --grep or git log -S finds the answer from the question's own words, the case is discarded.
| strategy | Hit@1 | Hit@5 | MRR | returned nothing |
|---|---|---|---|---|
| git why | 0.201 | 0.374 | 0.266 | 0 |
| zg (semantic code search) | 0.017 | 0.040 | 0.026 | 2 |
| git log -G | 0.006 | 0.017 | 0.011 | 15 |
| git log --grep | 0.000 | 0.011 | 0.003 | 0 |
| git log --grep --all-match | 0.000 | 0.000 | 0.000 | 109 |
| git log -S | 0.000 | 0.000 | 0.000 | 15 |
10.2x `zg` and 23x the best Git-native strategy — and the only approach that answers nearly every question rather than returning an empty set.
Where it loses
When you can name the symbol, use pickaxe search instead. On cross-file causal questions, git log -S scores Hit@10 0.950 against git why's 0.350. Semantic search has no advantage over a tool you can hand the exact literal.
That boundary is the honest positioning, and the shipped skill tells agents both halves:
- cannot name the term →
git why - can name the term →
git log -S - current code, not history →
zg
Scale and cost
Does it help an agent?
Retrieval quality is not the product. The question is whether an agent answering a real question does it more accurately, or in fewer turns, with the tool than without. Four arms over the same frozen tasks, paired per task, with token counts reconciled against the provider's own accounting database.
| model | paired n | accuracy W-L | median tool calls saved |
|---|---|---|---|
| gemini-3.1-flash-lite | 6 | 1-2 | 2.5 |
| claude-haiku-4-5 | 9 | 1-1 | 1 |
| claude-sonnet-5 | 8 | 0-0 | 1 |
| deepseek-v4-flash | 8 | 0-0 | 3.5 |
| gemini-2.5-flash-lite | 6 | 2-1 | 1 |
| gemini-3.1-flash-lite | 7 | 2-0 | 1 |
| gemini-3.5-flash | 6 | 0-0 | 0.5 more |
Results are mixed across models. At single-digit paired n per model this is descriptive, not significant, and it is reported that way deliberately — the direction is consistent, the magnitude is not established. Full method and per-arm figures in the benchmark report.
Method, per-arm figures and the registered hypothesis: docs/report.md.
| measurement | result |
|---|---|
| Index across 6 real repos (56,781 commits) | 5.51–7.84 KB/record |
| curl-curl (30,000 commits, 182,772 records) | 1.37 GiB, 7.84 KB/record |
Query on curl-curl (30,000 commits) with git why server on | 384 ms p50, 491 ms p95 |
| The same query with no daemon | 851 ms p50, 1371 ms p95 |
| Diff/evidence ingestion, real-repo ablation | earns its cost, ΔHit@5 +0.375 |
What works, and what does not
Eight optimisations were implemented and measured. One survived.
The one that did: lexical overlap between the question and the commit's own message, reranked over a candidate pool deeper than the result list. Weight chosen on a dev half, evaluated once on the held-out half — +26% MRR and +44% Hit@1 on cases it never saw. Shipped.
The seven that did not: a prose-tuned embedding model, pseudo-relevance feedback, a prose-commit penalty, caller-side query restatement, wider result windows, structural expansion, and phrase fusion. None improved MRR.
What made the difference was not a better idea but a different question. The seven all asked "does this rank better". The one that worked started by asking where the right commit actually is — and found that a quarter of the corpus is retrieved but ranked below 5, which is a reordering problem, while 42% is never retrieved at all, which is not. See docs/decisions.md.
The remaining headroom is that 42%: a recall problem in the embedding itself. That is now measured rather than guessed — docs/embedding.md compares ten models on a fixed pool. Transformer embedders score +41% (jina-v2-small) and +64% (jina-v2-base) MRR over the shipped static one, at 191x and 1287x the indexing time plus an ONNX runtime. Both are available o