mcp-git-insights
A read-only Git history and code-archaeology server for MCP clients — it answers "who changed this, why, and who should review it?" without ever giving the model a shell.
repo_summary— current branch, HEAD, tracking, dirty file count, remotes, recent commits and top contributors.git_log— commits filtered by ref/range, path (withfollowfor renames), author, dates or message text; up to 200 per call.git_show— one commit's message and stats, plus the patch capped bymax_chars.git_diff— compare two revisions, or the working tree against HEAD;stat_onlyfor a quick overview.git_blame— per-line author/date/commit for a file (max 200 lines, optional start/end line).code_owners— rank authors by commits and lines changed under a path, with first and last change dates, to find likely reviewers.changelog— Markdown release notes between two refs, grouped by Conventional Commit type with breaking changes first.Safety by design — read-only annotated, sandboxed to
--rootfolders, symlink-escape and option-injection resistant, credentials redacted; no binary diffs, no submodule traversal, 20 s / 8 MB per-call limits.
Provides read-only Git history and code archaeology tools: repository summary, filtered commit log, commit inspection, diffs, blame, and Conventional Commit changelogs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-git-insights who last changed the retry logic in src/api.ts and why?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-git-insights
Read-only Git history and code archaeology for MCP clients. Ask "who changed this and why?", "who should review this folder?", "what shipped since v1.4?", "summarise this branch" — without giving the model a shell.
Cannot modify anything. Only read commands are ever run, with
--no-ext-diff --no-textconv, no pager, no prompts, no system config.Sandboxed to folders you choose.
--root(repeatable). Symlinks are resolved, so a link pointing outside the root is refused.Injection-proof arguments. Refs and dates cannot start with
-; paths go after--and must stay inside the repo; free-text filters use the attached--author=…form.Credentials redacted from remote URLs.
Uses your installed
git. No native dependencies. Node.js 22+. Tested in CI on Linux, macOS and Windows with Node 22 and 24.
Quick start
{
"mcpServers": {
"git": { "command": "npx", "args": ["-y", "@aranshayan/mcp-git-insights", "--root", "/path/to/your/projects"] }
}
}Claude Code: claude mcp add git -- npx -y @aranshayan/mcp-git-insights --root "$PWD"
Related MCP server: git-insights-mcp
Tools
Tool | Description |
| Branch, HEAD, tracking, dirty file count, remotes, recent commits, top contributors. |
| Commits filtered by ref/range, path (with |
| One commit with stats and patch (size-capped). |
| Between two revisions or working tree; |
| Per-line author/date/commit for up to 200 lines. |
| Release notes grouped by Conventional Commit type, breaking changes first. |
| Who knows a file or folder best: authors ranked by commits and lines changed, with first and last change dates. |
All tools are annotated readOnlyHint. Commit messages and file contents are untrusted input for the model.
Limits
Time and size per call. Each git command is stopped after 20 seconds. Output is read up to 8 MB; past that it is cut off without a note, so on very large repositories narrow
git_logandchangelogwith a path, a ref range or dates.Patches are capped.
git_showandgit_diffreturn at mostmax_chars(30,000 by default, 200,000 at most) and say so when they cut.git_logreturns at most 200 commits per call,git_blameat most 200 lines.Binary files are not shown. Diffs only report that they changed, because external diff and textconv drivers are turned off on purpose.
Submodules are not entered. A diff shows the submodule's old and new commit, and other tools see only the parent repository.
Shallow clones only have the history that was fetched.
git_log,git_blameandchangelogstop at the shallow boundary, so release notes from an older tag can be incomplete or fail to find the tag.changelogrelies on Conventional Commit prefixes (feat:,fix:...). Commits without one are listed under "Other changes", and merge commits are skipped.
Tests
npm test builds throw-away repositories and checks every tool, option-injection attempts (--output=…), path traversal, symlink escape, non-repos, and the built CLI over stdio.
License
Available Tools
7 toolschangelogGenerate changelogBRead-onlyIdempotent
Group commits between two refs by Conventional Commit type (feat, fix, perf, ...) into Markdown release notes.
Inputs: from (required), to, repo.
code_ownersCode ownersARead-onlyIdempotent
Who knows a file or folder best: authors ranked by commits and lines changed under a path, with the dates of their first and last change. Merge commits are skipped.
Inputs: rev, path, repo, limit, +2 more.
git_blameBlameCRead-onlyIdempotent
Who last changed each line of a file (max 200 lines per call).
Inputs: path (required), rev, repo, end_line, +1 more.
git_diffDiffBRead-onlyIdempotent
Diff between two revisions (or the working tree against HEAD when base is omitted). Use stat_only for a quick overview.
Inputs: base, head, path, repo, +2 more.
git_logCommit logARead-onlyIdempotent
List commits, optionally filtered by path, author, date range or message text. Use follow=true with a single file to track renames.
Inputs: ref, grep, path, repo, +5 more.
git_showShow commitBRead-onlyIdempotent
Show one commit: message, stats and (optionally) the patch.
Inputs: rev, path, repo, patch, +1 more.
repo_summaryRepository summaryBRead-onlyIdempotent
Current branch, HEAD, working-tree state, remotes, recent commits and top contributors.
Inputs: repo.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct git read operation: log (listing/filtering commits), show (one commit detail), diff (patch between refs), blame (line-level authorship), code_owners (aggregated author ranking), changelog (grouped release notes), and repo_summary (repo state). There is mild conceptual overlap between git_show/git_diff (both can surface a patch) and between changelog/git_log (both traverse commits), but the descriptions make the boundaries clear enough for reliable selection.
All names are snake_case and noun-oriented (git_log, git_diff, repo_summary), which is readable and predictable. The only inconsistency is that four tools carry a git_ prefix while code_owners, changelog, and repo_summary do not, a minor deviation rather than a real convention clash.
Seven tools is a tight, well-scoped surface for a git insights/analysis server. Each tool covers a distinct analytical need, and there is no redundancy or filler.
The set covers commit history, single-commit inspection, diffs, blame, ownership, changelogs, and repo state — the core of a read-only git analysis workflow. Minor gaps remain, such as retrieving a file's contents at a specific revision or searching for text/string changes across history (git grep style), which agents may need to work around.
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Plain-English git for agents: 22 tools to branch, commit, push and tag. Free tier.
Search, read and explain your GitHub repositories: code, symbols, imports, history and ownership.
Query your team's AI coding history and act on HypAware recommendations from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search commits, retrieve diffs, and inspect file change history in a Git repository using MCP.52 npmMIT
- AlicenseAqualityBmaintenanceEnables AI clients to interrogate a local Git repository's history, surfacing change hotspots, per-author activity, files that change together, single-file commit history, and draft changelogs between refs. It is strictly read-only, requires no API keys, and returns structured data for the client to interpret.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to inspect local Git repositories through five focused, read-only tools for repository trees, literal text search, numbered file reads, bounded git diffs, and project summaries while confining paths, skipping secret-like and binary files, and enforcing output limits.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients such as Claude and Cursor to inspect local git repositories, read recent commits and uncommitted changes, list repos, and draft daily standup updates from that activity.23 npmMIT