# Git MCP Server (MCP server)

> Git MCP Server is an MCP server that adds developer tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Comprehensive Git MCP server enabling native git tools including clone, commit, worktree, & more. It has 240 GitHub stars, is released under the Apache-2.0 license and runs locally with npx -y @cyanheads/git-mcp-server.

@cyanheads/git-mcp-server A Git MCP server for AI agents. STDIO & Streamable HTTP. 28 Tools · 1 Resource · 1 Prompt 28 git operations organized into seven categories:

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/cyanheads/git-mcp-server |
| GitHub stars | 240 |
| License | Apache-2.0 |
| Language | TypeScript |
| Transport | stdio |
| Packages | npm: @cyanheads/git-mcp-server |
| Remote URL | none |
| Needs API key | no |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | Developer tools |
| Latest release | none |
| Last commit | Aug 24, 2026 |
| MCP registry name | io.github.cyanheads/git-mcp-server |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/git-mcp-server"
      ],
      "env": {
        "MCP_LOG_LEVEL": "your-value",
        "GIT_BASE_DIR": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env MCP_LOG_LEVEL=your-value --env GIT_BASE_DIR=your-value --transport stdio git-mcp-server -- npx -y @cyanheads/git-mcp-server
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "git-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/git-mcp-server"
      ],
      "env": {
        "MCP_LOG_LEVEL": "your-value",
        "GIT_BASE_DIR": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "git-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/git-mcp-server"
      ],
      "env": {
        "MCP_LOG_LEVEL": "your-value",
        "GIT_BASE_DIR": "your-value"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `MCP_LOG_LEVEL`: Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').
- `GIT_BASE_DIR`: Optional absolute path to restrict all git operations to a specific directory tree. Provides security sandboxing for multi-tenant or shared environments.

## Similar MCP servers

- [Gemini CLI](https://appsgit.com/mcp-servers/gemini-cli): An open-source AI agent that brings the power of Gemini directly into your terminal. (107,240 stars, Apache-2.0)
- [Front-End Checklist](https://appsgit.com/mcp-servers/front-end-checklist): Review frontend code and live pages against 386 quality-gated web development rules. (74,390 stars, MIT)
- [Claude Flow](https://appsgit.com/mcp-servers/claude-flow): AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev. (74,016 stars, MIT, needs API key)
- [Codebase Memory](https://appsgit.com/mcp-servers/codebase-memory): Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens. (45,917 stars, MIT)
- [Bytedance Filesystem](https://appsgit.com/mcp-servers/bytedance-filesystem): MCP server for filesystem access. (39,206 stars, Apache-2.0)
- [GitHub](https://appsgit.com/mcp-servers/github): Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language. (33,414 stars, MIT, official, needs API key)

---

Canonical page: https://appsgit.com/mcp-servers/git-mcp-server
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
