Git 저장소 상태와 에러 메시지를 쉬운 영어로 설명하고, 이를 해결하기 위한 정확한 명령어를 제공합니다.
다른 이름 Srikarmk/whygit
- 스타
- 0
- Tools
- —
- 다운로드, 30일
- 456
- 최신 버전
- 0.1.2
- 마지막 커밋
- 2026년 10월 20일
- 라이선스
- MIT
whygit MCP란?
Git 저장소 상태와 에러 메시지를 쉬운 영어로 설명하고, 이를 해결하기 위한 정확한 명령어를 제공합니다.
프로젝트 README에서 생성된 요약
whygit MCP server 정보
whygit는 복잡한 Git 저장소 상태와 에러 메시지를 쉬운 영어로 번역하여 개발자의 이해를 돕습니다. 표준 터미널 메시지를 해석하는 데 어려움을 겪는 Git 초보자를 위해 설계되었습니다. 이 도구는 머지 충돌, detached HEAD 상태, 푸시 거부, 대용량 파일 에러와 같은 문제를 식별한 후 이를 해결하는 데 필요한 구체적인 명령어를 제공합니다.
사용자는 터미널에서 직접 실행하거나 Model Context Protocol을 통해 Claude Desktop, Claude Code, Cursor와 같은 AI 어시스턴트에 연결할 수 있습니다. MCP server로 사용할 경우 diagnose_repo, explain_git_error, explain_state라는 세 가지 read-only 도구를 제공합니다. 이 설정을 통해 AI 클라이언트는 표준 git status를 바탕으로 추측하는 대신 저장소에 대한 신뢰할 수 있는 진단 결과를 받을 수 있습니다.
안전성은 이 도구의 핵심 기능입니다. 서버는 저장소 데이터를 읽기만 할 뿐 제안된 수정 사항을 절대 실행하지 않습니다. 또한 제한된 Git 서브커맨드를 사용하여 파일이나 설정을 수정할 수 없도록 보장합니다. 자격 증명을 마스킹하고 네트워크 호출을 하지 않으므로 개인정보도 보호합니다.
활용 사례
- 1저장소 문제 진단AI 어시스턴트에게 저장소가 왜 멈췄거나 손상되었는지 확인하도록 요청합니다.
- 2Git 에러 메시지 해석특정 에러 문자열을 제공하여 쉬운 영어 설명과 해결 방법을 얻습니다.
- 3저장소 상태 요약브랜치, 원격 저장소, 스테이징된 변경 사항에 대한 중립적인 요약을 받습니다.
- 4머지 충돌 해결충돌이 발생한 파일을 처리하는 방법에 대한 단계별 지침을 받습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
whygit MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 whygit MCP 설치
$ claude mcp add whygit -- uvx whygitCursor에 whygit MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"whygit": {
"command": "uvx",
"args": [
"whygit"
]
}
}
}VS Code에 whygit MCP 설치
.vscode/mcp.json
{
"servers": {
"whygit": {
"type": "stdio",
"command": "uvx",
"args": [
"whygit"
]
}
}
}VS Code CLI에 whygit MCP 설치
$ code --add-mcp '{"name":"whygit","type":"stdio","command":"uvx","args":["whygit"]}'Claude Desktop에 whygit MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"whygit": {
"command": "uvx",
"args": [
"whygit"
]
}
}
}Codex에 whygit MCP 설치
$ codex mcp add whygit -- uvx whygitCodex config.toml에 whygit MCP 설치
~/.codex/config.toml
[mcp_servers.whygit] command = "uvx" args = ["whygit"]
Gemini CLI에 whygit MCP 설치
$ gemini mcp add -s user whygit uvx -- whygitGemini settings.json에 whygit MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"whygit": {
"command": "uvx",
"args": [
"whygit"
]
}
}
}자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능srikarmk/whygit is public and reachablegithub.com/srikarmk/whygit ↗통과
- 패키지가 이 저장소를 소스로 명시whygit names srikarmk/whygit as sourcepypi.org/project/whygit/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for whygitpypi.org/project/whygit/ ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-20github.com/srikarmk/whygit ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from whygit통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음29 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기whygit
What just happened to my Git repository, and how do I fix it?
whygit looks at a Git repository and tells you, in plain English, what state it is in and which commands will get you out of it: a merge conflict, a rebase stopped halfway, a detached HEAD, a rejected push, a login GitHub won't accept, a 120 MB CSV that GitHub will refuse. Paste it an error message and it explains that too.
It is written for people meeting Git for the first time. Git's own messages are accurate but hard to read; whygit turns them into a short explanation and the exact fix.
It only ever reads your repository. It never runs the fixes it suggests, so you stay in control and learn the commands as you go.
There are two ways to use it, built on the same engine:
- On the command line, with no AI tools involved:
whygit. - As an MCP server, so an assistant such as Claude Code, Claude Desktop or Cursor gets a
reliable diagnosis instead of guessing from
git status.
Install
whygit needs Python 3.10 or newer and Git. Pick one:
uv tool install whygit # with uv (https://docs.astral.sh/uv/)
pipx install whygit # with pipx
uvx whygit # run once without installing
This works the same on macOS, Windows and Linux.
Use it from the terminal
Run it inside your project folder:
whygit # what's wrong here, most urgent first
whygit status # a plain summary: branch, upstream, what's changed
whygit explain "fatal: refusing to merge unrelated histories"
git push 2>&1 | whygit explain -
Options: --path <folder> (or -C) to look at another folder, --json for machine-readable
output, --no-color to turn off colour. Colour is only used in a real terminal and never
when NO_COLOR is set.
Exit codes: 0 nothing blocking, 1 something blocking was found, 2 bad usage (for example
the folder does not exist), 3 explain did not recognise the message.
Example
$ whygit
whygit: /Users/sam/ds3500/hw2 (branch main)
[BLOCKING] Merge in progress with conflicts in 1 file
Git tried to combine two lines of work, but both changed the same part of these
files, so it stopped and is waiting for you to choose what the result should be.
Nothing is lost while you decide.
Conflicted files:
- analysis.py (both changed)
How to fix:
Finish the merge:
1. Open each file and find the blocks between <<<<<<< and >>>>>>>. The part
above ======= is one version, the part below is the other. Keep what you
want, and delete the three marker lines.
2. git add analysis.py
Marks the files as resolved
3. git commit --no-edit
Records the merge and finishes it
Or cancel the merge:
1. git merge --abort
Puts everything back the way it was before the merge started
Learn more: https://git-scm.com/docs/git-merge#_how_to_resolve_conflicts
1 blocking. whygit never runs these commands for you; copy the ones you want.
Commands that can lose work (git restore, git rebase --skip, git push --force-with-lease
and so on) are always marked with a warning, and a safer option is listed first when one
exists.
Use it with an AI assistant (MCP)
whygit mcp runs a Model Context Protocol server over stdio with three read-only tools:
| Tool | Use it when | Returns |
|---|---|---|
diagnose_repo(path=".") |
something seems stuck or broken | every problem found, most urgent first, with explanation and fix |
explain_git_error(error_text, path=None) |
a git command printed an error | what the error means and the fix, using the repository's state if path is given |
explain_state(path=".") |
you want a neutral summary | branch, upstream, ahead/behind, remotes, staged and changed files, operations in progress |
Results are small JSON objects. Pass an absolute path: relative paths resolve against the
server's working directory, which for desktop apps is usually not your project. ~ works.
Claude Code
claude mcp add --scope user whygit -- uvx whygit mcp
--scope user makes it available in every project; leave it out to add it to the current
project only. Check it with claude mcp list.
Claude Desktop
Open Settings > Developer > Edit Config, and add whygit to
claude_desktop_config.json (on macOS ~/Library/Application Support/Claude/, on Windows
%APPDATA%\Claude\):
{
"mcpServers": {
"whygit": {
"command": "uvx",
"args": ["whygit", "mcp"]
}
}
}
Restart Claude Desktop. If it can't find uvx, use the full path that which uvx (macOS)
or where uvx (Windows) prints as the command.
Cursor
Add the same block to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project:
{
"mcpServers": {
"whygit": {
"command": "uvx",
"args": ["whygit", "mcp"]
}
}
}
If you installed whygit with uv tool install or pipx, you can use "command": "whygit"
with "args": ["mcp"] instead.
What it recognises
Repository states: merge conflicts (and a merge that is resolved but not committed, including
leftover <<<<<<< markers), a rebase stopped on a conflict or an edit, cherry-pick, revert,
git am and bisect in progress, detached HEAD (and commits that no branch points to),
diverged / behind / ahead of the upstream, no upstream yet (the first git push -u), no
remote, upstream branch deleted, no commits yet, not a repository (including being one folder
too high, and your home folder), a home folder that was accidentally turned into a
repository, nested repositories (common with downloaded starter code), files over GitHub's
100 MB limit (and over 50 MB) staged or in unpushed commits, files that usually hold secrets
(.env, id_rsa, *.pem, kaggle.json, credentials JSON), notebooks with large saved
outputs, Jupyter notebook conflicts, missing user.name / user.email, a leftover
index.lock, and folders Git refuses because of "dubious ownership".
Error messages: rejected pushes, "You have divergent branches", "refusing to merge unrelated
histories", GitHub login failures (passwords no longer work; it explains tokens, SSH and
gh auth login, and never asks for your token), Permission denied (publickey), repository
not found, 403, "Your local changes would be overwritten", untracked files in the way,
"not a git repository", "src refspec main does not match any", "pathspec did not match",
"remote origin already exists", missing upstream, "couldn't find remote ref", GitHub's
large-file rejection (GH001), "detected dubious ownership", "Please tell me who you are",
index.lock exists, line-ending warnings, network errors, and more. If it doesn't recognise
a message, it says so and shows what it can see in the repository instead.
The read-only promise
whygit never changes your repository, and this is enforced in code rather than left to good intentions:
- Every Git command goes through a single function that only accepts read-only subcommands
(
status,rev-parse,for-each-ref,rev-list,diff,log,ls-files,cat-file,config --get,remote -v, ...) and refuses anything else, including the writing forms ofconfig,remoteandsymbolic-ref. - It sets
GIT_OPTIONAL_LOCKS=0, so evengit statusdoesn't refresh the index, and turns off external diff programs and the fsmonitor hook. - It never runs
git fetch. Ahead/behind counts are "as of your last fetch", and whygit tells you to rungit fetchyourself when that matters. - The test suite builds each state in a real repository, snapshots every file under
.git(names, timestamps and contents) before and after diagnosing, and checks nothing changed. It also checks that no other module in the package can start a process or write a file.
Credentials are never printed: a remote address like https://name:token@github.com/...
is shown as https://***@github.com/..., in every output.
Privacy
whygit collects nothing and makes no network calls. It reads your repository on your own computer and prints the result. That's all.
Licence
MIT. Copyright (c) 2026 Kameswara Sai Srikar Manda.
whygit MCP 질문
whygit MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add whygit -- uvx whygit를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
whygit MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
whygit가 제 저장소를 변경하나요?
아니요, strictly read-only 방식으로 작동하며 제안된 수정 사항을 절대 직접 실행하지 않으므로 사용자가 모든 제어권을 유지할 수 있습니다.
어떤 종류의 Git 에러를 설명할 수 있나요?
머지 충돌(merge conflicts), 리베이스 중단(rebase interruptions), detached HEAD 상태, 푸시 거부(rejected pushes), GitHub 로그인 실패, 대용량 파일 에러 등을 설명할 수 있습니다.
whygit 사용 시 데이터는 안전한가요?
네, 데이터를 수집하거나 네트워크 호출을 하지 않으며 사용자의 컴퓨터에서 로컬로 저장소를 읽기만 합니다.