Skip to main content
Glama

mcp-git-insights

CI npm License: MIT

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

repo_summary

Branch, HEAD, tracking, dirty file count, remotes, recent commits, top contributors.

git_log

Commits filtered by ref/range, path (with follow), author, dates, message text.

git_show

One commit with stats and patch (size-capped).

git_diff

Between two revisions or working tree; stat_only for overview.

git_blame

Per-line author/date/commit for up to 200 lines.

changelog

Release notes grouped by Conventional Commit type, breaking changes first.

code_owners

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_log and changelog with a path, a ref range or dates.

  • Patches are capped. git_show and git_diff return at most max_chars (30,000 by default, 200,000 at most) and say so when they cut. git_log returns at most 200 commits per call, git_blame at 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_blame and changelog stop at the shallow boundary, so release notes from an older tag can be incomplete or fail to find the tag.

  • changelog relies 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

MIT

Available Tools

7 tools
changelogGenerate changelogB
Read-onlyIdempotent

Group commits between two refs by Conventional Commit type (feat, fix, perf, ...) into Markdown release notes.

Inputs: from (required), to, repo.

code_ownersCode ownersA
Read-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_blameBlameC
Read-onlyIdempotent

Who last changed each line of a file (max 200 lines per call).

Inputs: path (required), rev, repo, end_line, +1 more.

git_diffDiffB
Read-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 logA
Read-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 commitB
Read-onlyIdempotent

Show one commit: message, stats and (optionally) the patch.

Inputs: rev, path, repo, patch, +1 more.

repo_summaryRepository summaryB
Read-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

    A3.5/5.0

    Scored across 7 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables 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.
      6
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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