GitWhy — The Context Layer for Git

Official registry Developer tools

The shared AI context engine for git — save, search, and share the reasoning behind code changes.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package gitwhy-mcp
Claude Code
claude mcp add gitwhy-the-context-layer-for-git -e 'GITWHY_API_KEY=<your gitwhy_api_key>' -- npx -y gitwhy-mcp@0.7.9
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "gitwhy-the-context-layer-for-git": {
            "command": "npx",
            "args": [
                "-y",
                "gitwhy-mcp@0.7.9"
            ],
            "env": {
                "GITWHY_API_KEY": "<your gitwhy_api_key>"
            }
        }
    }
}

Environment variables

  • GITWHY_API_KEY secret GitWhy API key for cloud sync, publish, and PR comment features. Not required for local-only context saving.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. GitWhy Agent Skills
  2. Install
  3. What's Included
  4. Prerequisites
  5. Links

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

Frequently asked questions

What is GitWhy — The Context Layer for Git?

The shared AI context engine for git — save, search, and share the reasoning behind code changes.

How do I install GitWhy — The Context Layer for Git?

It runs on your machine. In Claude Code: claude mcp add gitwhy-the-context-layer-for-git -e 'GITWHY_API_KEY=<your gitwhy_api_key>' -- npx -y gitwhy-mcp@0.7.9. For other clients, paste the JSON configuration from this page into their MCP settings.

Does GitWhy — The Context Layer for Git need an API key?

Yes. It expects GITWHY_API_KEY, which you set in its configuration.

Is GitWhy — The Context Layer for Git open source?

Its code is public on GitHub, but the repository does not declare a standard license.

Who maintains GitWhy — The Context Layer for Git?

It is published by gitwhy-cli. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.