Git is a Version Control MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent local Git repository operations. Install in 1 minute with mcpizy install git.
Version Control
Local Git repository operations
mcpizy install gitnpx -y @modelcontextprotocol/server-gitGit MCP is the official Anthropic MCP server for local git repositories. Tools: `git_status`, `git_diff`, `git_diff_staged`, `git_commit`, `git_add`, `git_log`, `git_create_branch`, `git_checkout`, `git_show`. The server takes a list of allowed repository paths at startup and operates only within them. It's intentionally lower-level than GitHub/GitLab MCPs — those talk to remote APIs, Git MCP talks to the local filesystem and `.git` directory.
We use Git MCP daily in coding agent loops. First, before any code change: `git_status` + `git_diff` to understand the working tree. Second, atomic commits: after the agent writes a change, `git_add` + `git_commit` with a generated message. Third, history walks: `git_log` to find when a bug was introduced, `git_show` to read the offending commit. Token cost is moderate; `git_diff` on a 100-line change is ~2k tokens, `git_log -n 20` is ~1k.
Compared to running git via Bash MCP, Git MCP wins on structured output (diffs as text, log entries as objects) and on safety (no shell injection, explicit path scoping). Compared to GitHub MCP, Git MCP is local-only — it can read commits before they're pushed, run `git_diff` against the working tree, and operate offline. The two are complementary. Honest trade-off: Git MCP does not cover advanced workflows (rebase, cherry-pick, interactive add) — those still need Bash MCP or a human.
Path allow-listing is the only safety mechanism. If `/Users/hugo` is allowed, the agent can commit anywhere under that path. Scope to specific project directories.
`git_commit` does not sign commits (no GPG/SSH signing in the official MCP). If your branch protection requires signed commits, fall back to running git via Bash MCP with the user's signing config.
`git_status` returns untracked files but does not respect `.gitignore` in some forks — it sometimes lists `node_modules` entries the agent then tries to commit. Have the system prompt explicitly tell the agent to never `git_add` files matching common ignore patterns.
Hooks (`pre-commit`, `pre-push`) are bypassed by some MCP forks because they shell out to git differently. Test that your hooks run; if not, force them via Bash MCP.
Honest pros/cons against the closest version control MCP servers.
| Server | Strengths | Trade-offs |
|---|---|---|
| Bash MCP + git CLI | Full git surface — rebase, cherry-pick, signing | Command injection risk, no path scoping |
| GitHub MCP | Remote-side: PRs, issues, code search | Can't see uncommitted working-tree changes |
| GitLab MCP | Same as GitHub MCP for GitLab teams | Same trade-off — remote only |
If Git doesn't fit your stack, these Version Control MCP servers solve similar problems.
The Git MCP server is an Version Control Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents local Git repository operations. It exposes Git's capabilities as tools the AI can call directly from your editor or CLI.
The fastest way is the MCPizy CLI: run `mcpizy install git` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y @modelcontextprotocol/server-git` and restarting Claude Code.
Yes. The Git MCP server is free and open source (see the GitHub repository linked on this page). You may still need a Git account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.
Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.
Once installed, your AI agent can local Git repository operations directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run Git operations, inspect results, chain Git with other MCP servers (see our Workflow Recipes), and automate repetitive version control tasks without leaving your editor.