gitlog-mcp
🔍 gitlog-mcp
赋予你的 AI 编程助手超强的 Git 历史理解能力。
gitlog-mcp 是一个基于模型上下文协议(MCP)的服务器,让 AI 助手(如 Claude Code、Cursor、Windsurf 以及任何 MCP 客户端)能够理解仓库中的变更历史——自动生成变更日志、分析提交、定位责任人并草拟发布说明。
“这个仓库发生了什么变化?”是所有 AI 助手都会答错的问题。这个工具解决了它。
为什么存在这个工具
AI 编程助手在编写代码方面很出色,但在了解代码库的历史方面却声名狼藉。它们会凭空编造变更日志、错误定位责任人并胡乱猜测发布说明。gitlog-mcp 为它们提供了一个可靠、结构化的 git log 窗口——让它们的答案基于实际发生的事情,而非臆想。
Related MCP server: Continuum
功能
📝 自动变更日志 — 从任意标签/提交范围生成清晰分组的变更日志
🔎 提交分析 — 解释变更发生的原因,而不仅仅是内容
👤 责任定位 — 谁、在何时、修改了哪些内容(附上下文)
🏷️ 发布说明 — 根据标签间的差异草拟发布说明
📊 仓库健康度 — 提交频率、主要贡献者、代码变更热点
🧱 零运行时依赖 — 纯 Python 标准库 + MCP SDK,仅一个文件
快速开始
# 1. Install from PyPI
pip install gitlog-mcp
# 2. Run standalone (for testing) — defaults to the current directory
gitlog-mcp
gitlog-mcp --repo /path/to/your/repo
# 3. Or add directly to your agent's MCP config (see below)想要本地 Web 仪表板吗?这是一个可选附加功能,默认不会安装:
pip install "gitlog-mcp[ui]"。仅安装pip install gitlog-mcp则一如既往地保持零依赖。
从源码安装(适用于贡献者):
git clone https://github.com/ManiaSacha/gitlog-mcp.git && cd gitlog-mcp && pip install -e .— 详情请见 CONTRIBUTING.md。
Claude Code 配置
{
"mcpServers": {
"gitlog": {
"command": "gitlog-mcp",
"args": ["--repo", "."]
}
}
}Cursor 配置 (.cursor/mcp.json)
{
"mcpServers": {
"gitlog": {
"command": "gitlog-mcp",
"args": ["--repo", "."]
}
}
}Windsurf 配置
{
"mcpServers": {
"gitlog": {
"command": "gitlog-mcp",
"args": ["--repo", "."]
}
}
}独立调试
想在实际接入助手之前直接试用工具?MCP Inspector 提供了一个界面,让你可以手动调用每个工具:
npx @modelcontextprotocol/inspector gitlog-mcp --repo .示例助手提示
“生成
v1.2.0到v1.3.0之间所有变更的变更日志。”
“谁引入了
src/parser.py中这一有问题的代码行,原因是什么?”
“根据最近的提交,为下一版本草拟发布说明。”
公开的工具
工具 | 描述 |
| 为提交/标签范围生成分组的变更日志 |
| 解释特定提交的意图和影响 |
| 针对文件的行级责任定位 |
| 在两个标签之间草拟发布说明 |
| 贡献者 + 变更量总结 |
| 按消息/作者/日期搜索提交 |
Web 仪表板(可选)
更喜欢浏览器而非终端?gitlog-mcp-ui 在 MCP 工具所使用的相同 Git 读取代码基础上,提供一个本地小型仪表板——相同的数据,人类可读的格式。
pip install "gitlog-mcp[ui]"
gitlog-mcp-ui --repo /path/to/repo这会打印一个 URL(默认是 http://127.0.0.1:8765)——在浏览器中打开它;它不会自动为你打开。
视图 | 显示内容 |
变更日志 | 提交范围选择器( |
仓库健康度 | 贡献者统计、提交总数 |
责任定位 | 针对每个文件、每行的归属信息 |
只读——没有任何写入操作。设计上仅限本地访问:只绑定到 127.0.0.1(没有 --host 标志,因此即使意外也无法暴露到网络),并且还会验证每个请求的 Host 头,弥补仅靠回环绑定无法阻止的 DNS 重绑定漏洞。无需身份验证,因为除了你自己的机器,没有人能访问它。
这是一个可选附加功能(pip install gitlog-mcp[ui]),默认不会安装。核心的 gitlog-mcp 服务器除了 MCP SDK 外零运行时依赖,这一点毋庸置疑——仪表板不会改变这一事实。它使用标准库中的 http.server,没有框架,没有额外的自身依赖。
架构
gitlog-mcp (single file, ~300 lines)
├── FastMCP server (stdio transport)
├── GitRunner — thin wrapper over `git` CLI
└── Tools — each maps to a git subcommand + parsing刻意保持小巧。你可以在一个下午内阅读完整个代码——这本身就是一个特性。
贡献
欢迎提交 PR。只接受小型、专注且经过充分测试的变更。详情请见 CONTRIBUTING.md。
发布流程和版本管理在 RELEASING.md 中有文档说明。
路线图
从当前工作目录自动检测
--repo所有工具支持结构化 JSON 输出
GitHub/GitLab 远程集成
测试 + CI 徽章
许可证
MIT © 2026 — 为开源社区而建,公开开发。
为这个仓库加星,如果你想告别 AI 助手胡乱编造变更日志的烦恼。⭐
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAI-powered Git workflow intelligence — 10 tools for commit messages, branch naming, PR descriptions, changelogs, and stream-based context management. Works with Cursor, Claude Desktop, Windsurf, VS Code, and all MCP clients.MIT
- Alicense-qualityDmaintenanceAutomatically extracts architectural decisions, patterns, and insights from Git commits to build a local, structured project memory. It exposes this living context to AI tools via MCP, allowing them to understand the historical reasoning and evolution behind your codebase.417MIT
- AlicenseAqualityCmaintenanceSemantic git queries via MCP. Beyond git log — answer who/what/why about any line, file, or branch with blame, co-change, PR linkage.6192MIT
- AlicenseBqualityCmaintenanceEnables AI agents to read git commits from local repositories and generate beautifully formatted, categorized changelogs.25MIT
Related MCP Connectors
Repo intel for AI coding agents: overview, PRs, contributors, hot files, CI, deps. Remote MCP.
Package intelligence MCP for AI agents — 22 tools, 19 ecosystems, AGPL SDK, free.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ManiaSacha/gitlog-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server