Labsco
MCP SERVER

Git MCP Server (Go)

by geropl

Read, search and change several Git repositories from the conversation, with pushes disabled until you turn them on.

Git Hosting & Code Review
Summary
Everything local works out of the box; the one command that touches a remote is opt-in.

Reads, commits and branch operations are available immediately, while push stays behind an explicit write-access setting, so an agent cannot publish anything by accident. Two backends are offered — the Git CLI, or a pure-Go implementation that falls back to the CLI where it has to.

What it is

A Go binary that exposes Git operations as tools. It can watch more than one repository at once and falls back to the first one when a command does not name a repo.

What you get
  • Working tree status, staged and unstaged diffs, and diffs between two branches or commits (git_status, git_diff_unstaged, git_diff_staged, git_diff)
  • Commit history and the full contents of any single commit (git_log, git_show)
  • Staging, committing, unstaging and branch work (git_add, git_commit, git_reset, git_create_branch, git_checkout)
  • A new repository initialised in place (git_init)
  • Every repository the server is watching, with its path and name (git_list_repositories)
  • Pushing to a remote (git_push), which stays disabled until write access is explicitly enabled
  • A setup command that installs the binary and registers it with your client, with your choice of which tools are auto-approved
Requirements

Go and a working Git installation, or one of the prebuilt binaries for Linux, macOS and Windows. Repository paths are given when the server starts, either as a flag or as plain arguments, and several can be listed at once.

Setup effort

One command — go install github.com/geropl/git-mcp-go@latest