---
title: "Git MCP Server Setup Guide and Schema"
slug: "git"
category: "dev-tools"
package: "mcp-server-git"
transport: "stdio"
canonical: "https://mcp-codex.com/servers/git"
source: "MCP Codex (https://mcp-codex.com)"
dateModified: "2026-09-28"
---

# Git MCP Server

> Git repository operations: log, diff, commit, branch, and status.

## Overview
Enable AI agents to interact with local Git repositories. View commit history, create branches, stage and commit changes, view diffs, and manage the Git workflow programmatically.

## Quick Install
```bash
uvx mcp-server-git
```

## Client Configurations

### Claude Desktop (`claude_desktop_config.json`)
```json
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "."
      ]
    }
  }
}
```

### Cursor (`mcp.json`)
```json
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "."
      ]
    }
  }
}
```

### OpenAI Codex CLI (`~/.codex/config.toml`)
```toml
[mcp_servers.git]
command = "uvx"
args = ["mcp-server-git", "--repository", "."]
```

## Available Tools (6)

- `git_status`
- `git_log`
- `git_diff`
- `git_commit`
- `git_branch`
- `git_checkout`

## Documentation & Links
- Canonical Web Page: https://mcp-codex.com/servers/git
- Weekly Protocol Changelog: https://mcp-codex.com#newsletter
- GitHub Repository: https://github.com/modelcontextprotocol/servers/tree/main/src/git
- Setup Tutorial Guide: https://mcp-codex.com/articles/git-mcp-server-guide

