Skip to content

Git MCP Server

Clone, commit, diff, branch, merge, rebase, cherry-pick, stash, tag, and manage worktrees in local git repos via MCP. STDIO or Streamable HTTP.

Install

$npx @cyanheads/git-mcp-server@latest
Claude Code
claude mcp add git-mcp-server -- npx @cyanheads/git-mcp-server@latest
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "@cyanheads/git-mcp-server@latest"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

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


Tools

28 git operations organized into seven categories:

Category Tools Description
Repository Management git_init, git_clone, git_status, git_clean Initialize repos, clone from remotes, check status, clean untracked files
Staging & Commits git_add, git_commit, git_diff Stage changes, create commits, compare changes
History & Inspection git_log, git_show, git_blame, git_reflog View commit history, inspect objects, trace authorship, view ref logs
Analysis git_changelog_analyze Gather git context and instructions for LLM-driven changelog analysis
Branching & Merging git_branch, git_checkout, git_merge, git_rebase, git_cherry_pick Manage branches, switch contexts, integrate changes, apply specific commits
Remote Operations git_remote, git_fetch, git_pull, git_push Configure remotes, fetch updates, synchronize repositories, publish changes
Advanced Workflows git_tag, git_stash, git_reset, git_worktree, git_set_working_dir, git_clear_working_dir, git_wrapup_instructions Tag releases (list/create/delete/verify), stash changes, reset state, manage worktrees, set/clear session directory

Resources

Resource URI Description
Git Working Directory git://working-directory The current session working directory, set via git_set_working_dir.

Prompts

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io