About Git Insights
Git Insights is a read-only statistics MCP server for developers examining a local Git repository. It summarizes history, blame ownership, churn, authors and large files without fetching or changing repository data.
Key features
- 01Summarize repository state
- 02Filter and inspect commit history
- 03Measure file ownership and churn
- 04Count commits by author
- 05Find large files in trees or history
Use cases
- 01Review recent repository activity
- 02Identify frequently changed files
- 03Inspect contribution patterns by author
- 04Find large historical blobs
MCP support
Exposes read-only repository analysis tools to MCP clients over stdio, including `repo_summary`, `git_log`, `blame_summary`, `churn`, `authors` and `large_files`.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
docker run -i --rm ghcr.io/basitalisandhu/mcp-git-insights:0.3.0Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
ghcr.io/basitalisandhu/mcp-git-insights:0.3.0stdioTools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEgit-insights MCP server
Read-only statistics for a local git repository: log, blame ownership, churn, authors and large files. Every command is spawned without a shell from a fixed argument list, with validated paths and revisions, a 20 s timeout, an output cap and GIT_OPTIONAL_LOCKS=0. Nothing is written, fetched or checked out.
Part of dev-mcp-servers. Stdio transport only; the server never opens a port.
Tools
| Tool | Input | What it returns |
|---|---|---|
repo_summary | repo | Top level, branch, HEAD commit, remotes (credentials stripped from URLs), commit, tag and branch counts, modified and untracked file counts. |
git_log | repo, rev?, limit? (1 to 500), path?, author?, since?, until?, grep?, no_merges?, with_files? | Commits newest first with hash, author, ISO date, subject and optionally the files touched. |
blame_summary | repo, path, rev?, ignore_whitespace? | Lines, percentage and latest commit per author for one file. |
churn | repo, rev?, since?, until?, path?, limit?, max_commits? | Files ranked by commits touching them with lines added and removed; renames are followed to the current name. |
authors | repo, rev?, since?, until?, path?, include_merges?, limit? | Commits per author (by email) with first and last commit dates. |
large_files | repo, rev?, limit?, include_history? | Largest blobs in a tree, or across all history (what makes a clone big). |
Install
Claude Code:
claude mcp add git-insights -- docker run --rm -i -v "$PWD:/repo:ro" ghcr.io/basitalisandhu/mcp-git-insights:0.2.2
Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):
{
"mcpServers": {
"git-insights": {
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "/path/to/your/project:/repo:ro", "ghcr.io/basitalisandhu/mcp-git-insights:0.2.2"]
}
}
}
Pin the version as shown so that an update cannot change what runs in your editor without you noticing. Mount the repository at /repo; the image trusts only that path. The package is not on npmjs.com yet, so npx does not work; see the repository README for GitHub Packages npm. From a checkout, use "command": "node", "args": ["<path>/packages/git-insights/dist/index.js"] after npm install && npm run build at the repository root.
What it touches
- Network: None.
gitis run withGIT_TERMINAL_PROMPT=0; no command that contacts a remote is on the allowlist. - Local files: Runs
git rev-parse,log,blame,ls-tree,rev-list,cat-file,status,remote,tagandbranchin the repository you name. Revisions must match[A-Za-z0-9._/^~-]without..; paths must be relative without..; free-text filters may not start with-. - Telemetry: none.
Notes
- The server does not restrict which repository paths may be read; run it under an account that should be able to read them.
- Requires
gitonPATH.
Build and test
npm install # at the repository root
npm run build -w @basitalisandhu/mcp-git-insights
npm test -w @basitalisandhu/mcp-git-insights
Tests use node:test and the SDK's in-memory transport; they do not reach the network.
Licence
MIT. See LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.