Git MCP Server

A Git MCP server that doesn't suck

Local serverstdio

What is the Git MCP server?

A Git MCP server that doesn't suck. That is what the git mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

Exposes the full Git workflow to any MCP-compatible AI agent — inspect, write, branch, remote, stash, rebase, LFS, git-flow, documentation lookup, and more. Designed to be safe by default, composable, and fast. Powered by simple-git.

  • 11 grouped tools with 60+ actions — covering everyday Git workflows and advanced recovery operations
  • Safety-first — — destructive operations require explicit confirmation; force push and hook bypass are opt-in via server config
  • GPG/SSH signing — for commits and tags, with server-level auto-sign support
  • Git LFS — — track patterns, manage objects, install hooks, migrate history
  • Git Flow — — git-flow-next-style workflow support with preset init, overview, config CRUD, generalized topic actions, finish recovery, optional hook/filter parity, and classic feature/release/hotfix/support aliases, without requiring the external CLI
  • Documentation lookup — — search git-scm.com and fetch man pages directly from the LLM

The tools it exposes

The server publishes 14 tools. What each one is for:

  • Safety-first — destructive operations require explicit confirmation; force push and hook bypass are opt-in via server config
  • Multi-repo — pass repo_path per-call or configure a server-level default
  • Cross-platform — macOS, Linux, Windows (Git for Windows)
  • Inspect-before — mutate workflow rules
  • Variable — Default
  • GIT_REPO_PATH — —
  • GIT_ALLOW_NO_VERIFY — false
  • GIT_ALLOW_FORCE_PUSH — false
  • GIT_ALLOW_FLOW_HOOKS — false
  • GIT_AUTO_SIGN_COMMITS — false
  • GIT_AUTO_SIGN_TAGS — false
  • GIT_SIGNING_KEY — —

What it needs from you

Configuration is passed through the environment: GIT_REPO_PATH, GIT_SIGNING_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Getting it running

@selfagency/git-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Git's toolset — Safety-first, Multi-repo, Cross-platform and 11 more — is a fair guide to whether it matches your workflow.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Git.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
Safety-firstdestructive operations require explicit confirmation; force push and hook bypass are opt-in via server config
Multi-repopass repo_path per-call or configure a server-level default
Cross-platformmacOS, Linux, Windows (Git for Windows)
Inspect-beforemutate workflow rules
VariableDefault
GIT_REPO_PATH
GIT_ALLOW_NO_VERIFYfalse
GIT_ALLOW_FORCE_PUSHfalse
GIT_ALLOW_FLOW_HOOKSfalse
GIT_AUTO_SIGN_COMMITSfalse
GIT_AUTO_SIGN_TAGSfalse
GIT_SIGNING_KEY
GIT_SIGNING_FORMAT
ActionDescription

How to install the Git MCP server

{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": ["-y", "@selfagency/git-mcp", "--repo-path", "/path/to/your/repo"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GIT_REPO_PATHFilesystem location the server is allowed to use.Optional
GIT_SIGNING_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Git to Safety-first.
  • Use Git to Multi-repo.
  • Use Git to Cross-platform.

Frequently asked questions

It connects Git to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Safety-first, Multi-repo, Cross-platform, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Git directly.