MCP Configs2026年4月8日·1 分钟阅读

Git MCP — Version Control Server for AI Agents

MCP server that gives AI agents full Git capabilities. Git MCP enables Claude Code and Cursor to manage repositories, branches, commits, diffs, and history via tool calls.

MC
MCP Hub · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

{"mcpServers": {"git": {"command": "uvx", "args": ["mcp-server-git", "--repository", "."]}}}

让 AI Agent 通过 MCP 工具调用操作 Git。

什么是 Git MCP?

MCP 服务器,为 AI Agent 提供结构化 Git 访问。类型化工具替代原始 shell 命令,输出结构化便于推理。

一句话总结:Git MCP 服务器,AI Agent 通过工具调用操作 log/diff/status/branch/commit/blame,结构化输出,官方 MCP 服务器集合。

适合人群:需要结构化 Git 访问的 AI Agent 用户。

核心工具

  1. git_status — 工作区状态
  2. git_log — 提交历史
  3. git_diff — 变更对比
  4. git_branch — 分支管理
  5. git_commit — 创建提交
  6. git_blame — 行级追溯

常见问题

Q: 默认只读? A: 不是,支持读写。用 --read-only 限制。

来源与致谢

modelcontextprotocol/servers — 官方 MCP 服务器

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产