What it does
The server exposes 28 git operations as MCP tools, enabling AI agents to perform comprehensive version control tasks via STDIO or HTTP. Operations span repository management (init, clone, status, clean), staging and commits, history inspection (log, blame, reflog), branching and merging (branch, checkout, merge, rebase, cherry-pick), remote operations (fetch, pull, push), and advanced workflows (tag, stash, reset, worktree management). It integrates with local git installations, supports commit signing, and provides a Git Wrap-up prompt for structured completion workflows: review, document, commit, and tag.
Who it's for
Backend engineers and development teams who want Claude Code or other MCP clients to manage git workflows programmatically. Particularly suited for developers building autonomous agents that need to handle version control independently—from creating feature branches and commits to resolving merge conflicts and publishing changes.
Common use cases
- Query git history and blame within Claude Code for code context and authorship insights
- Automate multi-step git workflows: feature branch creation, commits, cherry-picks, and rebasing
- Generate structured changelogs by analyzing commit patterns with the built-in changelog analysis tool
- Manage parallel development with git worktrees, allowing agents to work across multiple branches simultaneously
- Automate cleanup and state reset (stash, reset, clean) in CI/CD or agent recovery scenarios
Setup pitfalls
GIT_USERNAMEandGIT_EMAILmust be set and match your git configuration.GIT_SIGN_COMMITSadds complexity—skip if you don't use commit signing.- The server reads and writes your filesystem and makes network calls for remote operations. High risk classification—ensure it runs in a trusted environment or sandbox appropriate for your use case. Restrict permissions via
GIT_BASE_DIR. - One secret was detected in the codebase during scanning. Audit environment variable handling carefully, especially around credentials or API tokens in git configuration.
- Requires Node.js ≥ 20.0.0 or Bun ≥ 1.2.0 with git installed and accessible on
PATH.