Git Insights

v0.3.0
io.github.basitalisandhu/mcp-git-insights Checked 1 day ago Published 1 month ago

Read-only git statistics for a local repository: log, blame ownership, churn, authors, large files.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

repo_summary Summarise a repository

Return the repository's top-level path, current branch, HEAD commit (hash, author, date, subject), remotes with credential-free URLs, number of commits reachable from HEAD, number of tags and local branches, and the count of modified or untracked files in the work tree.

ParameterTypeDescription
repo *stringPath to the repository (any directory inside the work tree).

git_log List commits

List commits reachable from rev (default HEAD), newest first, with hash, short hash, author name and email, ISO date, subject and (optionally) the files touched. Filters: path, author (substring of name or email), since, until, grep (substring of the message), no_merges. limit is 1 to 500, default 50.

ParameterTypeDescription
repo *stringPath to the repository (any directory inside the work tree).
authorstring
grepstring
limitinteger
no_mergesboolean
pathstringLimit to this file or directory, relative to the repository root.
revstringBranch, tag, commit or HEAD~n. Default HEAD.
sincestringOnly commits after this date, in any form git accepts, for example 2026-01-01 or '3 months ago'.
untilstringOnly commits before this date.
with_filesbooleanInclude the list of files changed by each commit. Default false.

blame_summary Summarise blame for a file

Attribute every line of one file at rev (default HEAD) to its last author and return, per author, the number of lines, the percentage, and the most recent commit date; plus the total line count and the number of distinct commits involved. With ignore_whitespace, whitespace-only changes are attributed to the earlier author.

ParameterTypeDescription
path *stringFile path relative to the repository root.
repo *stringPath to the repository (any directory inside the work tree).
ignore_whitespaceboolean
revstringBranch, tag, commit or HEAD~n. Default HEAD.

churn Files changed most often

Rank files by how many commits touched them, with lines added and removed, over the commits reachable from rev (default HEAD) and optionally limited by since, until and path. Renames are followed and reported under the newest name. Binary files count commits but not lines. limit is 1 to 200, default 25. Also returns the number of commits examined.

ParameterTypeDescription
repo *stringPath to the repository (any directory inside the work tree).
limitinteger
max_commitsintegerCap on commits examined. Default 5000.
pathstringLimit to this file or directory, relative to the repository root.
revstringBranch, tag, commit or HEAD~n. Default HEAD.
sincestringOnly commits after this date, in any form git accepts, for example 2026-01-01 or '3 months ago'.
untilstringOnly commits before this date.

authors Commits per author

Count commits per author (grouped by email) over the commits reachable from rev (default HEAD), optionally limited by since, until and path, with each author's first and last commit dates. Merge commits are excluded unless include_merges is true.

ParameterTypeDescription
repo *stringPath to the repository (any directory inside the work tree).
include_mergesboolean
limitintegerDefault 50.
pathstringLimit to this file or directory, relative to the repository root.
revstringBranch, tag, commit or HEAD~n. Default HEAD.
sincestringOnly commits after this date, in any form git accepts, for example 2026-01-01 or '3 months ago'.
untilstringOnly commits before this date.

large_files Largest files

List the largest blobs in the tree at rev (default HEAD) with their paths and sizes in bytes. With include_history, instead scan every object reachable from any ref (git rev-list --objects --all piped to cat-file --batch-check) and report the largest blobs ever committed, including ones no longer in the tree, which is what makes a clone big. limit is 1 to 100, default 20.

ParameterTypeDescription
repo *stringPath to the repository (any directory inside the work tree).
include_historyboolean
limitinteger
revstringBranch, tag, commit or HEAD~n. Default HEAD.