What it does
A Git MCP server that exposes 28 git operations to AI agents over STDIO or HTTP. The tools span repository management (init, clone, status, clean), staging and commits, commit history inspection and blame, branching and merging workflows, remote synchronization, and advanced operations like worktree management and stash. It includes a dedicated resource representing the current working directory and a prompt protocol for completing git sessions with review, documentation, and tagging. Supports both Node.js (≥20) and Bun (≥1.2).
Who it's for
Developers building AI workflows that need autonomous version control—Claude Code users automating commits and branches, teams using AI for code review and changelog generation, and deployments where an LLM should manage repositories without operator intervention.
Common use cases
- Stage, diff, and commit changes directly from Claude Code without manual git CLI
- Generate changelogs by analyzing commit history with LLM context via
git_changelog_analyze - Automate branch creation, switching, and merging in multi-step workflows
- Inspect commit blame and reflog to trace code authorship and decision history
- Manage worktrees and stashes for parallel task branching
Setup pitfalls
- Configure
GIT_BASE_DIRandLOGS_DIRas absolute paths or tilde-expanded; the server runs git commands in these directories - Set
GIT_USERNAMEandGIT_EMAIL; commits will fail without them - High-risk class (writes filesystem, makes network calls)—run in sandboxed containers or restricted user accounts
- One secret found during scanning; audit the code before using in production or shared environments