Back
Marketplace/Git

TL;DR

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.

📦

Git

Verified

Version Control

Last updated May 30, 2026 · By MCPizy team

Local Git repository operations

Install Git

Via MCPizy CLI (recommended):
mcpizy install git
Or run directly:
npx -y @modelcontextprotocol/server-git
View on GitHub

Why Git MCP matters

Git 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.

Common pitfalls

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.

How Git MCP compares

Honest pros/cons against the closest version control MCP servers.

ServerStrengthsTrade-offs
Bash MCP + git CLIFull git surface — rebase, cherry-pick, signingCommand injection risk, no path scoping
GitHub MCPRemote-side: PRs, issues, code searchCan't see uncommitted working-tree changes
GitLab MCPSame as GitHub MCP for GitLab teamsSame trade-off — remote only

Works with

Claude Code
Claude Desktop
Cursor
Windsurf
VS Code + Copilot
Any MCP Client

More Version Control MCPs

🐙

GitHub

Official GitHub MCP — repos, issues, PRs

🦊

GitLab

GitLab API — projects, merge requests, pipelines

Alternatives to Git

If Git doesn't fit your stack, these Version Control MCP servers solve similar problems.

🔴

Gitee

Gitee API integration for repository, issue, and pull request management. China's GitHub.

🐙

GitKraken

CLI for interacting with GitKraken APIs including Jira, GitHub, GitLab, and Bitbucket.

🍵

Gitea

Manage Gitea repositories, issues, and pull requests for self-hosted Git from AI agents.

Key Takeaways

  • Git exposes an MCP interface for version control workflows in Claude Code, Cursor and Windsurf.
  • No authentication required — works out of the box once installed.
  • Install in 1 command: mcpizy install git — config written to your client automatically.
  • Free and open source (GitHub source linked above) — verified compatible with every MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot).
  • Best use case: automate version control workflows from your AI agent without leaving the editor.

Frequently asked questions

What is the Git MCP server?

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.

How do I install Git MCP with Claude Code?

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.

Is Git MCP free?

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.

Does Git MCP work with Cursor and Windsurf?

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.

Manage all your MCPs in one place

Monitor usage, track costs, and discover new MCPs.

Get Started Free
What can I do with Git MCP?

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.