---
title: "Git MCP server – install in Claude Desktop and Cursor"
summary: "Reference MCP server that lets an agent run common git operations against a local repository."
canonical: https://unlocksaas.com/mcp-tools/git
updated: 2026-05-22
publisher: "Unlock SaaS"
author: "Maryan"
license: All rights reserved. Quotation with attribution permitted.
---

# Git MCP server

> Reference MCP server that lets an agent run common git operations against a local repository.

- Vendor: Anthropic (reference)
- Vendor URL: https://github.com/modelcontextprotocol/servers/tree/main/src/git
- Category: Reference servers
- Distribution: npm package (runs locally)
- Install handle: @modelcontextprotocol/server-git
- Official: yes
- Access: Local, free, requires git installed on the host.

## TL;DR

The Git reference server wraps the local git CLI in MCP tools so an agent can read history, inspect diffs, stage changes, and create commits without shelling out. Pairs naturally with the Filesystem server when an agent is editing code in a repo. The right baseline for any code-editing workflow that needs version control awareness.

## Why an indie SaaS founder cares

If you are shipping daily on your indie SaaS and want Claude to help you review what changed, draft commit messages, or trace a regression to its introducing commit, this server gives the assistant first-class git access against your local repo.

## What an agent can do with it

- **Read history and diffs** – Walk commits, inspect diffs, blame lines.
- **Stage and commit** – Stage selected paths, draft commit messages, commit.
- **Branch inspection** – List branches, switch context, compare branches.

## Install in Claude Desktop

```json
{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-git"]
    }
  }
}
```

## Install in Cursor

```json
{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-git"]
    }
  }
}
```

## FAQ

**Does the Git server push to remotes?**

Out of the box it focuses on local operations; review the latest tool list before relying on push semantics in automated flows.

**Can I scope it to one repository?**

Yes – pass the repository path at startup and the server operates against that working tree.

Last verified: 2026-05-22.

---

Canonical URL: https://unlocksaas.com/mcp-tools/git
Publisher: Unlock SaaS (https://unlocksaas.com)
Contact: maryan@unlocksaas.com