MCP server · Reference servers
Git MCP server
Lets an assistant check status, read diffs and logs, stage, commit and switch branches in a local Git repository.
- Maintainer
- Model Context Protocol project (official)
- Licence
- MIT
- Runs
- Locally (uvx)
- Sign-in
- None
- Last activity
- 2026-10-11
Overview
What it does
The Git server is a Python reference server from the MCP project. It runs locally through uvx, pip or Docker and works on a repository on disk. When you pass --repository, the server walks up to the repository root, so tool calls are allowed anywhere in that repository, not only in the folder you named.
Use it when you want an assistant to review work in progress, explain history or prepare a commit without a general shell. It covers the everyday commands: status, staged and unstaged diffs, diffs against a branch or commit, log with date filters, show, branch listing, creating and checking out branches, staging, unstaging and committing. It does not push, pull or rebase. The README says the server is in early development and that its tools may change, so pin a version if you rely on exact behaviour.
Tools
What the assistant can do
- Show working tree status and staged or unstaged diffs
- Diff against another branch or commit
- Read the commit log with optional date filters, and show commits or files at a revision
- Stage files, unstage all changes and create commits
- List, create and check out branches
Install
Install Git MCP server in your app
You need:
- uv (for uvx) or pip, with Python 3.10 or newer
- Git installed locally
Run in your project. --scope local keeps the servers private to you in this project; use user for every project.
claude mcp add --scope local git -- uvx mcp-server-git --repository /path/to/git/repo
claude mcp add --scope local git -- uvx mcp-server-git --repository /path/to/git/repo
Project root. Commit it to share the servers with your team; each person sets the variables in their own shell.
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"/path/to/git/repo"
]
}
}
}
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config). Restart Claude after saving.
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"/path/to/git/repo"
]
}
}
}
In your project, or ~/.cursor/mcp.json for every project.
{
"mcpServers": {
"git": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"/path/to/git/repo"
]
}
}
}
In your workspace. VS Code asks for each secret the first time a server starts and stores it securely.
{
"servers": {
"git": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"/path/to/git/repo"
]
}
}
}
macOS/Linux: ~/.config/devin/mcp_config.json · Windows: %APPDATA%\devin\mcp_config.json. Read by the default Devin Local agent and by the legacy Cascade agent.
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"/path/to/git/repo"
]
}
}
}
Want it alongside other servers? Open Git MCP Server in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.
Before you install
- It can stage, unstage, commit and check out branches, which changes your working tree; there are no push or remote tools.
- Passing --repository scopes the server to that whole repository, not just the subfolder you name.
- With Docker, it can reach whatever host folder you bind-mount, so mount only the repository.
- A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.
Why it’s listed
Why we list it
A small, well-documented way to give an assistant everyday Git commands, kept by the MCP project and published on PyPI.
Related
More MCP servers
- Filesystem MCP ServerLets an assistant read, write, edit, move and search files, but only inside the folders you allow.
- Fetch MCP ServerLets an assistant fetch a web page and read it as Markdown, in chunks, with private addresses blocked by default.
- Knowledge Graph Memory ServerGives an assistant a persistent local knowledge graph of entities, relations and facts that it can add to and search.
- Sequential Thinking MCP ServerGives an assistant a tool for step-by-step reasoning that it can revise or branch as it works through a problem.
- Time MCP ServerLets an assistant get the current time in any IANA time zone and convert a time between zones.
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?