Git MCP server
Reference MCP server for local Git: status, diffs, commits, branches, and history on a repo path.
Git is one of the reference servers in the official Model Context Protocol repository, and it gives an agent direct control over a local Git repository. Where the GitHub server acts on the hosted platform, this one operates on the working tree in front of you: inspecting status, reading staged and unstaged diffs, staging files, committing, creating and switching branches, and walking the log. That lets an agent make changes and record them with proper commits rather than leaving a dirty tree.
It runs via uvx (the standalone runner for Python tools) and accepts a --repository argument that pins it to a specific checkout. Because it touches only the local repository and needs no credentials, it is a low-risk companion to the GitHub server: use Git for the local commit workflow and GitHub for issues, reviews, and pull requests.
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Add to ~/.claude.json
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"/path/to/repo"
]
}
}
}claude mcp add git -- uvx mcp-server-git --repository /path/to/repoAvailable tools
| Tool | Description |
|---|---|
| git_status | Shows the working tree status. |
| git_diff_unstaged | Shows changes in the working directory not yet staged. |
| git_diff_staged | Shows changes that are staged for commit. |
| git_diff | Shows differences between branches or commits. |
| git_commit | Records staged changes to the repository with a message. |
| git_add | Adds file contents to the staging area. |
| git_reset | Unstages all staged changes. |
| git_log | Shows the commit logs with optional date filtering. |
| git_create_branch | Creates a new branch from an optional base. |
| git_checkout | Switches to the given branch. |
| git_show | Shows the contents of a commit. |
| git_branch | Lists the branches in the repository. |
What you can do with it
Commit work cleanly
After editing files, the agent stages the right changes and writes a descriptive commit instead of leaving the tree dirty for a human to sort out.
Review what changed
The agent reads the staged and unstaged diff to summarize its own work or to understand a repository before touching it.
FAQ
- Is it free?
- Yes. It is an open-source reference server in the official MCP repo with no paid tier.
- Does it support remote/OAuth?
- No. It operates on a local repository over stdio and needs no authentication or network access.