Git MCP server: how to set it up and what it can do

The MCP Git server is a reference server from the Model Context Protocol project that lets an AI agent read and change a local Git repository. In our 2026-10-25 smoke test, version 2026.10.19 started in 512 ms, listed 12 tools and answered git_status in 3.2 ms median. It is separate from GitHub's own MCP server.

Checked by Agentic Weekly's editorial process: vendor docs re-read (the commands were run on 2026-10-25, not re-run on this date).

Last verified: 2026-10-26 (America/Chicago) · Versions covered: mcp-server-git 2026.10.19 (PyPI); Python 3.13 venv; MCP Python SDK 2.3.0 for our client · Evidence: Tested (see “What we tested”)

What the Git MCP server is

mcp-server-git is the Git server in the MCP project's reference-servers repository. Its README (read 2026-10-26) describes it as a server for Git repository interaction and automation that reads, searches and manipulates repositories through a language model, and says it is in early development, so tools can change. The PyPI package lists the MIT license and Python 3.10 or newer (PyPI, read 2026-10-26).

It works on a repository on your own disk. It is not GitHub's server: that one talks to GitHub.com issues and pull requests. See GitHub MCP server: how to set it up for that one, and What is an MCP server? for the basics.

Prerequisites

  • Operating system and hardware we ran on: Linux x86_64 virtual machine (Debian 13), 8 vCPU, 15 GiB RAM, no GPU. Not run by us: macOS and Windows.
  • uv with a Python 3.13 virtual environment (the version we ran). The README recommends uv and also documents pip install mcp-server-git, which we did not run.
  • A Git repository to point it at. We used a small throwaway fixture repository.
  • Accounts and keys: none. No language model was involved in our test.

Step 1: Install the server

Create a virtual environment and install the package from PyPI. We installed version 2026.10.19 with a cold cache.

Command (adapted from the log; we used a different folder name)
uv venv -p 3.13 .venv && VIRTUAL_ENV=.venv uv pip install mcp-server-git
Expected result (from the log notes)
mcp-server-git 2026.10.19 installed; 34 MB on disk; about 2.2 s with no cache.

The README says you can also run it without installing, using uvx mcp-server-git. We did not run that form.

Step evidence: Tested (uv install, 2026-10-25; log: /tests/mcp-server-git).

Step 2: Start it and list its tools

The server speaks MCP over stdio, so a client normally launches it. Our client launched the binary, then called tools/list.

Command (as logged)
.venv/bin/mcp-server-git
Expected result (what our client saw)
server: mcp-git 2026.10.19
protocol: 2025-11-25
cold start (spawn to initialize result): 512 ms
tools/list: 3.6 ms, 12 tools
The 12 tool names
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, git_branch

Five of the tools look like they change a repository: git_add, git_commit, git_reset, git_checkout and git_create_branch. We did not call any of them.

Step evidence: Tested (start and tools/list, 2026-10-25; log: /tests/mcp-server-git).

Step 3: Call a tool

Every call needs a repo_path argument unless you start the server with a fixed repository. We called git_status 30 times on a clean fixture repository: median 3.2 ms, 95th percentile 3.7 ms.

Output of one call (first 300 characters, from the log)
git_status({"repo_path": "/workspace/tests2/work/gitrepo"})
Repository status:
On branch master
nothing to commit, working tree clean

Our log attributes the few milliseconds per call to the server using the git library on every call. A model has to supply repo_path each time, which is the gotcha our log recorded.

Step evidence: Tested (30 calls to git_status, 2026-10-25; log: /tests/mcp-server-git).

Step 4: Connect it to an MCP client

The README (read 2026-10-26) gives these shapes. We did not run any client setup.

Setup by client, from the Git server README
ClientCommand or configSource and dateRun by us?
Claude Desktop (uvx)In claude_desktop_config.json: "git": {"command": "uvx", "args": ["mcp-server-git", "--repository", "path/to/git/repo"]} under mcpServersREADME, read 2026-10-26No
Claude Desktop (pip)"command": "python", "args": ["-m", "mcp_server_git", "--repository", "path/to/git/repo"]README, read 2026-10-26No
VS CodeInstall button or an mcp.json entry with uvx and mcp-server-git (Docker form also documented)README, read 2026-10-26No
ZedA context_servers entry in settings.json using uvx (pip form also documented)README, read 2026-10-26No
Claude CodeNot in the README. Built from the Claude Code docs: claude mcp add git -- uvx mcp-server-git --repository /path/to/repoClaude Code MCP docs, read 2026-10-26No

The --repository flag, per the README, accepts any path inside a Git working tree and lets the server walk up to the repository root; with no --repository, each tool call must carry repo_path. For more on Claude Code commands see Add an MCP server to Claude Code.

Step evidence: Reported (not run by us). Source: https://github.com/modelcontextprotocol/servers/tree/main/src/git and https://code.claude.com/docs/en/mcp, read 2026-10-26.

Step 5: Debug with the MCP Inspector

The README suggests the official inspector to try the server by hand.

Command (from the README)
npx @modelcontextprotocol/inspector uvx mcp-server-git

We have a separate test of the inspector itself at /tests/mcp-inspector, but we did not run this exact command against the Git server.

Step evidence: Reported (not run by us). Source: https://github.com/modelcontextprotocol/servers/tree/main/src/git, read 2026-10-26.

What we tested

Evidence: Tested (smoke test, 2026-10-25, no LLM involved) for install, start, tool listing and git_status; Reported (not run by us) for client setup and the inspector.

  • What we ran: the uv install above, then a small Python client (official MCP Python SDK 2.3.0) over stdio that timed the handshake, one tools/list and 30 sequential git_status calls on a fixture repository. Server string printed: mcp-git 2026.10.19. Run on 2026-10-25 at 22:37 CDT (America/Chicago).
  • Environment: Linux x86_64 virtual machine (Debian 13), 8 vCPU, 15 GiB RAM, no GPU, shared with other jobs.
  • Model: no language model involved.
  • Full test log: MCP Git server test log.
  • Reported, from the README, not run by us: every client setup in Step 4, uvx, pip install, Docker, and the inspector command.
  • Not tested: remote (HTTP) transport, authentication and concurrent clients; large repositories or payloads; the write tools (git_add, git_commit, git_reset, git_checkout, git_create_branch); answer quality.
Evidence by step
StepEvidenceCovered by
1 InstallTested/tests/mcp-server-git
2 Start and list toolsTested/tests/mcp-server-git
3 Call git_statusTested/tests/mcp-server-git
4 Connect a clientReportedREADME, read 2026-10-26
5 InspectorReportedREADME, read 2026-10-26

This is a smoke test, not a benchmark: one client, a tiny clean repository, one shared machine.

Troubleshooting

Git MCP server problems and fixes
SymptomLikely causeFixSource
A tool call asks for or fails without repo_pathThe server needs to know which repository to use on each call unless started with --repositoryPass repo_path in every call, or start the server with --repository <path>.Seen by us 2026-10-25, /tests/mcp-server-git; option per README, read 2026-10-26
Start-up fails after installThe README says the server requires MCP Python SDK 2.x (mcp>=2.3,<3)Check that the installed mcp package is 2.3 or newer within 2.x (uv pip list).README, read 2026-10-26. A related import failure of 1.x-style FastMCP code under SDK 2.3.0 is in /tests/mcp-python-servers
A tool fails with Error executing tool <name>: <message>A Git error, a repo_path that is not a repository or is outside --repository, or arguments that do not match the schemaRead the message; the server returns it so the model can correct the call.README, read 2026-10-26
  • MCP reference servers: The MCP project's collection of reference servers. Tested (smoke test, 2026-10-25, no LLM involved).

FAQ

What is the Git MCP server?

It is the Git server in the Model Context Protocol project's reference-servers repository, package mcp-server-git. It lets an AI agent read and change a local Git repository. In our 2026-10-25 smoke test, version 2026.10.19 listed 12 tools and started in 512 ms.

How do I install the Git MCP server?

In our log we ran uv venv -p 3.13 .venv, then uv pip install mcp-server-git, which installed 2026.10.19 in about 2.2 s. The README also documents uvx mcp-server-git (not run by us). Each call needs a repo_path.

Is the Git MCP server the same as the GitHub MCP server?

No. The Git server works on a repository on your own disk. GitHub's server connects to GitHub.com for issues and pull requests. Our setup guide for GitHub's server is reported only; we have not run it.

Can the Git MCP server make commits?

Its tool list includes git_commit, git_add and git_reset, plus git_checkout and git_create_branch. We listed the tools but did not call any write tool in our smoke test, so we have not verified how they behave.

Have you tested the Git MCP server?

Yes, partly. On 2026-10-25 we ran a no-model smoke test: install, start, tools/list (12 tools) and 30 git_status calls. We did not call write tools or test remote transport. Client setup is from the README, not run by us.

Sources

Page history

  • : First published. README and PyPI page read on this date; commands come from the 2026-10-25 test log and were not re-run.

Markdown version for agents: /guides/git-mcp-server.md