Command Palette

Search for a command to run...

UnylyUnyly
Browse all

HasanJahidul/git-insight-mcp

FreeNot checked

Semantic git queries beyond git log: who-touched (blame grouped by author with primary owner), introducing-PR, co-change suggestions, branch hygiene (ahead/behi

GitHubEmbed

About

Semantic git queries beyond git log: who-touched (blame grouped by author with primary owner), introducing-PR, co-change suggestions, branch hygiene (ahead/behind/stale), recent-work standup, and full commit context. Local git plus optional GitHub API for PR and issue linkage.

README

git-insight-mcp

git-insight-mcp

git-insight-mcp MCP server CI npm version License: MIT

Semantic git queries via MCP. Beyond git log — answer who/what/when/why about any line, file, or branch.

demo

Pairs with terminal-history-mcp and localhost-mcp. Together: what you ran, what's running, what you changed.

Why

Devs ask these constantly; git answers poorly:

  • "Who last touched this function?" — git blame only gives lines, not authors-by-region
  • "What PR introduced this line?" — manual: blame → commit SHA → search GH
  • "Which files always change together?" — no built-in
  • "Show unmerged branches older than 30 days" — bash one-liner gymnastics
  • "What did I work on last week?" — manual log scrub

LLM agents need this context to make safe edits. Currently they git log -n 5 and miss everything.

Install

npm install -g git-insight-mcp

Wire into Claude Code:

claude mcp add --scope user git-insight -- git-insight-mcp

Or any MCP-compatible client. Runs as a stdio MCP server.

For PR / issue lookups, set a GitHub token:

export GH_TOKEN=ghp_...

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

Tools

Tool Purpose
who_touched Group blame by author. Lines, commits, last-touched, primary owner. Optional line-range narrowing.
introducing_pr Find the PR that introduced a line (or commit). Parses merge messages first; falls back to GitHub API.
co_change Files most often changed together with the input file.
branch_hygiene List branches with 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.

Sample output (who_touched)

{
  "file": "src/auth.ts",
  "total_lines": 124,
  "authors": [
    { "name": "alice", "email": "[email protected]", "lines": 87, "commits": 12, "last_commit_date": "2026-04-12T10:33:01.000Z" },
    { "name": "bob", "email": "[email protected]", "lines": 37, "commits": 4, "last_commit_date": "2026-01-03T18:14:55.000Z" }
  ],
  "primary_owner": "alice"
}

CLI usage (sanity checks)

git-insight-mcp who-touched src/auth.ts
git-insight-mcp co-change src/auth.ts
git-insight-mcp branches
git-insight-mcp recent alice
git-insight-mcp commit a3e577e
git-insight-mcp intro-pr src/auth.ts:42
git-insight-mcp intro-pr a3e577e
git-insight-mcp                # MCP stdio server

Build from source

git clone https://github.com/HasanJahidul/git-insight-mcp.git
cd git-insight-mcp
npm install
npm run build
node dist/cli.js branches

Limits (v0.1)

  • GitHub only (no GitLab/Bitbucket yet).
  • co_change is O(window × files-per-commit) — defaults capped at 1000 commits.
  • Function-level blame is by line range, not AST. Renames not yet tracked.
  • GH API rate limit applies (5000/h authed). PR results uncached this version.

License

MIT

from github.com/HasanJahidul/git-insight-mcp

Install HasanJahidul/git-insight-mcp in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install hasanjahidul-git-insight-mcp

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add hasanjahidul-git-insight-mcp -- npx -y git-insight-mcp

FAQ

Is HasanJahidul/git-insight-mcp MCP free?

Yes, HasanJahidul/git-insight-mcp MCP is free — one-click install via Unyly at no cost.

Does HasanJahidul/git-insight-mcp need an API key?

No, HasanJahidul/git-insight-mcp runs without API keys or environment variables.

Is HasanJahidul/git-insight-mcp hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install HasanJahidul/git-insight-mcp in Claude Desktop, Claude Code or Cursor?

Open HasanJahidul/git-insight-mcp on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare HasanJahidul/git-insight-mcp with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs