Git Insight MCP

Git Insight MCP

Semantic git queries via MCP. Beyond git log — answer who/what/why about any line, file, or branch with blame, co-change, PR linkage.

Category
Visit Server

README

<p align="center"> <img src="assets/logo.png" alt="git-insight-mcp" width="200" /> </p>

git-insight-mcp

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": "alice@x.com", "lines": 87, "commits": 12, "last_commit_date": "2026-04-12T10:33:01.000Z" },
    { "name": "bob", "email": "bob@x.com", "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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured