Developer tools

Git MCP Server: local repos for clients without a shell

A reference server from the MCP project: status, diffs, log, staging, commits and branches as structured tools, for clients like Claude Desktop with no shell.

Project and installation docs

View project

https://github.com/modelcontextprotocol/servers

Terminal agents like Claude Code and Codex can just run git. Chat clients such as Claude Desktop have no shell, so the model can’t even look at what changed in a local repository. mcp-server-git wraps everyday Git operations as structured tools: the model calls them with parameters and gets back status, diffs and commit history. It’s one of the reference implementations in the Model Context Protocol project’s official servers repository, written in Python.

What it does

  • Status and diffs: git_status, git_diff_unstaged, git_diff_staged and git_diff cover the working tree, the index and comparisons between branches.
  • History: git_log filters by time range (ISO 8601 or relative values like “2 weeks ago”), and git_show prints a commit.
  • Writes: git_add stages, git_commit commits and git_reset unstages.
  • Branches: git_branch lists local or remote branches, git_create_branch creates one and git_checkout switches.
  • Several ways to run it: besides uvx, you can pip install mcp-server-git and run python -m mcp_server_git, or use the repo’s Docker config, mounting your workspace so the container can see the repo.

Who it’s for

  • Developers using Claude Desktop to read diffs and draft commit messages.
  • People building their own MCP clients or agent frameworks who want a clean Git tool layer.

Setup

Run it through uv’s uvx with nothing to install, pointing --repository at your repo:

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

Alternatively pip install mcp-server-git and run python -m mcp_server_git. The README also has a Docker config.

Our take

Coding agents that already have a terminal don’t need it; calling git directly is more flexible. It earns its place in shell-less clients and home-built agents, with clear tool boundaries, simple parameters and readable reference code. It does write: it can commit, reset the index and switch branches, so a wrong checkout or a stray committed file is yours to clean up. There’s no push tool, so nothing reaches a remote on its own. The README calls it early-stage with tools still changing, and it currently requires MCP Python SDK 1.x (mcp>=1.29.0,<2), with the port to 2.0 still in progress. Pair it with Fetch MCP Server when the agent also needs to read remote pages or docs; both are reference implementations in the protocol’s own repository. Licensed MIT, with the MCP project as a whole moving to Apache-2.0.