MCP Catalogs
Home

git

Official

by modelcontextprotocol·85,748·Score 75

A comprehensive MCP server for Git operations with status viewing, diffing, commits, and branch management.

developer-toolsfile-systemproductivity
10,713
Forks
459
Open issues
this month
Last commit
2d ago
Indexed

Overview

This MCP server provides extensive Git repository interaction tools through the Model Context Protocol. It offers a complete set of operations including checking repository status, viewing unstaged and staged changes, comparing branches or commits, creating commits, staging files, resetting changes, browsing commit logs, creating and checking out branches, and examining commit contents. The server supports both local repository paths and Docker configurations, making it flexible for different development environments.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:AI-powered Git repository analysis and management
you:Automated code review through diff examination
you:Branch management and workflow automation
you:Can I use this server with remote repositories?
you:Does it support authentication for private repositories?

When to choose this

Choose this server when you need comprehensive Git operations through an MCP interface, particularly if you're already using TypeScript or prefer a tool with extensive documentation and multiple installation options.

When NOT to choose this

Don't choose this if you need advanced Git features like remote repository management or submodule operations that aren't covered by the current tool set.

Tools this server exposes

12 tools extracted from the README
  • git_statusrepo_path: string

    Shows the working tree status

  • git_diff_unstagedrepo_path: string, context_lines?: number

    Shows changes in working directory not yet staged

  • git_diff_stagedrepo_path: string, context_lines?: number

    Shows changes that are staged for commit

  • git_diffrepo_path: string, target: string, context_lines?: number

    Shows differences between branches or commits

  • git_commitrepo_path: string, message: string

    Records changes to the repository

  • git_addrepo_path: string, files: string[]

    Adds file contents to the staging area

  • git_resetrepo_path: string

    Unstages all staged changes

  • git_logrepo_path: string, max_count?: number, start_timestamp?: string, end_timestamp?: string

    Shows the commit logs with optional date filtering

  • git_create_branchrepo_path: string, branch_name: string, base_branch?: string

    Creates a new branch

  • git_checkoutrepo_path: string, branch_name: string

    Switches branches

  • git_showrepo_path: string, revision: string

    Shows the contents of a commit

  • git_branchrepo_path: string, branch_type: string, contains?: string, not_contains?: string

    List Git branches

Comparable tools

git-cliff-mcpgithub-mcpgitlab-mcp

Installation

Using uv (recommended)

When using [uv](https://docs.astral.sh/uv/) no specific installation is needed. Use [uvx](https://docs.astral.sh/uv/guides/tools/) to directly run the server:

uvx mcp-server-git --repository path/to/git/repo

Using PIP

Alternatively you can install mcp-server-git via pip:

pip install mcp-server-git

After installation, run it as:

python -m mcp_server_git

Claude Desktop Configuration

Add to your claude_desktop_config.json:

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

FAQ

Can I use this server with remote repositories?
Currently, the server is designed to work with local Git repositories. You would need to clone the repository locally first.
Does it support authentication for private repositories?
The server itself doesn't handle authentication. You would need to ensure your local Git environment is properly configured with credentials for private repositories.

On Hacker News

Recent discussion from the developer community.

Compare git with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.