gitwhy
The shared AI context engine for git — save, search, and share the reasoning behind code changes.
Что умеет
- Gitwhy Get: Retrieve 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 g
- Gitwhy List: Browse 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
- Gitwhy Post Pr: Post 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
Какие данные видит
Нужен ли аккаунт
Нужен API-ключ из настроек сервиса
The shared AI context engine for git — save, search, and share the reasoning behind code changes. Captures the why behind every commit and slide on PRs for coding agents.
Как подключить
Как подключить gitwhy к Claude
Адрес сервера, который нужно вставить в настройках Claude:
https://gitwhy--gitwhy-cli.run.tools
- Откройте Claude (сайт claude.ai или приложение для компьютера).
- Перейдите в Настройки → Коннекторы (в английском интерфейсе: Settings → Connectors).
- Нажмите Добавить пользовательский коннектор (Add custom connector).
- Вставьте адрес сервера, скопированный ниже, в поле URL удалённого MCP-сервера и нажмите Добавить.
- В чате нажмите + → Коннекторы и включите новый коннектор.
Пользовательские коннекторы доступны на тарифах Free, Pro, Max, Team и Enterprise. На Free можно добавить только один. В Team и Enterprise коннектор сначала добавляет владелец организации в Настройки организации → Коннекторы.
Авторизация
После нажатия Добавить откроется окно входа в сервис. Войдите под своим аккаунтом и подтвердите доступ. Пароль Claude не видит.
Как подключить gitwhy к ChatGPT
Адрес сервера, который нужно вставить в настройках ChatGPT:
https://gitwhy--gitwhy-cli.run.tools
- Откройте ChatGPT в браузере (chatgpt.com). Нужен тариф Plus, Pro, Business, Enterprise или Edu.
- Один раз включите режим разработчика: Настройки → Приложения → Дополнительные настройки → Режим разработчика (Settings → Apps → Advanced settings → Developer mode).
- Откройте Настройки → Коннекторы и нажмите Создать (Create).
- Заполните форму: Название (любое), Описание (одна фраза, что делает сервис), URL MCP-сервера (скопируйте ниже).
- В поле Аутентификация выберите OAuth, если сервис требует вход, иначе Нет. Нажмите Создать.
- В новом чате откройте + → Приложения/Коннекторы и включите коннектор.
Название раздела у OpenAI менялось (Connectors → Apps/Plugins). Если пункт называется иначе, ищите «режим разработчика» в настройках. В рабочих пространствах Business/Enterprise администратор должен разрешить пользовательские коннекторы.
Авторизация
При первом использовании ChatGPT откроет окно входа в сервис. Войдите и подтвердите доступ.
Как подключить gitwhy к Cursor
Адрес сервера, который нужно вставить в настройках Cursor:
https://gitwhy--gitwhy-cli.run.tools
Быстрый способ: нажмите кнопку Открыть в Cursor ниже, Cursor сам предложит добавить сервер.
Вручную:
- В Cursor откройте Settings → Cursor Settings → MCP и нажмите Add new global MCP server.
- Вставьте JSON, скопированный ниже, в открывшийся файл
~/.cursor/mcp.json(для одного проекта:.cursor/mcp.jsonв корне проекта). - Сохраните файл. Сервер появится в списке MCP; при необходимости пройдите авторизацию по кнопке рядом с ним.
Авторизация
Если сервис требует вход, рядом с сервером в списке MCP появится кнопка авторизации.
Список инструментов сервера (8)
Технические названия из tools/list. Нужны только разработчикам.
| gitwhy_get | Retrieve 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>`. |
| gitwhy_list | Browse 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 log` (list view). |
| gitwhy_post_pr | Post 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 [context-id...]`. |
| gitwhy_publish | Make 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`. |
| gitwhy_save | Save 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)</agent> <tags>keyword1, keyword2, keyword3</tags> <story> Organize by phases. Write in first-person engineering journal style. Phase 1 — Title: What user asked, what you did, challenges faced, how you resolved them. Include back-and-forth with the user where it shaped the outcome. </story> <reasoning> Why you chose this approach. <decisions> - Decision — rationale </decisions> <rejected> - Alternative — why rejected </rejected> <tradeoffs> - Trade-off accepted — justification </tradeoffs> </reasoning> <files> path/to/file — new — Description path/to/other — modified — Description </files> <tools>MCPs and resources used</tools> <verification>Test/build results</verification> <risks>Open questions or risks</risks> </context> Required tags: title, story, reasoning. All others (including files) are optional. Context ID, repository, branch, date, and commits are auto-populated. CLI alternative: write content to a file, then run `git why save --file context.md`. Or pipe directly: `echo '<context>...</context>' | git why save`. |
| gitwhy_search | Search 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 authenticated) cloud workspace contexts including team-shared contexts. Use for finding past decisions, understanding why code was written, or discovering relevant prior work. Use gitwhy_get <context_id> to read the full context. CLI alternative: `git why search "<query>"`. |
| gitwhy_status | Check 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: Check the repo_root field in the response. If it shows your home directory, pass repo_root with your project's absolute path to correct it. CLI alternative: `git why log` (list saved contexts) and `git why tree` (show structure). |
| gitwhy_sync | Upload 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 specified contexts as private). |