
Git Mcp Server
Let your agent run real git workflows—clone, commit, branch, worktree—inside a bounded repo tree while you build and ship, instead of fragile shell one-liners.
Overview
Git MCP Server is a MCP server for the Build phase that exposes comprehensive native Git operations to your coding agent through the Model Context Protocol.
What is this MCP server?
- Comprehensive git surface: clone, commit, worktree, and related native git operations exposed as MCP tools
- Optional GIT_BASE_DIR sandbox to restrict all git commands to one directory tree for multi-tenant safety
- stdio and streamable-http on localhost:3015; npm @cyanheads/git-mcp-server v2.9.2 with Bun runtime hint
- MCP_LOG_LEVEL for observable agent-driven git sessions
- Fits ship-phase review loops when the agent prepares commits or manages branches before you merge
- Server version 2.9.2
- npm identifier @cyanheads/git-mcp-server
- Optional GIT_BASE_DIR path restriction
Community signal: 221 GitHub stars.
What problem does it solve?
Agents that cannot call structured git tools force you to paste commands, mis-stage files, or risk running git outside the repo you intended.
Who is it for?
Indie devs who want the agent to implement features and manage branches/commits in one session with optional directory sandboxing.
Skip if: Teams that forbid automated git writes, need enterprise Git hosting policy enforcement only in CI, or want GitHub/GitLab REST instead of local git.
What do I get? / Deliverables
After registration, your agent can clone, commit, manage worktrees, and inspect repos within GIT_BASE_DIR limits using consistent MCP tools.
- Structured git operations callable from the agent
- Sandboxed repo workflows when GIT_BASE_DIR is set
- Fewer manual terminal handoffs during build and ship
Recommended MCP Servers
Journey fit
Version control is the backbone of the build phase; an MCP git server turns repository operations into safe, typed tools the agent can chain with coding tasks. Agent-tooling is where you extend what the coding agent can do locally; native git via MCP is core tooling for autonomous or assisted implementation.
How it compares
Local native-git MCP server, not a GitHub-issue skill or a hosted forge API wrapper.
Common Questions / FAQ
Who is Git MCP Server for?
It is for solo builders and small teams using MCP clients who want reliable, agent-driven git clone, commit, worktree, and related operations on local repositories.
When should I use Git MCP Server?
Use it during build and ship when your agent should branch, commit, inspect history, or manage worktrees as part of implementation or pre-merge cleanup.
How do I add Git MCP Server to my agent?
Configure @cyanheads/git-mcp-server in MCP settings with stdio (bun/npm run start:stdio) or http://localhost:3015/mcp; set GIT_BASE_DIR to sandbox paths and MCP_LOG_LEVEL as needed.