Skip to content
MCP server

Git

MCP server giving AI clients read and write access to local Git repositories

Runs locally

Git is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, API, Linux
Runs
Locally
What it can do
Can change data (4 tools)
Version
2026.11.27
Listing updated

Similar MCP servers

Install

You install MCP servers on a computer. Send yourself the link.

Add with the CLI

Run in a terminal

claude mcp add server-git -- uvx mcp-server-git

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "server-git": {
      "command": "uvx",
      "args": [
        "mcp-server-git"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "server-git": {
      "command": "uvx",
      "args": [
        "mcp-server-git"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "server-git": {
      "command": "uvx",
      "args": [
        "mcp-server-git"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "server-git": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-server-git"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add server-git -- uvx mcp-server-git

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.server-git]
command = "uvx"
args = ["mcp-server-git"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "server-git": {
      "command": "uvx",
      "args": [
        "mcp-server-git"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user server-git uvx -- mcp-server-git

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "server-git": {
          "command": "uvx",
          "args": [
            "mcp-server-git"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Git

Exposes everyday Git operations to an AI client through the Model Context Protocol. A model can inspect a working tree, review staged and unstaged diffs, browse commit history, stage files, create commits, manage branches and merge, all by naming a repository path on each call.

The server runs over stdio by default and can also be started as a standalone HTTP service. Its tools return plain text results, and failed calls report errors the model can read and correct. Two prompts build commit-message and change-summary requests from the current repository state.

It suits developers who want an assistant to work directly with local repositories. Because each call can target any repository the process can reach unless a --repository root is set, it is best run with that flag when the prompts or content are not fully trusted.

Tools this server provides (14)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 4 of 14 tools change data; 8 names don't say.

From the server's own tool labels and tool names; not verified by us.

git_statusName suggests: reads
Shows the working tree status
git_diff_unstaged
Shows changes in working directory not yet staged
git_diff_staged
Shows changes that are staged for commit
git_diff
Shows differences between branches or commits, or across a revision range
git_commitName suggests: changes
Records changes to the repository
git_addName suggests: changes
Adds file contents to the staging area
git_reset
Unstages all staged changes
git_log
Shows the commit log, newest commit first
git_create_branchName suggests: changes
Creates a new branch
git_checkout
Switches branches
git_mergeName suggests: changes
Merges a branch into the current branch, or changes nothing
git_showName suggests: reads
Shows the contents of a commit, or of a file or directory at a revision
git_branch
List Git branches
git_remote
Lists the repository's remotes with their fetch and push URLs

What it does

Repository status and diffs
Shows the working tree status and diffs for unstaged changes, staged changes, or between branches, commits and revision ranges.
Commit history browsing
Lists recent commits with hash, author, date and message, with optional date-range filters.
Staging and committing
Stages files, unstages changes and records commits, using the configured Git identity.
Branch management
Lists branches with containment filters, creates branches, switches branches and merges with fast-forward control.
Safe remote listing
Lists remotes while redacting credentials embedded in URLs.
Guarded execution
Blocks repository hooks, external diff and filter programs, and optional --repository confinement limits which repositories are used.

Good for

  • Asking an AI assistant to review unstaged or staged changes before a commit
  • Drafting commit messages from the currently staged diff
  • Summarizing what changed on a branch compared with another branch or commit
  • Searching recent history for commits within a date range
  • Creating a feature branch and staging a set of files from an assistant session

Pricing

Open source

Free and open source under the MIT License.

More servers for the same service

Git FAQ

How do I install Git?

Run it with uvx mcp-server-git or install the mcp-server-git package with pip and start it with python -m mcp_server_git.

Can Git confine access to one repository?

Yes. Passing --repository limits tool calls to that Git repository, including any repository it sits inside. Without it, the server can access any repository the process can reach.

Which Git identity is used for commits?

It uses the GIT_AUTHOR and GIT_COMMITTER variables if set, otherwise user.name and user.email from Git config, falling back to the operating-system user.

Does Git support a remote HTTP transport?

Yes. With --transport streamable-http it runs as an HTTP service on 127.0.0.1:3001 by default, configurable with HOST and PORT.

Is Git free?

Yes. Git is open source, so you can use and self-host it for free.

How do I add Git to Claude Code?

Run this command in your terminal: claude mcp add server-git -- uvx mcp-server-git

What are the best alternatives to Git?

The closest alternatives to Git are Git, Git MCP, MCP Git Enhanced, GitHub-AI-MCP and Git Enhanced.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers