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?", "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+.

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: pastcode

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.

All tools are annotated readOnlyHint. Commit messages and file contents are untrusted input for the model.

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

6 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.

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 6 tools

    Disambiguation4/5

    Each tool maps to a distinct git inspection verb (diff, blame, log, show, changelog, repo overview), so an agent can pick correctly most of the time. Mild overlap exists: repo_summary includes recent commits and top contributors that git_log also surfaces, and changelog derives from commits that git_log can list, but descriptions make the intended split reasonably clear.

    Naming Consistency4/5

    Four tools follow a clean git_<operation> prefix (git_diff, git_blame, git_log, git_show), while changelog and repo_summary drop the prefix. The deviation is minor and all names remain snake_case, lowercase, and descriptive of their action.

    Tool Count5/5

    Six tools is tightly scoped for a read-only git insights server; each tool covers a distinct inspection need (changes, authorship, history, single commit, release notes, repo state) with no filler.

    Completeness4/5

    Core read-only workflows (diff, log, blame, show, changelog, repo overview) are covered and interconnected. Gaps remain around ref/file exploration: no branch or tag listing, no file tree/listing, and no staged (--cached) diff option, though agents can partially work around these via git_log and git_diff.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding agents to read and investigate git history through MCP, including blame, diffs, old file versions, and automated bisect to find when a bug was introduced.
      7 npm
      MIT
    • 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