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

Install

One-click install

Runs locally
Claude Code (no install link, copy and run)
$claude mcp add git-mcp-server -- npx -y @cyanheads/git-mcp-server@latest

Buttons open the app on your computer and ask you to confirm before anything is added.

$npx @cyanheads/git-mcp-server@latest
mcp.json (Cursor, Claude Desktop, Windsurf)
{
  "mcpServers": {
    "git-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@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.

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…

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

MCP serverDatabases+105 this week

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

Explore related