Git MCP server

OfficialAnthropic (Model Context Protocol)86,565Config last verified Jun 1, 2026

Reference MCP server for local Git: status, diffs, commits, branches, and history on a repo path.

Git is one of the reference servers in the official Model Context Protocol repository, and it gives an agent direct control over a local Git repository. Where the GitHub server acts on the hosted platform, this one operates on the working tree in front of you: inspecting status, reading staged and unstaged diffs, staging files, committing, creating and switching branches, and walking the log. That lets an agent make changes and record them with proper commits rather than leaving a dirty tree.

It runs via uvx (the standalone runner for Python tools) and accepts a --repository argument that pins it to a specific checkout. Because it touches only the local repository and needs no credentials, it is a low-risk companion to the GitHub server: use Git for the local commit workflow and GitHub for issues, reviews, and pull requests.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "/path/to/repo"
      ]
    }
  }
}
Or via CLI
bash
claude mcp add git -- uvx mcp-server-git --repository /path/to/repo

Available tools

ToolDescription
git_statusShows the working tree status.
git_diff_unstagedShows changes in the working directory not yet staged.
git_diff_stagedShows changes that are staged for commit.
git_diffShows differences between branches or commits.
git_commitRecords staged changes to the repository with a message.
git_addAdds file contents to the staging area.
git_resetUnstages all staged changes.
git_logShows the commit logs with optional date filtering.
git_create_branchCreates a new branch from an optional base.
git_checkoutSwitches to the given branch.
git_showShows the contents of a commit.
git_branchLists the branches in the repository.

What you can do with it

Commit work cleanly

After editing files, the agent stages the right changes and writes a descriptive commit instead of leaving the tree dirty for a human to sort out.

Review what changed

The agent reads the staged and unstaged diff to summarize its own work or to understand a repository before touching it.

FAQ

Is it free?
Yes. It is an open-source reference server in the official MCP repo with no paid tier.
Does it support remote/OAuth?
No. It operates on a local repository over stdio and needs no authentication or network access.
← Browse all version-control servers