Shows the working tree status
Shows changes in working directory not yet staged
Shows changes that are staged for commit
Shows differences between branches or commits
Records changes to the repository
Adds file contents to the staging area
Unstages all staged changes
Shows the commit logs
Creates a new branch
Switches branches
Shows the contents of a commit
Initializes a Git repository
The Git Repository Manager provides a comprehensive interface for LLMs to interact with Git repositories. It enables reading repository status, viewing diffs, committing changes, managing branches, and performing other essential Git operations through a structured API. This tool bridges the gap between natural language interfaces and version control systems, making Git operations accessible through AI assistants.
The Git Repository Manager is a Model Context Protocol (MCP) server that enables AI assistants to interact with Git repositories. It provides a structured interface for performing common Git operations like checking status, viewing diffs, committing changes, and managing branches.
You have several options for installing and using the Git Repository Manager:
The simplest way to use the Git Repository Manager is with uv, which allows you to run the server directly without installation:
# Run the server with uvx
uvx mcp-server-git --repository path/to/git/repo
You can install the Git Repository Manager using pip:
pip install mcp-server-git
After installation, run it as a Python module:
python -m mcp_server_git --repository path/to/git/repo
For containerized usage, you can use the Docker image:
docker run --rm -i --mount type=bind,src=/path/to/local/directory,dst=/path/to/mount/point mcp/git
Add the Git Repository Manager to your claude_desktop_config.json
:
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "path/to/git/repo"]
}
}
For VS Code, add this to your User Settings (JSON) or to .vscode/mcp.json
in your workspace:
{
"mcp": {
"servers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git"]
}
}
}
}
For Zed editor, add to your settings.json
:
"context_servers": {
"mcp-server-git": {
"command": {
"path": "uvx",
"args": ["mcp-server-git"]
}
}
},
Once configured, the Git Repository Manager will be available to your AI assistant. You can ask the assistant to perform Git operations like:
The assistant will use the appropriate Git commands through the MCP server to perform these operations on your behalf.
By default, the Git Repository Manager will operate on the current working directory. You can specify a different repository path using the --repository
flag when starting the server.
If you encounter issues, you can use the MCP inspector to debug the server and see the communication between your AI assistant and the Git Repository Manager.