@harneon-ai/githeat
v0.1.1
Published
MCP Server for Git heatmap analysis - provides AI Agents with Git commit activity and contributor pattern insights
Readme
@harneon-ai/githeat
一个 MCP (Model Context Protocol) Server,为 AI 助手提供 Git 提交热力图分析能力。
功能概览
- 收集 Git 仓库提交数据
- 生成仓库级统计信息(每日活动、贡献者摘要、文件类型分布)
- 分析特定作者的提交模式和活跃度
- 查询特定作者的所有提交记录
快速开始
1. 使用 npx(推荐)
npx @harneon-ai/githeat2. 全局安装
npm install -g @harneon-ai/githeat
harneon-githeat3. 在 Claude Code 中使用
claude mcp add harneon-githeat -- harneon-githeat4. 在 Claude Desktop 中使用
编辑 Claude Desktop 配置文件(claude_desktop_config.json):
{
"mcpServers": {
"harneon-githeat": {
"command": "harneon-githeat"
}
}
}MCP 工具说明
1. collect-commits
收集 Git 仓库的提交数据。
参数:
repo(必需): 仓库路径(本地)或 URL(远程)branch(可选): 要分析的分支,默认为当前分支allBranches(可选): 是否分析所有分支,默认为 falsemaxCount(可选): 最大提交数量,默认为 10000
返回:
sessionId: 会话 ID,用于后续分析工具commitsFilePath: 提交数据 JSON 文件路径totalCommits: 总提交数
2. repo-stats
生成仓库级统计信息。
参数:
sessionId(必需): 来自 collect-commits 的会话 ID
返回:
statsFilePath: 统计数据 JSON 文件路径,包含每日活动、作者摘要、文件类型分布
3. author-stats
分析特定作者的提交统计。
参数:
sessionId(必需): 来自 collect-commits 的会话 IDauthor(必需): 作者名称(不区分大小写)
返回:
statsFilePath: 作者统计数据 JSON 文件路径
4. query-by-author
查询特定作者的所有提交。
参数:
sessionId(必需): 来自 collect-commits 的会话 IDauthor(必需): 作者名称(不区分大小写)
返回:
queryFilePath: 查询结果 JSON 文件路径,包含按日期排序的提交列表totalCommits: 该作者的提交总数
开发
安装依赖
npm install构建
npm run build测试
npm test开发模式
npm run dev技术栈
- Node.js >= 18.0.0
- TypeScript
- MCP SDK
- Zod
许可证
MIT
