PlugWiki
git logo

Git MCP, the reference server for Git repos on your computer

CommunityLocal

Lets Claude, Cursor or VS Code read your local Git history, review changes and make commits. It cannot push or pull.

This server lets Claude or another AI assistant work with a Git repository on your own computer. It can show changes, stage files, write commits, switch branches and read history. It has no push or pull, so for issues, pull requests and Actions on GitHub, use the GitHub server instead. Always set the repository option, or it can reach every repo you can.

Good for

  • Developers who want the assistant to review a diff and write the commit message
  • Anyone who wants to ask about a repo's history, such as who changed what and when
  • People who use GitLab, Bitbucket or a private host and want plain Git, not a GitHub tie-in
  • Developers who want a small, readable example of an MCP server

Works in

2 supported · 1 with issues · 9 should work

Tap an app to see how to set it up and any known problems.

Install git MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the git MCP server to Claude Code. Run this command:
    
    claude mcp add git -- uvx mcp-server-git
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires uv (Python).

Without --repository, this server can read and write any Git repository your user account can reach, including commits, resets and branch changes. Add --repository path/to/repo to the args to confine it to one repository. Set it whenever you use the server with content you do not fully trust. Docker (mcp/git) and pip install mcp-server-git are also documented.

Built from the package data we hold. Not yet tested by us.

Tools

  • Shows what has changed in your working copy

    Lists modified, staged and untracked files in a repository. Use it first to see where things stand before committing.

    Try: “What is the status of my repo at ~/code/app?”

    Files · git_status

  • Lists recent commits, with date filters

    Shows commit history with hash, author, date and message, up to a count you set, and optionally between two dates. Use it to see what changed recently.

    Try: “Show the last 10 commits in ~/code/app from the past 2 weeks.”

    Files · git_log

  • Shows a commit or a file at a revision

    Displays the contents of a commit, or a file or folder as it was at a given commit, branch or tag. Use it to inspect old versions.

    Try: “Show README.md as it was at tag v1.0.”

    Files · git_show

  • Shows edits not yet staged

    Returns the diff of changes in your working directory that are not staged, with a configurable number of context lines.

    Try: “What have I changed but not staged yet?”

    Files · git_diff_unstaged

  • Shows edits staged for commit

    Returns the diff of everything currently staged, so you can review what the next commit will contain.

    Try: “Show me what is staged for my next commit.”

    Files · git_diff_staged

  • Compares your state with a branch or commit

    Shows the differences between the current state and a branch or commit you name. Use it to review how your work differs from main.

    Try: “Diff my current branch against main.”

    Files · git_diff

  • Lists local, remote or all branches

    Lists branches, optionally only those that contain or do not contain a given commit. Use it to find which branches have a fix.

    Try: “List remote branches that contain commit abc1234.”

    Files · git_branch

  • Stages files for the next commit

    Adds the files you name to the staging area; passing a dot stages everything. Run it before committing.

    Try: “Stage src/app.py and tests/test_app.py.”

    Write · git_add

  • Commits the staged changes

    Records the staged changes as a commit with the message you give and returns the new commit hash. Fails if nothing is staged.

    Try: “Commit the staged changes with the message "Fix login redirect".”

    Write · git_commit

  • Unstages everything

    Removes all files from the staging area without discarding your edits. Use it when you staged too much.

    Try: “Unstage everything I added.”

    Write · git_reset

  • Creates a new branch

    Creates a branch from the current branch, or from a branch, tag or commit you specify. It does not switch to it.

    Try: “Create a branch called fix-login from main.”

    Write · git_create_branch

  • Switches to a branch

    Switches the working copy to another branch. If you give a commit or tag instead, you end up in a detached HEAD state.

    Try: “Switch to the fix-login branch.”

    Write · git_checkout

Read from the source code

Pros and cons

Good

  • Works on plain Git, so GitHub, GitLab, Bitbucket and private hosts all work.
  • Needs no account, token or sign-in.
  • Maintained by the MCP team, with quick fixes.
  • Can run in Docker with only the folders you mount.

Watch out

  • No push, pull, fetch, remote or merge tool.
  • No read-only mode, so commits and branch changes always stay available.
  • Unconfined unless you set the repository option, and some README examples omit it.
  • Five medium-severity security fixes so far; keep it updated.
  • Runs only on your computer, not as a hosted server.
  • Python package: no npm install.

Permissions

medium risk · 4 things to watch · 5 advisories

Medium risk

Without the repository option, your assistant can commit to, reset and switch branches in every Git repo your account can reach. Always set the repository option, and approve each change in your app instead of auto-allowing it.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can reach every repo unless you set one

    Without the repository option, every Git repo your account can reach is in scope, for writes too. The README's VS Code and Zed examples leave it out, so add it. github.com

  • Older versions could be chained into running code

    Researchers combined older versions with the Filesystem server, using planted text, to run code. Fixed in 2025.12.18, so keep both servers updated. theregister.com

  • It changes local history but cannot push

    It can stage, commit, unstage, branch and check out in your working copy. It has no push or network tools, so nothing leaves your machine through it. github.com

  • Reference code, not a hardened product

    The maintainers call these servers educational examples, not production-ready. Add your own safeguards. github.com

Security advisories

5 known advisories, all fixed in a newer version.

Technical details
Turning on read-onlyNo read-only flag. --repository limits which repository it can touch, but commit, add, reset, branch and checkout stay available; rely on your client's per-tool approval to block them.

Alternatives

Use this server for your local working copy: diffs, commits, branches and history. Use the GitHub server for issues, pull requests and Actions, or cyanheads' git-mcp-server if you need push, pull and merge.

ServerOfficialRunsCan change thingsGitHub stars
For Git
Git (reference)This pageCommunityLocalYes–
GitMCPCommunity–No8.5K
Other tools for the same job
GitHub MCP ServerFor GitHubOfficialHostedLocalYes34.1K
git-mcp-server (cyanheads)CommunityLocalYes243
gitlab-mcpFor GitLabCommunity––2.1K

What people say

People value plain, host-neutral Git and the fast fixes, and they miss push and merge.

What people like

  • Plain Git works the same on GitHub, GitLab and Bitbucket, with no GitHub server needed.
  • Maintainers now fix reported bugs quickly and publish advisories with fixed versions.

Common complaints

  • No push, pull or remote tools, so you need another server or the shell to get a branch onto GitHub.
  • No merge tool, and one user says the model tried to fake a merge with commits.
  • Security researchers found flaws in this reference server that worked out of the box.

In their words

Questions

Should I use the Git server or the GitHub server?

Use Git for your local working copy: status, diffs, staging, commits, branches and history. Use the GitHub server for anything on github.com, such as issues, pull requests and Actions. Many people run both, because Git cannot push.

Can it push, pull or merge?

No. It has no push, pull, fetch, remote or merge tool. Maintainers closed the push request as out of scope for a reference server.

Is it safe to use?

Only with limits. It can change your local history, and without the repository option it can reach every repo you can. Set that option and approve changes one by one.

How do I limit it to one repository?

Start it with the repository option and a path inside the repo. The server widens it to the repo root. Without the option it can read and write every Git repo your account can reach.

Is it free?

Yes. It is open source under the MIT licence and needs no account or token.

Is it still maintained or archived?

It is maintained. It is one of seven reference servers the MCP team still keeps in the main servers repo. Older reference servers such as GitHub and GitLab moved to an archive with no security guarantees.

Was it affected by security vulnerabilities?

Yes, five medium-severity advisories, all fixed. The latest, about a nested repo escaping the repository limit, was fixed in 2026.10.28, so update to that version or newer.

Is there an npm package?

No. It is a Python package called mcp-server-git. Installs that try npm fail with a 404.

Why does my Windows path fail with "Connection closed"?

JSON treats a single backslash as an escape, so c:\temp turns into a tab. Write the path with double backslashes or forward slashes.

How do I set the commit author name and email?

Set the standard Git author and committer environment variables, GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL, in the server's env block.

Examples

  • Review what changed before committing

    Show me the staged and unstaged changes in this repo and point out anything that looks like a mistake.

    Source
  • Write a commit message from the staged diff

    Look at the staged diff and commit it with a short conventional-commit message.

  • Summarise recent history

    List the commits from the last two weeks and summarise what changed.

    Source
  • Start a feature branch

    Create a branch called fix/login-timeout from main and switch to it.

  • Read a file as it was in an older commit

    Show me src/config.py as it was at the v1.2.0 tag.

    Source

Information

updated Nov 3, 2026

Publisher
Community
Package
mcp-server-git
Registry
PyPI
Transport
stdio
Auth
None
Version
2026.10.28
License
MIT
Last commit
Oct 29, 2026
Open issues
26
Listed in
Docker MCP Catalog

GitHubPyPIDocker MCP Catalog

Other Git MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 17
  1. mcp-server-git README · github.com
  2. github.com · github.com
  3. github.com · github.com
  4. github.com · github.com
  5. thehackernews.com · thehackernews.com
  6. www.theregister.com · theregister.com
  7. github.com · github.com
  8. github.com · github.com
  9. github.com · github.com
  10. github.com · github.com
  11. github.com · github.com
  12. github.com · github.com
  13. github.com · github.com
  14. github.com · github.com
  15. github.com · github.com
  16. github.com · github.com
  17. github.com · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 3, 2026.