Git Enhanced

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

Enhanced Git MCP Server - Code review, commit analysis, and branch management

已驗證STDIO僅桌面檔案與儲存開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為 AI 程式設計助理提供唯讀的 Git 脈絡,用於程式碼審查、提交分析、分支比較與發佈準備。

可以做什麼
檢查工作區、暫存區、分支、提交或指定路徑的差異,並以狀態工具彙整已暫存、未暫存與未追蹤的變更。依作者、日期範圍、分支、路徑與統計資訊篩選檢視提交歷史。列出分支、將分支與其基準比較,並提供已合併或過時分支的清理建議。分析單一提交的中繼資料、變更檔案、統計資訊與差異輸出。
適用情境
適合維護者與審查者讓助理回答日常儲存庫問題,例如某分支改了什麼、哪些提交應寫入發佈說明、分支是否落後於基準,而不必執行範圍過大的 shell 指令。
執行需求
以本機程序透過 stdio 執行。需要 Node.js 18 或更新版本,並需在 PATH 中安裝 Git。README 說明可從原始碼執行,發佈後也可透過 npx 執行。清單宣告了一個名為 YOUR_API_KEY 的必填密鑰環境變數,但 README 未說明其用途。
安裝前請注意
清單要求提供 API 密鑰環境變數,但 README 描述的是純本機、唯讀的伺服器,並未解釋該密鑰的用途,對此要求應保持警覺。此伺服器自稱唯讀,不提供刪除、重設、簽出、變基或推送工具,並會驗證 repoPath 指向 Git 儲存庫。僅適用於你掌控的本機儲存庫。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

MCP Git Enhanced

[CI] [License] [MCP]

MCP Git Enhanced is a Model Context Protocol server that helps AI coding assistants inspect repository state for day-to-day open-source maintenance.

It gives maintainers structured Git context for code review, commit analysis, branch comparison, and release preparation without asking the assistant to run broad shell commands.

Why Maintainers Use It

Open-source maintainers spend a lot of time answering the same repository questions before they can review or merge work:

  • What changed in this branch?
  • Which commits matter for the release notes?
  • Is this branch behind the base branch?
  • What is staged, unstaged, or untracked?
  • Which merged or stale branches need cleanup?

This server exposes those workflows as focused MCP tools so assistants can help with PR review, issue triage, release management, and repository hygiene.

Available Tools

ToolPurpose
git_diffAnalyze working tree, staged, branch, commit, or path-specific diffs.
git_logReview commit history with filters for author, date range, branch, path, and stats.
git_branchList branches, compare a branch to its base, or suggest cleanup candidates.
git_statusSummarize staged, unstaged, and untracked repository state.
git_commit_analyzeInspect one commit with metadata, changed files, statistics, and diff output.

Installation

From Source

bash
git clone https://github.com/davidweb3-ctrl/mcp-git-enhanced.gitcd mcp-git-enhancednpm installnpm run build

Claude Code Configuration

Use the built server from this repository:

json
{  "mcpServers": {    "git-enhanced": {      "command": "node",      "args": ["/absolute/path/to/mcp-git-enhanced/dist/index.js"]    }  }}

Future npm Install

The package is published as @davidweb3-ctrl/mcp-git-enhanced:

bash
npm install -g @davidweb3-ctrl/mcp-git-enhanced

After publication, clients can use:

json
{  "mcpServers": {    "git-enhanced": {      "command": "npx",      "args": ["@davidweb3-ctrl/mcp-git-enhanced"]    }  }}

Example Workflows

PR Review

text
Use git_diff to compare this branch with master and summarize the risky files.Use git_log to list commits since the last release.Use git_commit_analyze on the largest commit before I review it.

Issue Triage

text
Use git_log to find recent commits touching src/tools.ts.Use git_status to check whether the local reproduction has uncommitted changes.

Release Management

text
Use git_branch compare against master to prepare release notes.Use git_log with --stat style output to identify user-visible changes.Use git_branch suggest_cleanup after the release branch is merged.

Tool Examples

git_diff

json
{  "repoPath": "/absolute/path/to/repo",  "target": "HEAD~5",  "source": "HEAD~10",  "filePath": "src/",  "staged": false}

git_log

json
{  "repoPath": "/absolute/path/to/repo",  "maxCount": 20,  "author": "Maintainer Name",  "since": "1 week ago",  "stat": true}

git_branch

json
{  "repoPath": "/absolute/path/to/repo",  "action": "list",  "includeRemote": true}
json
{  "repoPath": "/absolute/path/to/repo",  "action": "compare",  "branchName": "feature/pr-review-summary",  "baseBranch": "master"}

git_status

json
{  "repoPath": "/absolute/path/to/repo",  "short": false}

git_commit_analyze

json
{  "repoPath": "/absolute/path/to/repo",  "commitHash": "abc123"}

Security Model

MCP Git Enhanced is designed as a read-oriented repository inspection server.

  • It runs fixed git subcommands through spawnSync without shell interpolation.
  • It does not expose destructive branch deletion, reset, checkout, rebase, push, or force-push tools.
  • It validates that repoPath points to a Git repository before executing tool handlers.
  • It is intended for local repositories controlled by the user or maintainer.

See SECURITY.md for reporting and supported-version details.

Development

bash
npm installnpm run buildnpm testnpm run lintnpm run format:check

Project Files

Requirements

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

License

MIT

來源:README.md,提交 6dda5c1

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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