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.
Get the weekly brief: which AI tools to update, try or skip. Free.
Free. Unsubscribe anytime. No spam. We email a confirmation link first. Privacy
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.
uv venv -p 3.13 .venv && VIRTUAL_ENV=.venv uv pip install mcp-server-gitmcp-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.
.venv/bin/mcp-server-gitserver: mcp-git 2026.10.19
protocol: 2025-11-25
cold start (spawn to initialize result): 512 ms
tools/list: 3.6 ms, 12 toolsgit_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_branchFive 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.
git_status({"repo_path": "/workspace/tests2/work/gitrepo"})
Repository status:
On branch master
nothing to commit, working tree cleanOur 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.
| Client | Command or config | Source and date | Run by us? |
|---|---|---|---|
| Claude Desktop (uvx) | In claude_desktop_config.json: "git": {"command": "uvx", "args": ["mcp-server-git", "--repository", "path/to/git/repo"]} under mcpServers | README, read 2026-10-26 | No |
| Claude Desktop (pip) | "command": "python", "args": ["-m", "mcp_server_git", "--repository", "path/to/git/repo"] | README, read 2026-10-26 | No |
| VS Code | Install button or an mcp.json entry with uvx and mcp-server-git (Docker form also documented) | README, read 2026-10-26 | No |
| Zed | A context_servers entry in settings.json using uvx (pip form also documented) | README, read 2026-10-26 | No |
| Claude Code | Not in the README. Built from the Claude Code docs: claude mcp add git -- uvx mcp-server-git --repository /path/to/repo | Claude Code MCP docs, read 2026-10-26 | No |
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.
npx @modelcontextprotocol/inspector uvx mcp-server-gitWe 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/listand 30 sequentialgit_statuscalls 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.
| Step | Evidence | Covered by |
|---|---|---|
| 1 Install | Tested | /tests/mcp-server-git |
| 2 Start and list tools | Tested | /tests/mcp-server-git |
| 3 Call git_status | Tested | /tests/mcp-server-git |
| 4 Connect a client | Reported | README, read 2026-10-26 |
| 5 Inspector | Reported | README, read 2026-10-26 |
This is a smoke test, not a benchmark: one client, a tiny clean repository, one shared machine.
Troubleshooting
| Symptom | Likely cause | Fix | Source |
|---|---|---|---|
A tool call asks for or fails without repo_path | The server needs to know which repository to use on each call unless started with --repository | Pass 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 install | The 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 schema | Read the message; the server returns it so the model can correct the call. | README, read 2026-10-26 |
Related tools
- 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
- mcp-server-git README (modelcontextprotocol/servers, src/git) (fetched 2026-10-26)
- mcp-server-git on PyPI (fetched 2026-10-26)
- Claude Code MCP docs (fetched 2026-10-26)
Related
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
Free · weekly · about six minutes
Get The Weekly Verdict, free
What shipped this week, what is worth switching to, and what to ignore. We run what we can and label what we only read.
- One email a week. Each release gets one call: update now, worth a look, or skip.
- Every claim shows its evidence. Reported means we read the sources; Tested means we ran it, with the exact scope and the failures left in.
- A free AI Tools Cheat Sheet (web page and printable PDF) lands in your inbox when you confirm.
Free. Unsubscribe anytime. No spam. We email a confirmation link first and add you only after you click it. We use your email only to send this newsletter and never sell it. Privacy