Git (Reference) — Claude Code MCP server: what it does, how to install
Git (Reference) is an MCP server for Claude Code that lets an agent inspect and change Git repositories. It handles diffs, branches, history, staging, and commits.
no license ★ 92,149 updated 2026-10-25
Open on GitHubWhat Git (Reference) does
Git (Reference) exposes typed tools for repository work through MCP. An agent can read the working-tree status, inspect staged or unstaged changes, compare the current state with a branch or commit, view a revision, and retrieve commit history with date filters.
The server also handles repository changes: staging files, clearing the index, creating branches, switching revisions, and recording commits. Calls use repo_path; git_add takes a non-empty file list, while git_branch requires local, remote, or all as the branch type.
Running it requires MCP Python SDK 2.x under the constraint mcp>=2.3,<3. The pip route installs mcp-server-git, then starts it with python -m mcp_server_git. Without that SDK version range, the server will not run.
What it helps with
- inspect a repository’s working-tree state
- review staged and unstaged diffs
- compare a checkout with a branch or commit
- filter commit history by time
- create a branch and record staged changes
Example prompts for the agent
- Inspect the repository at
repo_pathand explain the current working-tree status. - Compare the current checkout with
main, then summarize the resulting diff. - Create branch
feature/login, stagesrc/login.tsandtests/login.test.ts, and commit them with messageAdd login flow.
How to install Git (Reference)
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Git (Reference)
How do I install Git (Reference) in Claude Code?
Run pip install mcp-server-git, then start it with python -m mcp_server_git.
What does Git (Reference) do?
It gives an agent MCP tools for Git status, diffs, history, revisions, branches, staging, resets, and commits.
What does Git (Reference) require to run?
It requires MCP Python SDK 2.x constrained by mcp>=2.3,<3. Tool calls can provide the repository path through repo_path.