# HasanJahidul/git-insight-mcp [Health: Active]

**Category:** 🔄 Version Control  
**Repository:** https://github.com/HasanJahidul/git-insight-mcp  
**GitHub Stars:** 2  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hasanjahidul-git-insight-mcp

## Description
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.

## Claude Desktop Quick Installation
Install path inferred — verify against the README before running it. Uses `npx` (confidence: medium):

```json
"mcpServers": {
  "git-insight-mcp": {
    "command": "npx",
    "args": ["-y","git-insight-mcp"]
  }
}
```

## Documentation

## What HasanJahidul/git-insight-mcp MCP server does

HasanJahidul/git-insight-mcp MCP server gives an MCP-compatible client structured answers about repository history and branch state. Its queries operate on local Git data and cover authorship, commit relationships, branch hygiene, recent activity, and files that tend to change together.

The server is intended for questions such as who last worked on a region of a file, which commit introduced a line, which branches are stale or unmerged, and what a contributor changed during a time window. With a GitHub token, it can also associate commits with pull requests and related issues. Without that token, the local Git features remain available.

## How it works

The project runs as a local stdio MCP server. An MCP client starts the `git-insight-mcp` executable, and the server reads the repository’s local history to answer tool requests. It is not limited to the most recent few commits: several tools derive results from blame data, commit windows, branch comparisons, and commit metadata.

For introducing pull requests, the server first examines merge-message information and can fall back to the GitHub API. GitHub access is limited to GitHub repositories; GitLab and Bitbucket are not supported. Pull-request results are not cached in the current version, so API rate limits apply. An authenticated GitHub API limit is documented as 5,000 requests per hour.

## Setup and configuration

Install the package globally with npm:

```bash
npm install -g git-insight-mcp
```

A Claude Code configuration can start it with:

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

Other MCP-compatible clients can launch the same executable as a stdio server. Set `GH_TOKEN` when pull-request or issue lookups are needed. The token is optional for local Git queries.

The repository can also be built from source by cloning it, running `npm install`, running `npm run build`, and invoking the resulting CLI under `dist/cli.js`.

## Tools and capabilities

- `who_touched` groups blame results by author and reports line counts, related commits, last-touch dates, and a primary owner. It accepts an optional line range.
- `introducing_pr` looks for the pull request associated with a line or commit, using merge messages before consulting GitHub.
- `co_change` finds files most frequently changed alongside a selected file.
- `branch_hygiene` reports ahead and behind counts, the last commit, merged state, and whether branches are stale.
- `recent_work` summarizes an author’s commits, files, and insertions or deletions over a selected period.
- `commit_context` returns commit subject and body, changed files, pull-request information, and related issues.

The command-line interface also exposes sanity-check commands such as `who-touched`, `co-change`, `branches`, `recent`, `commit`, and `intro-pr`.

## Limitations and notes

`co_change` can be expensive because its work scales with the commit window and the number of files per commit; the default history window is capped at 1,000 commits. Function-level ownership is approximated using line ranges rather than an AST, and renames are not tracked yet.

GitHub linkage requires the optional token and is subject to API limits. The current release supports GitHub only for remote repository metadata. HasanJahidul/git-insight-mcp MCP server is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/hasanjahidul-git-insight-mcp/readme_

