Back to MCP Catalog

Git Repository Manager MCP Server

Version ControlPython
Interact with and manage Git repositories through LLM interfaces
Available Tools

git_status

Shows the working tree status

repo_path

git_diff_unstaged

Shows changes in working directory not yet staged

repo_path

git_diff_staged

Shows changes that are staged for commit

repo_path

git_diff

Shows differences between branches or commits

repo_pathtarget

git_commit

Records changes to the repository

repo_pathmessage

git_add

Adds file contents to the staging area

repo_pathfiles

git_reset

Unstages all staged changes

repo_path

git_log

Shows the commit logs

repo_pathmax_count

git_create_branch

Creates a new branch

repo_pathbranch_namestart_point

git_checkout

Switches branches

repo_pathbranch_name

git_show

Shows the contents of a commit

repo_pathrevision

git_init

Initializes a Git repository

repo_path

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.

Git Repository Manager

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.

Installation Options

You have several options for installing and using the Git Repository Manager:

Using uv (Recommended)

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

Using pip

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

Using Docker

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

Configuration

Claude Desktop Configuration

Add the Git Repository Manager to your claude_desktop_config.json:

"mcpServers": {
  "git": {
    "command": "uvx",
    "args": ["mcp-server-git", "--repository", "path/to/git/repo"]
  }
}

VS Code Configuration

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"]
      }
    }
  }
}

Zed Configuration

For Zed editor, add to your settings.json:

"context_servers": {
  "mcp-server-git": {
    "command": {
      "path": "uvx",
      "args": ["mcp-server-git"]
    }
  }
},

Usage

Once configured, the Git Repository Manager will be available to your AI assistant. You can ask the assistant to perform Git operations like:

  • Check the status of your repository
  • View unstaged or staged changes
  • Commit changes with a message
  • Create and switch branches
  • View commit history
  • Initialize a new repository

The assistant will use the appropriate Git commands through the MCP server to perform these operations on your behalf.

Repository Path

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.

Debugging

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.

Related MCPs

GitHub API
Version ControlTypeScript

Interact with GitHub repositories, issues, pull requests, and more through the GitHub API

GitLab
Version ControlTypeScript

Interact with GitLab repositories, issues, and merge requests

Gitee
Version ControlOther

A Chinese alternative to GitHub for code hosting and collaboration

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.