← Explore all mcp servers

REPOSITORY COLLABORATION / Model Context Protocol steering group

Git MCP reference server

Inspect local Git history and diffs, then stage, commit, or switch branches through explicit tools.

“Tools to read, search, and manipulate Git repositories.”

01 / THE REASONING

Why this made the selection.

  • Works with existing local Git repositories without requiring a GitHub or GitLab account.
  • Separates status, diff and log reads from index, commit and branch operations.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • src/git/README.md and pyproject.toml.
  • src/git/src/mcp_server_git/server.py: repository path validation, handler dispatch and stdio startup.
  • Repository README and current licence transition.
  • src/git/LICENSE at the same commit.

Our findings

  • Tool calls validate repo_path against the configured repository; configure --repository rather than assuming an omitted argument establishes a sandbox.
  • The exposed reset operation unstages changes. No push or pull tool is listed in the inspected implementation.
  • server.py at this commit defines twelve tools in its GitTools enum: git_status, git_diff_unstaged, git_diff_staged, git_diff, git_commit, git_add, git_reset, git_log, git_create_branch, git_checkout, git_show and git_branch.
  • validate_repo_path returns without any check when no repository is configured. git_commit now refuses when nothing is staged, except during a merge.
  • src/git/LICENSE at this commit is the MIT licence (Copyright (c) 2024 Anthropic, PBC.) and pyproject.toml declares MIT. The root LICENSE says MIT contributions without relicensing consent remain MIT, so the two agree.
  • The README’s Claude Desktop uvx block is a fragment without outer braces. The configuration example now reproduces it as text instead of adding braces.

Not established by this review

  • Server launch, authenticated tool calls, and release-to-source parity were not tested.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Connect a server deliberately.

Upstream setup instructions ↗

DOCUMENTED COMMAND

pip install mcp-server-git

Copying does not execute this command. It may retrieve a newer version than the reviewed source.

  1. Install the published Python package using the shown pip command or follow the documented uvx configuration.
  2. Configure command uvx with mcp-server-git, --repository and the intended local repository path in your client.
  3. Review mutation requests before staging, committing or changing branches.

Before you start

  • Python tooling (pip or uv).
  • Git, an existing local repository, and filesystem permission to it.

Documented configuration example

Use the client and authentication context described in the setup guidance. Configuration formats vary between hosts.

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

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://raw.githubusercontent.com/modelcontextprotocol/servers/bbb701e7ac1e57f3edd1c2836b94c5457eaf7b9c/src/git/README.md

    Supports: summary, upstreamDescription, whySelected, bestFor, limitations, install, access, compatibility, transports, review, configExample, --repository resolves to the repository root

  2. https://raw.githubusercontent.com/modelcontextprotocol/servers/bbb701e7ac1e57f3edd1c2836b94c5457eaf7b9c/README.md

    Supports: publisher, upstreamDescription, limitations, review

  3. https://raw.githubusercontent.com/modelcontextprotocol/servers/bbb701e7ac1e57f3edd1c2836b94c5457eaf7b9c/LICENSE

    Supports: license, review

  4. https://raw.githubusercontent.com/modelcontextprotocol/servers/bbb701e7ac1e57f3edd1c2836b94c5457eaf7b9c/src/git/pyproject.toml

    Supports: language, install

  5. https://raw.githubusercontent.com/modelcontextprotocol/servers/bbb701e7ac1e57f3edd1c2836b94c5457eaf7b9c/src/git/src/mcp_server_git/server.py

    Supports: review, access, transports, Tool list (GitTools enum), validate_repo_path, git_commit refuses an empty commit

  6. https://raw.githubusercontent.com/modelcontextprotocol/servers/bbb701e7ac1e57f3edd1c2836b94c5457eaf7b9c/src/git/LICENSE

    Supports: license, MIT, Copyright (c) 2024 Anthropic, PBC.

Evidence & Ask