Git MCP Server

Full Git repository operations for AI agents — read history, diff, commit, branch

By Anthropic (official) ★ 3.8K stars official git code

The Git MCP Server exposes Git repository operations directly to AI agents. Agents can read commit history, inspect diffs, create branches, stage files, and commit changes — all without needing shell access. This makes it the foundation of any AI coding workflow where version control matters.

Unlike the GitHub MCP Server (which talks to GitHub's API), this server operates on local Git repositories on disk and supports any Git host — GitHub, GitLab, Bitbucket, or self-hosted.

Installation & Configuration

Add this block to your claude_desktop_config.json:

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

To allow the agent to work across multiple repositories, omit --repository and let tools accept a path argument per call.

Config file location:

Available Tools (13)

Use Cases

Source & Documentation

GitHub Repository: https://github.com/modelcontextprotocol/servers/tree/main/src/git

Protocol: Model Context Protocol (MCP) — modelcontextprotocol.io

← Back to MCP Server Directory