Git MCP Server
by cyanheads
Full-featured Git MCP server exposing 28 tools for AI agents to clone, commit, branch, diff, merge, rebase, and more via STDIO or Streamable HTTP.
What it does
Git MCP Server gives AI agents complete control over Git repositories. From cloning and staging to rebasing, worktree management, and tag releases — all 28 Git operations are available as MCP tools. Works over STDIO for local clients or Streamable HTTP for hosted deployments including Cloudflare Workers.
Tools
git_init/git_clone— Create or clone repositoriesgit_status/git_clean— Inspect and clean working treesgit_add/git_commit/git_diff— Stage and commit changesgit_log/git_show/git_blame/git_reflog— Browse history and trace authorshipgit_branch/git_checkout/git_merge/git_rebase/git_cherry_pick— Branch and merge workflowsgit_remote/git_fetch/git_pull/git_push— Sync with remotesgit_tag/git_stash/git_reset/git_worktree— Advanced state managementgit_changelog_analyze— LLM-driven changelog generationgit_set_working_dir/git_clear_working_dir— Per-session directory context
Also exposes one resource (git://working-directory) and a Git Wrap-up prompt for structured session closeout.
Installation
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"git-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["@cyanheads/git-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"GIT_BASE_DIR": "~/Developer/",
"GIT_USERNAME": "yourname",
"GIT_EMAIL": "you@example.com"
}
}
}
}
Bun users: replace npx with bunx.
For HTTP transport, set MCP_TRANSPORT_TYPE=http and MCP_HTTP_PORT=3015.
Supported hosts
Works with any MCP-compatible client supporting STDIO or Streamable HTTP. Claude Desktop confirmed in README.
Quick install
npx @cyanheads/git-mcp-server@latestInformation
- Pricing
- free
- Published
- 4/6/2026
- stars
- 206