原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Git Why

作者:alliecatowo版本 0.2.0i★ –i在你的电脑上运行
注册名称io.github.alliecatowo/git-why

安装

概览

作者提供的说明(英文原文)

Finds the Git commits that explain why code is the way it is: semantic and full-text history search.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 开发者工具

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "git-why": {
      "command": "npx",
      "args": [
        "-y",
        "@alliecatowo/git-why",
        "mcp"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add git-why -- npx -y @alliecatowo/git-why mcp

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "git-why": {
      "command": "npx",
      "args": [
        "-y",
        "@alliecatowo/git-why",
        "mcp"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "git-why": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@alliecatowo/git-why",
        "mcp"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 alliecatowo 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“开发者工具”中的其他服务器比较i

  • 星标数多于此分类中其他 1393 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 1393 个服务器的 61% 更新
  • 基础检查结果等于或优于此分类中其他 1393 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Git Why 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.2.0)于33天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:GitHub, Desktop Commander, Cloudflare MCP

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

GitHub

作者:github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

电脑或云端★ 34,245MIT3天前更新
安装

Desktop Commander

作者:wonderwhy-er

MCP server for terminal commands, file operations, and process management

在你的电脑上运行★ 10,225MIT15天前更新
安装

Cloudflare MCP

作者:cloudflare

Cloudflare MCP servers

在云端运行★ 4,446Apache-2.014个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

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"
  1. 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?"
  1. 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/:

pluginwhat you get
git-whyThe MCP server, a routing skill, and an index-management skill.
git-why-fullThe 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.

strategyHit@1Hit@5MRRreturned nothing
git why0.2010.3740.2660
zg (semantic code search)0.0170.0400.0262
git log -G0.0060.0170.01115
git log --grep0.0000.0110.0030
git log --grep --all-match0.0000.0000.000109
git log -S0.0000.0000.00015

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.

modelpaired naccuracy W-Lmedian tool calls saved
gemini-3.1-flash-lite61-22.5
claude-haiku-4-591-11
claude-sonnet-580-01
deepseek-v4-flash80-03.5
gemini-2.5-flash-lite62-11
gemini-3.1-flash-lite72-01
gemini-3.5-flash60-00.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.

measurementresult
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 on384 ms p50, 491 ms p95
The same query with no daemon851 ms p50, 1371 ms p95
Diff/evidence ingestion, real-repo ablationearns 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

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx