
Git
io.github.rog0x由 GitHub 账号 rog0x 发布v1.0.1更新于 Oct 24, 2026
Git log, diff, blame, branch stats for AI agents
概览
一个本地 MCP 服务器,让 AI 助手查看 Git 仓库:提交历史、差异、逐行归属、分支状态和活动统计。
- 可以做什么
- 按作者、日期范围和文件路径筛选读取提交历史,并比较引用,返回结构化差异摘要或仅统计。查看文件的逐行作者信息,可限定行范围或指定提交。汇总仓库活动:提交数、主要贡献者、改动最多的文件和时间趋势。列出分支及其最后提交信息、领先/落后数量和已合并或未合并状态。
- 适用场景
- 适合让助手分析本地仓库的历史、查看分支或提交之间的改动、查明某几行最后由谁修改,或在不调用托管平台 API 的情况下快速了解仓库活跃度。
- 运行要求
- 以本地进程通过 stdio 运行,来自 npm 包 @rog0x/mcp-git-tools。需要 Node.js 18 或更高版本,以及已安装并在 PATH 中的 Git。每次工具调用需提供仓库的绝对路径。未声明认证、API 密钥或环境变量。
安装
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
Prerequisites
- Node.js >= 18
- Git installed and available in PATH
Setup
Configuration
Add to your MCP client configuration:
Tool Details
git_log
Retrieve recent commit history with optional filters.
Parameters:
repoPath(required) — Absolute path to the Git repositorycount— Number of commits to return (default: 20)author— Filter by author name or emailsince/until— Date range filterspath— 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 repositoryfrom— Start ref (default: HEAD~1)to— End ref (default: HEAD)path— Limit diff to a specific file or directorysummaryOnly— 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 repositoryfilePath(required) — File path relative to repo rootstartLine/endLine— Blame a specific line rangeref— Blame at a specific commit
git_stats
Get a high-level overview of repository activity.
Parameters:
repoPath(required) — Absolute path to the Git repositorytopAuthors— 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 repositorybaseBranch— Branch to compare against (default: main or master)includeRemote— Include remote-tracking branchesmergedOnly/unmergedOnly— Filter by merge status
License
MIT
来源:README.md,提交 d7330b0
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分