
This profile is part of our MCP server directory, within The MCP Guide. Profiles are checked against each vendor's own documentation. Need a server built? See MCP development.
The Git MCP server lets an AI app check status, read diffs and logs, create branches and make commits in a local Git repository. It is a reference server from the Model Context Protocol project, published in the modelcontextprotocol/servers repository. It works on local repositories, not on GitHub or GitLab accounts.
Checked against: mcp-server-git README on 28 October 2026. eSEOspace did not install or test this server.
The repository says: "The servers in this repository are intended as reference implementations to demonstrate MCP features and SDK usage. They are meant to serve as educational examples for developers building their own MCP servers, not as production-ready solutions." The Git README adds that the server "is currently in early development" and its tools may change.
Key Takeaways
- Git is an MCP project reference implementation in early development, not a production-ready tool.
- It has 12 documented tools, five of which change a repository.
- Without
--repository, the README warns it "reads and writes any Git repository the server process can reach." - The documented tools cover local work only; there is no push or pull tool in the list.
- It runs locally over stdio and is free under the MIT License.
At a glance
| Field | Detail |
|---|---|
| Publisher | Model Context Protocol project (reference servers maintained by the MCP steering group) |
| Official? | Yes, an MCP project reference server |
| Hosting | Local package (mcp-server-git via uvx or pip), or Docker image mcp/git |
| Transport | stdio |
| Sign-in | None |
| Read or write | Both |
| Price | Free and open source (MIT License) |
| Source code | github.com/modelcontextprotocol/servers/src/git |
| Status | Reference implementation; README says "early development" |
What it can do
The README documents 12 tools. Each takes a repo_path.
Read tools:
git_status: shows working tree status.git_diff_unstagedandgit_diff_staged: show unstaged or staged changes.git_diff: compares the current state with a branch or commit.git_log: shows commits, with optional date filters such as "2 weeks ago".git_show: shows a commit, or a file or folder at a revision.git_branch: lists local, remote or all branches.
Tools that change the repository:
git_add: stages files.git_commit: records a commit with a message.git_reset: unstages all staged changes.git_create_branch: creates a branch from a base.git_checkout: switches branches.
Failed calls return a readable tool error, such as an unknown revision.
How to connect it
The README's Claude Desktop config with uvx sets the repository explicitly:
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "path/to/git/repo"]
}
}
You can also pip install mcp-server-git and run python -m mcp_server_git. The README gives a Docker option that mounts a folder and VS Code configs for user or workspace settings.
Note that the README's VS Code uvx example omits --repository. Given the warning below, add it yourself. Our lesson on reading a server before you install it shows how to spot defaults like this.
Security notes
The README's most important line is a warning: "Without --repository, the server reads and writes any Git repository the server process can reach." Each call names its own repo_path, and that includes the write tools.
It continues: "--repository is the only confinement the server offers." The server never asks the client for Roots. The README says to "Set --repository whenever the server is used with prompts or content that are not fully trusted."
Two more details:
--repositoryadmits the whole enclosing repository, not only the subfolder you name.- A nested repository whose Git directory points outside the allowed one is refused.
Commits and checkouts can be undone with Git, but a checkout can still disrupt uncommitted work. Keep approval prompts on for the five write tools. A prompt hidden in a file or commit message could try to steer the model, so read prompt injection through MCP tool results and excessive permissions in MCP. For the full list of risks, see the MCP security center.
Alternatives
- GitHub's official MCP server and GitLab's MCP server, if you want issues, pull requests and remote repositories rather than local Git.
- Filesystem MCP server: plain file reading and editing, without version history.
Browse more on our MCP server profiles hub.
Next step
If your developers want an AI assistant that can commit code, set rules first. Our Claude Code consulting team helps teams decide which Git actions to allow, review and log.
Frequently asked questions
Can the Git MCP server push to GitHub?
The documented tool list has no push or pull tool. It covers local actions such as staging, committing, branching and checking out. For remote work, use a hosting provider's own MCP server.
Why does --repository matter so much?
Without it, any tool call can name any repository the server process can reach. The README calls --repository the only confinement the server offers. Set it whenever the model may see untrusted content.
Is it ready for production use?
The repository calls all its servers reference implementations, "not production-ready solutions." The Git README adds that it is in early development. Treat it as a learning tool or a starting point.
What does it cost?
Nothing. It is open source under the MIT License. You run it locally with uvx, pip or Docker.











