Connects Claude to GitWhy's context engine so you can save and retrieve the reasoning behind code changes directly in git commits. Exposes tools to store structured AI session context, search past decisions, browse context trees, and post summaries to pull requests. Useful when you're iterating with an AI coding agent and want to preserve why you made certain architectural choices or rejected alternatives, not just what changed. Requires the GitWhy CLI installed locally and works through MCP tools or natural language triggers like "save this session" or "what context do we have on authentication." Think of it as git blame for AI-assisted development decisions.
Public tool metadata for what this MCP can expose to an agent.
gitwhy_getRetrieve a saved context by its ID. Returns the full markdown content including metadata, reasoning, and file changes. Use when you know the exact context ID (e.g., from gitwhy_search or gitwhy_list results) and need the complete details. CLI alternative: `git why get <id>`.1 paramsRetrieve a saved context by its ID. Returns the full markdown content including metadata, reasoning, and file changes. Use when you know the exact context ID (e.g., from gitwhy_search or gitwhy_list results) and need the complete details. CLI alternative: `git why get <id>`.
idstringgitwhy_listBrowse saved contexts and the domain/topic tree structure. Use to discover what contexts exist in this repo. Call with no args to see the domain/topic hierarchy. Add filters to drill down into a specific domain or topic. CLI alternative: `git why tree` (tree view) or `git why...2 paramsBrowse saved contexts and the domain/topic tree structure. Use to discover what contexts exist in this repo. Call with no args to see the domain/topic hierarchy. Add filters to drill down into a specific domain or topic. CLI alternative: `git why tree` (tree view) or `git why...
topicstringdomainstringgitwhy_post_prPost or update a GitHub PR comment summarizing the development context for linked commits. Use when the developer wants reviewers to see the 'why' behind their changes directly on the PR. Contexts must be published first via gitwhy_publish. CLI alternative: `git why post-pr [c...3 paramsPost or update a GitHub PR comment summarizing the development context for linked commits. Use when the developer wants reviewers to see the 'why' behind their changes directly on the PR. Contexts must be published first via gitwhy_publish. CLI alternative: `git why post-pr [c...
idsstringbranchstringpr_numbernumbergitwhy_publishMake synced contexts visible to the team (shared). Auto-syncs to cloud if not already synced. Use when the developer wants teammates to see their context — typically after a PR is merged or a milestone is reached. CLI alternative: `git why push <context-id> --share`.1 paramsMake synced contexts visible to the team (shared). Auto-syncs to cloud if not already synced. Use when the developer wants teammates to see their context — typically after a PR is merged or a milestone is reached. CLI alternative: `git why push <context-id> --share`.
idsstringgitwhy_saveSave development context (reasoning, decisions, trade-offs) for the current coding session. Use after completing a meaningful unit of work. PREFERRED FORMAT: Wrap content in <context> XML tags: <context> <title>Short title of what was done</title> <agent>your-agent-name (model...5 paramsSave development context (reasoning, decisions, trade-offs) for the current coding session. Use after completing a meaningful unit of work. PREFERRED FORMAT: Wrap content in <context> XML tags: <context> <title>Short title of what was done</title> <agent>your-agent-name (model...
topicstringdomainstringcommitsarraymarkdownstringrepo_rootstringgitwhy_searchSearch saved contexts by keyword or natural language query. Returns matching context summaries ranked by relevance using hybrid keyword + semantic search. Searches across titles, reasoning, code snippets, file paths, and commit SHAs. Results include local contexts and (if auth...4 paramsSearch saved contexts by keyword or natural language query. Returns matching context summaries ranked by relevance using hybrid keyword + semantic search. Searches across titles, reasoning, code snippets, file paths, and commit SHAs. Results include local contexts and (if auth...
repostringlimitnumberquerystringdomainstringgitwhy_statusCheck GitWhy setup state, pending commits, and sync status for the current repo. Use to determine whether to suggest saving context (e.g., 'there are 5 unsaved commits'), check if the user is authenticated for cloud features, or verify GitWhy is properly initialized. IMPORTANT...1 paramsCheck GitWhy setup state, pending commits, and sync status for the current repo. Use to determine whether to suggest saving context (e.g., 'there are 5 unsaved commits'), check if the user is authenticated for cloud features, or verify GitWhy is properly initialized. IMPORTANT...
repo_rootstringgitwhy_syncUpload local contexts to the GitWhy cloud as private (not shared with team). Use after saving contexts locally to back them up to the cloud. Synced contexts remain private until explicitly published with gitwhy_publish. CLI alternative: `git why push <context-id>` (syncs speci...2 paramsUpload local contexts to the GitWhy cloud as private (not shared with team). Use after saving contexts locally to back them up to the cloud. Synced contexts remain private until explicitly published with gitwhy_publish. CLI alternative: `git why push <context-id>` (syncs speci...
idsstringforcebooleanAgent skills for GitWhy — save the reasoning, decisions, and trade-offs behind AI-generated code.
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
gitwhy skillTeaches your AI coding agent to save, retrieve, and search structured context linked to git commits. Works via MCP tools or CLI commands.
Trigger phrases:
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
GITWHY_API_KEYsecretGitWhy API key for cloud sync, publish, and PR comment features. Not required for local-only context saving.
ray0907/git-mcp-server
cyanheads/git-mcp-server
io.github.b1ff/atlassian-dc-mcp-bitbucket
io.github.b1ff/atlassian-dc-mcp-jira
com.mcparmory/atlassian-jira
sirlordt/vscode-terminal-mcp