Git MCP server tools: which ones change your repository, and how to make your agent ask
All 14 tools of the reference Git MCP server, checked by running mcp-server-git 2026.11.18: which only read, which change the repository, why --repository matters, and the Claude Code settings that let the reads run.
Checked on by running mcp-server-git 2026.11.18 from mcp-server-git and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.
The short answer
Always start it with --repository, or it reaches every repository on the machine. 8 of its 14 tools only read. It has no push, so its changes stay local; let reads run and make commits and merges ask.
- Can run on their own
- 8
- Should ask a person
- 6
Start it with --repository
Every tool takes a repo_path, and without --repository the server accepts any repository its process can reach. We started it both ways and asked for the status of a second repository: with the option it refused, saying the path is outside the allowed repository; without it, it answered. Name the one repository the agent works on.
claude mcp add git -- uvx mcp-server-git --repository ~/projects/appWhat it can change, and what it cannot
- There is no push, pull or fetch tool, so whatever the agent commits stays on your machine until someone pushes it.
git_commitandgit_addrecord work;git_create_branchandgit_checkoutmove between branches.git_mergeonly fast-forwards unless told otherwise, refuses a dirty working tree, and aborts a merge that conflicts, by its own description.git_resetis marked destructive but only unstages. We staged a change, called it, and the change was still in the file.
None of this is hard to undo in git, which is why these tools sit in “Changes data” rather than higher. Commits still deserve a look before they are made: the message and the staged files are what a reviewer will see later.
All 14 tools
Changes data6 toolsAsk a person. Once it is routine, a standing rule can answer.
git_commitRecords changes to the repository
Server gives no read-only or destructive hint
git_addAdds file contents to the staging area
Server gives no read-only or destructive hint
git_resetUnstages all staged changes
Server says: destructive
Our call: Marked destructive, but it only unstages: the changes stay in your files. We checked.
git_create_branchCreates a new branch from an optional base branch or commit
Server gives no read-only or destructive hint
git_checkoutSwitches branches
Server gives no read-only or destructive hint
Our call: Switches branches in the repository; the name is about branches, not payments.
git_mergeMerges a branch into the current branch.
Server gives no read-only or destructive hint
Only looks8 toolsLet it run. It only looks.
git_statusShows the working tree status
Server says: read-only
git_diff_unstagedShows changes in the working directory that are not yet staged
Server says: read-only
git_diff_stagedShows changes that are staged for commit
Server says: read-only
git_diffShows differences between branches or commits, or across a revision range (main..feature, main...feature)
Server says: read-only
Our call: Shows the differences between branches or commits; the server marks it read-only.
git_logShows the commit logs
Server says: read-only
git_showShows the contents of a commit, or of a file or directory given as <revision>:<path>
Server says: read-only
git_branchList Git branches
Server says: read-only
git_remoteLists the repository's remotes with their fetch and push URLs, like `git remote -v`.
Server says: read-only
Our call: Lists the remotes; the server marks it read-only and hides user names, passwords and tokens in a URL's user info or query.
Let the reads run in Claude Code
Claude Code asks before every MCP tool it has no rule for. Added as git, this server’s tools are named mcp__git__<tool>. These allow rules, in .claude/settings.json or ~/.claude/settings.json, let the tools that only look run without a prompt. Everything else keeps asking, including any tool a later version of the server adds.
{
"permissions": {
"allow": [
"mcp__git__git_status",
"mcp__git__git_diff_unstaged",
"mcp__git__git_diff_staged",
"mcp__git__git_diff",
"mcp__git__git_log",
"mcp__git__git_show",
"mcp__git__git_branch",
"mcp__git__git_remote"
]
}
}The command that adds the server:
claude mcp add git -- uvx mcp-server-git --repository ~/projects/appSend the rest to a person, not the terminal
A prompt in the terminal only works while someone is watching it. With this hook, every other tool of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher names the look-only tools, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.
{
"hooks": {
"PreToolUse": [
{
"matcher": "mcp__git__(?!(git_status|git_diff_unstaged|git_diff_staged|git_diff|git_log|git_show|git_branch|git_remote)$).*",
"hooks": [
{ "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
]
}
]
}
}Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.
Any MCP client: put the proxy in front
Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server, lets the look-only tools above through, and holds every other call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz login once to save a key, then use this in claude_desktop_config.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"git": {
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
"mcp-proxy",
"--name",
"git",
"--look-only",
"git_status,git_diff_unstaged,git_diff_staged,git_diff,git_log,git_show,git_branch,git_remote",
"--",
"uvx",
"mcp-server-git",
"--repository",
"<home>/projects/app"
],
"command": "npx"
}
}
}Already have it in Claude Desktop? One command rewrites the file for you, with these look-only tools filled in, and keeps the old one (setup vscode does the same for VS Code; how it works):
npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz setup claude-desktopThe same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__git, keeps Claude Code from asking a second time in the terminal:
claude mcp add git -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name git --look-only git_status,git_diff_unstaged,git_diff_staged,git_diff,git_log,git_show,git_branch,git_remote -- uvx mcp-server-git --repository ~/projects/appPushing happens somewhere else
Because this server cannot push, an agent that wants to will reach for the shell or for GitHub’s MCP server. In Claude Code, that is a Bash(git push *) rule; the permissions builder writes one that asks.
See it before you decide.
The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.