mcp-server-git is a Model Context Protocol (MCP) server designed to enable Large Language Models (LLMs) and AI agents to interact with Git repositories programmatically. It provides tools for reading, searching, and manipulating Git repositories. As of version 2026.1.14, it is actively developed, though still in early stages, with frequent updates often addressing security and functionality enhancements.
pip install mcp-server-gitVerified import paths — ran on the pinned version, not inferred.
To use `mcp-server-git`, install it and then run it as a server process, typically from within a Git repository you wish to expose. MCP clients (like VS Code or Claude Desktop) are then configured to connect to this running server. The example above shows how to run the server from the command line and a typical JSON configuration snippet for an MCP client to establish the connection and provide a repository context.
Upgrade to version 2025.9.25 or later. Do not rely on `mcp-server-git` to initialize new repositories; create them separately.
Upgrade to version 2025.12.18 or later. The fix adds validation to reject flag-like arguments and ensures arguments resolve to valid Git refs.
Upgrade to version 2026.1.14 or later. This version includes boundary checks to prevent `git_add` from staging files outside the repository's working tree.
Upgrade to version 2025.12.18 or later. The fix adds path validation to ensure all operations are restricted to the configured repository path.
Anticipate potential API changes and breaking updates. Regularly review release notes and test against new versions.