
GitWhy — The Context Layer For Git
- Updated March 28, 2026
- gitwhy-cli/gitwhy
GitWhy is an MCP server that saves, searches, and shares the reasoning behind git changes for AI coding agents.
About
GitWhy is an MCP server that turns git from a diff ledger into a searchable context layer for AI-assisted development. developers and small teams can capture why a change was made, retrieve that reasoning later in Claude Code or similar agents, and optionally sync or publish context when `GITWHY_API_KEY` is configured. Transport is stdio over the published npm package, which matches typical local MCP registration in Claude Desktop or Claude Code. Complexity is intermediate because you need git fluency and MCP env setup, but local mode lowers the bar before you add cloud features.
- 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
GitWhy — The Context Layer For Git by the numbers
- Data as of Jul 7, 2026 (Skillselion catalog sync)
claude mcp add --env GITWHY_API_KEY=YOUR_GITWHY_API_KEY gitwhy-mcp -- npx -y gitwhy-mcpAdd your badge
Show developers this MCP server is listed on Skillselion. Paste this into your README.
| Package | gitwhy-mcp |
|---|---|
| Transport | STDIO |
| Auth | Required |
| Last updated | March 28, 2026 |
| Repository | gitwhy-cli/gitwhy ↗ |
What it does
Attach durable “why we changed this” context to commits and let your coding agent search and reuse it across sessions and teammates.
Who is it for?
Best when you use Claude Code or Cursor and want persistent, git-native decision context without rebuilding notes in Notion for every PR.
Skip if: Skip if you only need conventional commit messages or and cannot run a local npm MCP process in your agent host.
What you get
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
By the numbers
- 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
README.md
GitWhy Agent Skills
Agent skills for GitWhy — save the reasoning, decisions, and trade-offs behind AI-generated code.
Install
npx skills add gitwhy-cli/gitwhy
Or install for a specific agent:
npx skills add gitwhy-cli/gitwhy --agent claude
npx skills add gitwhy-cli/gitwhy --agent cursor
npx skills add gitwhy-cli/gitwhy --agent codex
What's Included
gitwhy skill
Teaches your AI coding agent to save, retrieve, and search structured context linked to git commits. Works via MCP tools or CLI commands.
Trigger phrases:
- "Save this session with GitWhy"
- "What context do we have on authentication?"
- "Show me the context tree"
- "Post the context to the PR"
Prerequisites
Install the GitWhy CLI first:
curl -fsSL https://gitwhy.dev/install.sh | sh
Or via Homebrew:
brew install gitwhy-cli/tap/git-why
Then run setup:
git why setup
Links
Recommended MCP Servers
How it compares
Git-context MCP integration, not a code review skill or generic documentation generator.
FAQ
Who is GitWhy for?
Developers 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.