Git MCP Server

Full git MCP server for LLM agents — 17 tools, AST annotator, auto-backups, real plumbing.

Local serverstdioGo

What is the Git MCP server?

Git MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Full git MCP server for LLM agents — 17 tools, AST annotator, auto-backups, real plumbing.

What you get

An MCP server that gives AI agents a full, safe interface to Git — not just commits, the whole surface: status, diff, branch, stash, history, sync. Every mutation backs itself up automatically. Nothing routes through Bash, so there's no git reset --hard happening behind your back.

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

What the assistant can call

Once Git is connected, these are the calls the assistant has available:

  • status — —
  • diff — —
  • commit — PREVIEW → APPLY
  • branch — CREATE / SWITCH / DELETE / RENAME / LIST
  • stage — RM / RESTORE / CLEAN
  • stash — SAVE / POP / SHOW
  • history — LOG / REFLOG / BLAME
  • sync — PUSH / PULL / FETCH
  • pr-review — —
  • backup — RESTORE / LIST
  • rewrite — AMEND / REVERT / SOFT / HARD
  • integrate — MERGE / UPDATE / PICK / CONTINUE / ABORT

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Git.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the git mcp server does with a few real requests.

Choosing this one

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Git's toolset — status, diff, commit and 11 more — is a fair guide to whether it matches your workflow. It is maintained by Alejandro-M-P; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
status
diff
commitPREVIEW → APPLY
branchCREATE / SWITCH / DELETE / RENAME / LIST
stageRM / RESTORE / CLEAN
stashSAVE / POP / SHOW
historyLOG / REFLOG / BLAME
syncPUSH / PULL / FETCH
pr-review
backupRESTORE / LIST
rewriteAMEND / REVERT / SOFT / HARD
integrateMERGE / UPDATE / PICK / CONTINUE / ABORT
sessionstart / finish / status / select / discard
Sessionsession start → isolated worktree + branch. All MCP tools redirect there. session finish closes and cleans up. session discard throws it away.

Example prompts to try

  • Use Git to status.
  • Use Git to diff.
  • Use Git to commit.

Frequently asked questions

It connects Git to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (status, diff, commit, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Git directly.