Git

io.github.rog0x由 GitHub 帳號 rog0x 發布v1.0.1更新於 Oct 24, 2026

Git log, diff, blame, branch stats for AI agents

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 AI 助理檢視 Git 儲存庫:提交歷史、差異、逐行歸屬、分支狀態與活動統計。

可以做什麼
依作者、日期範圍與檔案路徑篩選讀取提交歷史,並比較參照,回傳結構化差異摘要或僅統計。檢視檔案的逐行作者資訊,可限定行範圍或指定提交。彙總儲存庫活動:提交數、主要貢獻者、變動最多的檔案與時間趨勢。列出分支及其最後提交資訊、領先/落後數量與已合併或未合併狀態。
適用情境
適合讓助理分析本機儲存庫的歷史、檢視分支或提交之間的變動、查明某幾行最後由誰修改,或在不呼叫託管平台 API 的情況下快速了解儲存庫活躍度。
執行需求
以本機程序透過 stdio 執行,來自 npm 套件 @rog0x/mcp-git-tools。需要 Node.js 18 或更新版本,以及已安裝並在 PATH 中的 Git。每次工具呼叫需提供儲存庫的絕對路徑。未宣告驗證、API 金鑰或環境變數。
安裝前請注意
這些工具會讀取本機儲存庫,助理因此可看到提交歷史、差異與逐行歸屬中的檔案內容,以及作者姓名與電子郵件。只指向你願意讓模型看到的儲存庫。README 僅列出讀取類分析工具,未描述寫入、推送或刪除操作。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Git,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-git-tools

Git repository analysis tools for AI agents, served over MCP (Model Context Protocol). Analyzes local repositories using native git commands — no GitHub API required.

Tools

ToolDescription
git_logGet commit history with filtering by author, date range, and file path
git_diffShow diff between commits, branches, or tags with change summaries
git_blameShow who last modified each line of a file with commit info
git_statsRepository statistics: commits, contributors, activity over time, most changed files
git_branchList branches with last commit info, ahead/behind counts, merged/unmerged status

Prerequisites

  • Node.js >= 18
  • Git installed and available in PATH

Setup

bash
npm installnpm run build

Configuration

Add to your MCP client configuration:

json
{  "mcpServers": {    "git-tools": {      "command": "node",      "args": ["D:/products/mcp-servers/mcp-git-tools/dist/index.js"]    }  }}

Tool Details

git_log

Retrieve recent commit history with optional filters.

Parameters:

  • repoPath (required) — Absolute path to the Git repository
  • count — Number of commits to return (default: 20)
  • author — Filter by author name or email
  • since / until — Date range filters
  • path — Filter to commits touching a specific file or directory

git_diff

Compare two refs and get a structured summary of changes.

Parameters:

  • repoPath (required) — Absolute path to the Git repository
  • from — Start ref (default: HEAD~1)
  • to — End ref (default: HEAD)
  • path — Limit diff to a specific file or directory
  • summaryOnly — Return only stats without full diff text

git_blame

See line-by-line authorship of a file.

Parameters:

  • repoPath (required) — Absolute path to the Git repository
  • filePath (required) — File path relative to repo root
  • startLine / endLine — Blame a specific line range
  • ref — Blame at a specific commit

git_stats

Get a high-level overview of repository activity.

Parameters:

  • repoPath (required) — Absolute path to the Git repository
  • topAuthors — Number of top contributors to list (default: 10)
  • topFiles — Number of most-changed files to list (default: 10)

git_branch

List and analyze branches.

Parameters:

  • repoPath (required) — Absolute path to the Git repository
  • baseBranch — Branch to compare against (default: main or master)
  • includeRemote — Include remote-tracking branches
  • mergedOnly / unmergedOnly — Filter by merge status

License

MIT

來源:README.md,提交 d7330b0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分