
Git Insights
io.github.basitalisandhuv0.1.1更新于 Oct 5, 2026
Read-only git statistics for a local repository: log, blame ownership, churn, authors, large files.
概览
对本地仓库进行只读的 git 统计:日志、blame 归属、改动频率、作者和大文件。
- 功能
- 针对你指定的仓库提供只读的 git 统计。工具包括 repo_summary(分支、HEAD、已去除凭据的远程地址、各类计数)、git_log(提交的哈希、作者、日期、标题及可选文件列表)、blame_summary(单个文件每位作者的行数与最近提交)、churn(按提交次数排序的文件及增删行数)、authors(按邮箱统计提交数及首末提交日期)和 large_files(某个树或全部历史中最大的 blob)。命令不经 shell、以固定参数列表执行,路径与修订号经过校验,并有 20 秒超时和输出上限。
- 适用场景
- 适合让助手在不改动仓库的前提下查看本地仓库的历史与归属:查看某几行由谁编写、找出改动频繁的热点文件,或了解是什么让克隆体积变大。
- 运行要求
- 以 stdio 运行的本地进程,需要 PATH 中有 git。可通过 npx 安装(请固定版本),或用 docker 运行容器镜像。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Git Insights,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
git-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
Install
Claude Code:
Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):
Pin the version as shown so that an update to the package cannot change what runs in your editor without you noticing. 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
Tests use node:test and the SDK's in-memory transport; they do not reach the network.
Licence
MIT. See LICENSE.
来源:packages/git-insights/README.md,提交 58c8c95
工具
0版本历史
1- v0.1.1最新Oct 5, 2026


