CG 

cyanheads/git-mcp-server 是从 https://github.com/cyanheads/git-mcp-server. 导入的 MCP 服务器候选
概览
cyanheads/git-mcp-server 是从 https://github.com/cyanheads/git-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
@cyanheads/git-mcp-server 一个用于AI代理的Git MCP服务器。STDIO和可流式HTTP。 28 工具 ·1 资源 ·1 提示
工具
28个GIT操作分为七个类别:
| 类别 | 工具 | 描述 |
|---|---|---|
| 仓库管理 | git_init, git_clone, git_status, git_clean |
初始化仓库,从远程克隆,检查状态,清理未追踪文件 |
| ** 阶段与提交** | git_add, git_commit, git_diff |
阶段变更,创建提交,比较变更 |
| 历史与检查 | git_log, git_show, git_blame, git_reflog |
查看提交历史,检查对象,追踪作者身份,查看参考日志 |
分析git_changelog_analyze |
收集基于LLM的变更日志分析的git上下文和指令 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Tools
28 git operations organized into seven categories:
| Category | Tools | Description |
|---|---|---|
| Repository Management | git_init, git_clone, git_status, git_clean |
Initialize repos, clone from remotes, check status, clean untracked files |
| Staging & Commits | git_add, git_commit, git_diff |
Stage changes, create commits, compare changes |
| History & Inspection | git_log, git_show, git_blame, git_reflog |
View commit history, inspect objects, trace authorship, view ref logs |
| Analysis | git_changelog_analyze |
Gather git context and instructions for LLM-driven changelog analysis |
安装
npx @cyanheads/git-mcp-server@latest配置
{
"mcpServers": {
"git-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["@cyanheads/git-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"GIT_BASE_DIR": "~/Developer/",
"LOGS_DIR": "~/Developer/logs/git-mcp-server/",
"GIT_USERNAME": "cyanheads",
"GIT_EMAIL": "[email protected]",
"GIT_SIGN_COMMITS": "true"
}
}
}
}