Skip to content
appsgit

Git 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.

github.com/cyanheads/git-mcp-server (opens in a new tab)

Install Git MCP Server

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.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

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
{
  "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
{
  "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 Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

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

About 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:

  • git
  • mcp
  • mcp-server
  • model-context-protocol
  • git-tools
  • cyanheads
  • ai-agents
  • ai-tools
  • developer-tools
  • llm-tools

FAQ

Git MCP Server FAQ

Still curious? Email info@appsgit.com.

What is Git 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. The source code is at github.com/cyanheads/git-mcp-server.

How do I install the Git MCP Server MCP server?

Add the command npx -y @cyanheads/git-mcp-server to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Git MCP Server free?

The server is open source under the Apache-2.0 license, so running it is free. It does not declare any required API key.

Is Git MCP Server actively maintained?

The most recent commit was on Aug 24, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.