G
Official Dev Tools

Git

Anthropic's official Git server for local repository operations.

Works with: Claude DesktopClaude CodeCursorWindsurfClineVS Code (Continue)Zed

Official server · details last checked

Quick install
uvx mcp-server-git --repository /path/to/repo

How to install the Git MCP server

Add this to your Claude Desktop MCP configuration:

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

Add this to your Claude Code MCP configuration:

uvx mcp-server-git --repository /path/to/repo

Add this to your Cursor MCP configuration:

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

Add this to your Windsurf MCP configuration:

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

Add this to your Cline MCP configuration:

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

Add this to your VS Code (Continue) MCP configuration:

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

Add this to your Zed MCP configuration:

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

Built by ContextBoltThis directory is built by ContextBolt: MCP-native memory and SEO tools that run alongside Git in the same client.

Explore ContextBolt

The Git MCP server is Anthropic’s official bridge to a local repository. It lets Claude read commit history, inspect diffs, look at branches and stage changes without you copying terminal output into the chat window. It is one of the reference servers, so it is short, predictable, and a reasonable first install for anyone working in a codebase.

What it actually does

The server points at one repository on disk and exposes its plumbing as tools. Claude can list recent commits, read the diff for a specific change, check which files are modified, look at branches, and stage or commit work. Because it reads the real repository rather than a summary, the answers are grounded in what is actually committed.

Practical patterns:

  • ‘What changed in the last five commits, and why?’
  • ‘Show me the diff for the commit that introduced this function.’
  • ‘Which files have uncommitted changes right now?’
  • ‘Write a commit message for what is currently staged.‘

Why use it

Explaining a codebase’s history to an AI is the slow part of asking for help with it. Pasting a log truncates, pasting a diff blows the context window, and neither reflects what is on disk a minute later. Pointing the server at the repo turns all of that into a question. It pairs naturally with the Filesystem server: Git gives Claude the history, Filesystem gives it the current file contents.

Gotchas

It is scoped to the single path you pass in --repository, which is a feature rather than a limit; the agent cannot wander into other projects. Write operations are real, so commits it makes are commits you will have to unpick, and it is worth pointing it at a branch rather than main while you get a feel for it. It also has no idea about anything that lives on the remote, so pull requests, issues and review comments need the GitHub or GitLab server instead.

Built by ContextBolt

This directory is built by ContextBolt

We build MCP-native tools that give your AI the context it cannot reach on its own. Bookmarks turns your saved posts into agent-queryable memory. SEO puts live keyword and ranking data inside Claude. Both run alongside Git in the same client.

Explore the products →

Git MCP server: FAQs

Is this the same as the GitHub MCP server?

No. Git works on a local checkout on your machine and needs no account. GitHub works against the GitHub API and covers issues, pull requests and code search. Most people who want both install both.

Can it commit and push?

It exposes write operations including staging and committing. Pushing depends on your local credentials. Treat write access carefully and point it at a repo you are happy for an agent to touch.

Do I need Python installed?

It runs through uvx, which handles the Python side for you. If uv is not on your machine you will need to install that first.

Can it read more than one repository?

One repository per server entry. Add a second entry with a different --repository path if you want Claude to see two projects at once.