MCP Git Enhanced
🦞 MCP Git Enhanced
一个增强型 Git MCP(模型上下文协议)服务器,为 AI 助手提供强大的代码审查、提交分析和分支管理功能。
功能特性
🔍 代码差异分析 - 比较提交、分支或工作目录的更改
📊 提交历史分析 - 对提交模式和贡献者的深度洞察
🌿 分支管理 - 列出、比较和清理建议
📈 仓库状态 - 全面的工作目录概览
🔎 提交分析 - 详细的单次提交检查
安装
通过 npm(发布后)
npm install -g @bountyclaw/mcp-git-enhanced通过源码
git clone https://github.com/bountyclaw/mcp-git-enhanced.git
cd mcp-git-enhanced
npm install
npm run build与 Claude Code 配合使用
添加到您的 Claude Code 配置文件 (~/.claude/settings.json) 中:
{
"mcpServers": {
"git-enhanced": {
"command": "npx",
"args": ["@bountyclaw/mcp-git-enhanced"]
}
}
}或者用于本地开发:
{
"mcpServers": {
"git-enhanced": {
"command": "node",
"args": ["/path/to/mcp-git-enhanced/dist/index.js"]
}
}
}可用工具
git_diff
分析提交、分支或工作目录之间的代码更改。
{
"repoPath": "/absolute/path/to/repo",
"target": "HEAD~5",
"source": "HEAD~10",
"filePath": "src/",
"staged": false
}git_log
通过过滤和统计信息分析提交历史。
{
"repoPath": "/absolute/path/to/repo",
"maxCount": 20,
"author": "John Doe",
"since": "1 week ago",
"stat": true
}git_branch
管理和分析 git 分支。
{
"repoPath": "/absolute/path/to/repo",
"action": "list|compare|suggest_cleanup",
"includeRemote": true
}git_status
获取全面的仓库状态。
{
"repoPath": "/absolute/path/to/repo",
"short": false
}git_commit_analyze
详细分析特定的提交。
{
"repoPath": "/absolute/path/to/repo",
"commitHash": "abc123"
}使用案例示例
代码审查
"Show me the diff between main and the feature branch"
"What files changed in the last 5 commits?"
"Analyze the impact of commit abc123"仓库健康状况
"List all branches that can be safely deleted"
"Show me commits from the last week"
"Who are the top contributors to this project?"工作目录
"What's the current status of my repo?"
"Show me the staged changes"
"What files have uncommitted changes?"开发
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Test locally
node dist/index.js要求
Node.js >= 18.0.0
已安装 Git 并可在 PATH 中访问
许可证
MIT
贡献
欢迎贡献!请阅读 CONTRIBUTING.md 了解详情。
由 BountyClaw 倾力打造 🦞
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/davidweb3-ctrl/mcp-git-enhanced'
If you have feedback or need assistance with the MCP directory API, please join our Discord server