git-mcp-server

v2.15.3
io.github.cyanheads/git-mcp-server Checked 8 hours ago Published 3 months ago

Comprehensive Git MCP server enabling native git tools including clone, commit, worktree, & more.

Values you need

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

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add git-mcp-server -- npx -y @cyanheads/git-mcp-server@2.15.3 run start:stdio
Add to claude_desktop_config.json
{
  "mcpServers": {
    "git-mcp-server": {
      "args": [
        "-y",
        "@cyanheads/git-mcp-server@2.15.3",
        "run",
        "start:stdio"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "git-mcp-server": {
      "args": [
        "-y",
        "@cyanheads/git-mcp-server@2.15.3",
        "run",
        "start:stdio"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "git-mcp-server": {
      "args": [
        "-y",
        "@cyanheads/git-mcp-server@2.15.3",
        "run",
        "start:stdio"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.git-mcp-server]
command = "npx"
args = ["-y", "@cyanheads/git-mcp-server@2.15.3", "run", "start:stdio"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: git_add, git_blame, git_branch, git_changelog_analyze, git_checkout, git_cherry_pick, git_clean, git_clear_working_dir, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json