提交

Git Insight Mcp

@HasanJahidul

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
概览

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.

demo

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

ToolPurpose
who_touchedGroup blame by author. Lines, commits, last-touched, primary owner.
introducing_prFind PR that introduced a line or commit. Merge-msg parse + GH API fallback.
co_changeFiles most often changed together with the input file.
branch_hygieneBranches w/ ahead/behind, last commit, merged status, stale flag.
recent_workStandup helper: author's commits + files + ins/del in a window.
commit_contextFull commit context: subject, body, files, PR, related issues.

Install

npm install -g git-insight-mcp
claude mcp add --scope user git-insight -- git-insight-mcp

For PR/issue lookups:

export GH_TOKEN=ghp_...

Without a token, local-git tools still work; PR linkage is skipped.

Pairs with

License: MIT

服务器配置

{
  "mcpServers": {
    "git-insight": {
      "command": "git-insight-mcp"
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.