Git MCP Server
by cyanheads
git-mcp-server by cyanheads gives your AI agent full Git control. Clone repos, create branches, stage changes, commit, push, pull, merge, rebase, manage worktrees, and tag releases. 28 tools organized into seven operational categories. All through Model Context Protocol. The server acts as a bridge between your AI coding assistant and local Git repositories. Instead of copying terminal commands from Claude and pasting them yourself, the AI executes Git operations directly. Diff a branch, review a log, cherry-pick a commit, all through conversation. Commit signing is built in. Set GIT_SIGN_COMMITS=true and every commit the AI creates gets GPG or SSH verification. For teams that require signed commits in their Git policy, this eliminates the gap between AI-generated and human-generated work. Installation: npx @cyanheads/git-mcp-server@latest. Supports both Node.js and Bun runtimes. Transport options: STDIO (default, works with Claude Desktop and Cursor) and Streamable HTTP for web-based clients. Configuration for Claude Desktop: { "mcpServers": { "git-mcp-server": { "type": "stdio", "command": "npx", "args": ["@cyanheads/git-mcp-server@latest"], "env": { "GIT_USERNAME": "your-name", "GIT_EMAIL": "your-email@example.com" } } } } 204 GitHub stars. Apache 2.0 license. Built on the mcp-ts-template with dependency injection (tsyringe) and structured logging via Pino with optional OpenTelemetry integration. If you manage Git workflows through AI tools, this server fills the gap between conversation and execution. For the broader MCP ecosystem, browse all MCP servers on Skila. Related: Windsurf and other AI coding tools that support MCP.
Installation
Key Features
- ✓28 Git tools: clone, commit, branch, diff, log, push, pull, merge, rebase, worktree, tags
- ✓GPG/SSH commit signing via GIT_SIGN_COMMITS environment variable
- ✓STDIO and Streamable HTTP transport support
- ✓Cross-runtime: works with both Node.js and Bun
- ✓Working directory management for session-specific repo context
- ✓Structured logging with Pino and optional OpenTelemetry
- ✓Dependency injection architecture using tsyringe
- ✓One-command install: npx @cyanheads/git-mcp-server@latest
Use Cases
- →AI-assisted Git workflows: commit, branch, and merge through conversation
- →Automated code review: diff branches and inspect changes via Claude or Cursor
- →Signed commits from AI agents that satisfy team Git policies
- →Repository management across multiple projects from a single AI session
- →CI/CD integration through HTTP transport for web-based automation