
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


