MCP server for semantic git queries. Walks the local `git` CLI plus optional GitHub API. Local-first; GH token only needed for PR/issue linkage.
## Why
`git` answers these poorly:
- "Who last touched this function?" — `git blame` only gives lines
- "What PR introduced this line?" — manual blame → SHA → search GH
- "Which files always change together?" — no built-in
- "Show unmerged branches older than 30 days" — bash gymnastics
- "What did I work on last week?" — manual log scrub
LLM agents need this context to make safe edits.
## Tools
| Tool | Purpose |
|------|---------|
| `who_touched` | Group blame by author. Lines, commits, last-touched, primary owner. |
| `introducing_pr` | Find PR that introduced a line or commit. Merge-msg parse + GH API fallback. |
| `co_change` | Files most often changed together with the input file. |
| `branch_hygiene` | Branches w/ ahead/behind, last commit, merged status, stale flag. |
| `recent_work` | Standup helper: author's commits + files + ins/del in a window. |
| `commit_context` | Full commit context: subject, body, files, PR, related issues. |
## Install
```bash
npm install -g git-insight-mcp
claude mcp add --scope user git-insight -- git-insight-mcp
サーバー設定
{
"mcpServers": {
"git-insight": {
"command": "git-insight-mcp"
}
}
}