MCP servers / Git

Git MCP server: setup for Claude Code, Claude Desktop and Cursor

The Git server lets your AI look at a local repository (status, diffs, history) and also make changes to it: stage files, commit, create branches and switch between them.

It works on the repository folder you name, on your machine. In the version we tested it has no push, pull or fetch tool, so nothing leaves your computer through this server.

Runs with
uvx (uv, for Python)
Package
mcp-server-git on PyPI
Needs
Python tooling: it runs through uvx, which comes with uv.
Tools
12 (7 read-only, 5 can change things)
Source
modelcontextprotocol/servers
Last checked
2026-09-20 (server reported version 1.30.0)

Config for Git

Generated by the same code as the free builder, so it matches what you get there. Pick your client, then copy.

Needs uv installed (provides uvx). It can stage, commit, reset and switch branches, not just read. Replace /path/to/your/repo with your repository.

Claude Code

Save as .mcp.json in your project root. Claude Code asks you to approve it the first time.

Claude Code config
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "/path/to/your/repo"
      ]
    }
  }
}

Or add it from a terminal instead (single quotes work in bash, zsh and PowerShell; more on this command):

Terminal command
claude mcp add git -- uvx mcp-server-git --repository /path/to/your/repo

Claude Desktop

Merge into claude_desktop_config.json (Settings → Developer → Edit Config), then fully quit and restart Claude Desktop.

Claude Desktop config
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "/path/to/your/repo"
      ]
    }
  }
}

Cursor

Save as .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all projects.

Cursor config
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "/path/to/your/repo"
      ]
    }
  }
}

What it can do

These are all 12 tools the server reported when we started it and asked on 2026-09-20. The labels come from the hints each tool declares about itself.

Watch out for

Try asking

Related servers

Building a full setup? Combine this with other servers in the config builder. Trouble connecting? See fixing connection errors.

Open the config builder Get early access to Pro