
GitWhy — The Context Layer For Git
Attach durable “why we changed this” context to commits and let your coding agent search and reuse it across sessions and teammates.
Overview
GitWhy is an MCP server for the Build phase that saves, searches, and shares the reasoning behind git changes for AI coding agents.
What is this MCP server?
- stdio MCP package `gitwhy-mcp` on npm (server version 0.7.9)
- Save, search, and share reasoning tied to code changes via GitWhy
- Optional `GITWHY_API_KEY` for cloud sync, publish, and PR comment features
- Local-only context saving works without an API key
- Positions itself as a shared AI context engine layered on git
- Published server schema version 0.7.9
- Single npm package identifier `gitwhy-mcp` with stdio transport
- One optional secret env var `GITWHY_API_KEY` for cloud features
What problem does it solve?
Agents and future-you only see what changed in git, not why the change was correct, which wastes tokens re-explaining decisions every session.
Who is it for?
Indie teams using Claude Code or Cursor who want persistent, git-native decision context without rebuilding notes in Notion for every PR.
Skip if: Builders who only need conventional commit messages or who cannot run a local npm MCP process in their agent host.
What do I get? / Deliverables
After you register the stdio server, your agent can query and attach shared change rationale alongside commits and optional cloud or PR workflows.
- Agent-callable tools to save and search change reasoning in git
- Optional cloud-backed sync and publish when `GITWHY_API_KEY` is set
- Sharable context usable for PR comment flows described by GitWhy
Recommended MCP Servers
Journey fit
Git-linked rationale is created while you integrate features and fix bugs; the MCP server is the bridge between local git workflows and agent-accessible context. Canonical shelf is agent-tooling integrations: stdio MCP exposes save/search/share tools on top of git, not a standalone review checklist.
How it compares
Git-context MCP integration, not a code review skill or generic documentation generator.
Common Questions / FAQ
Who is GitWhy for?
Solo builders and small teams who use AI coding agents daily and want git-linked explanations teammates and agents can reuse.
When should I use GitWhy?
Use it while integrating agent workflows during Build, and keep using it when shipping PRs or operating code others must understand months later.
How do I add GitWhy to my agent?
Install the npm MCP package `gitwhy-mcp`, register it as a stdio server in your MCP client, and set `GITWHY_API_KEY` only if you need cloud sync, publish, or PR comments.