Git logo

Git

Inspect and modify Git repositories through MCP tools for status, diffs, commits, branches, history, and revisions.

Install Git

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "installations"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Git MCP server exposes typed Git operations over stdio so AI agents can inspect repository state, review changes, manage branches, and update the index or commit history. It supports status, staged and unstaged diffs, logs with date filters, revision contents, branch queries, checkout, staging, reset, branch creation, and commits. Install it with uvx or pip, then optionally restrict access to one repository with --repository. Reach for Git when an MCP client needs direct repository analysis or version-control automation rather than a separate Git integration.

Use cases

  • Review unstaged and staged changes before a commit
  • Search commit history within a date range
  • Compare the current repository with a branch or commit
  • Create and switch branches during an agent-driven workflow
  • Stage files and record a Git commit

Key features

  • Working-tree status and staged or unstaged diffs
  • Commit creation, staging, and reset operations
  • Date-filtered commit logs
  • Branch creation, checkout, and filtered listing
  • Revision, file, and directory inspection
  • Optional repository confinement

Tools16

What Git lets your agent do. Expand a tool for its parameters.

Self-reported~38 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

96/96 checks healthy over the last 23d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2h ago via OSV.dev · installations (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars91kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Tools exposed16Callable tools this server registers over MCP.
Directory activity69 viewsConfig copies, upvotes, and views on AllMCPs.

How Git works

What Git does

Git MCP server gives an MCP client tools for reading, searching, and modifying Git repositories. Read operations cover working-tree status, unstaged and staged diffs, comparisons against a branch or commit, commit history, branch listings, and the contents of commits, files, or directories at a revision.

Write operations include staging selected paths, unstaging all staged changes, creating commits, creating branches, and switching branches. Commit calls require staged changes unless a merge is in progress and Git permits an empty merge commit. Branch listings can be limited to local, remote, or all branches and can filter by whether a commit is contained.

How it works

The server communicates over stdio and uses the MCP Python SDK 2.x. Each operation is exposed as a typed tool whose inputs are derived from its Python function signature. Tools generally take repo_path; comparison, history, branch, and revision operations add parameters suited to the requested Git query.

Diff tools accept an optional context-line count. Log queries can limit the number of commits and filter by start or end timestamps using ISO 8601, relative, or absolute date expressions. Branch creation can start from the current branch, a tag, another branch, or a commit. Checkout accepts a branch name or another revision, including a commit or tag.

Tool failures are returned as MCP error results with text describing the failed operation, allowing the calling model to adjust its request. Invalid repository paths, Git command failures, schema mismatches, and guarded arguments are handled this way.

Setup and configuration

With uv, run the package directly through uvx:

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

Alternatively, install the package with pip and start it as a Python module:

Terminal
pip install mcp-server-git
python -m mcp_server_git

The optional --repository or -r setting confines tool calls to the enclosing Git repository. The supplied path may be a subdirectory; startup resolves it to the repository root. Each tool's repo_path must remain inside that repository. This restriction also checks Git metadata such as linked worktrees, commondir, and core.worktree paths.

Without --repository, calls can read or write any Git repository reachable by the server process, including for operations that change files or history. Use the option when prompts or other input cannot be fully trusted.

Claude Desktop can launch the server with a stdio entry using uvx, for example:

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

Tools and capabilities

  • Inspect working-tree status with git_status.
  • Review staged, unstaged, or target-based differences with the diff tools.
  • Stage paths, unstage changes, and create commits.
  • Read commit history with count and date filters.
  • Create branches from branches, tags, or commits.
  • Check out branches or other revisions.
  • Show a commit, file, or directory at a specified revision.
  • List local, remote, or all branches with optional commit-containment filters.

Limitations and notes

The server is in early development, so its tools and behavior may change. It does not request client Roots; repository access is controlled by --repository and by each call's repo_path. A path inside the configured repository grants access across that repository rather than only beneath the named subdirectory.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Git

Git is an MCP server that connects AI agents to local Git repositories over stdio and exposes tools for status, diffs, commits, staging, resets, logs, branches, checkout, and showing revisions. It suits repository inspection and controlled version-control automation from MCP-compatible clients.

Install it with uvx or pip. Run `uvx mcp-server-git`, or install `mcp-server-git` with pip and start it using `python -m mcp_server_git`.

Start it with `--repository` or `-r` and provide a path inside the target Git repository. The server resolves that path to the repository root and rejects tool calls outside it.

Yes. Claude Desktop can start Git through a stdio configuration using `uvx` and the `mcp-server-git` package, with `--repository` supplied as an argument.

Yes. It can stage files, create commits from staged changes, reset the index, create branches from branches, tags, or commits, and check out branches or other revisions.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGit AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/git?style=directory)](https://allmcps.com/mcp/git)
HTML Embed
<a href="https://allmcps.com/mcp/git"><img src="https://allmcps.com/api/badge/git?style=directory" alt="Git on AllMCPs" /></a>