Git

Provides Git operations via MCP for multi-repo automation, including status, diffs, commits, logs, branches, and pushes.
  • go

30

GitHub Stars

go

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "geropl-git-mcp-go": {
      "command": "./git-mcp-go",
      "args": [
        "serve",
        "-v",
        "/path/to/repo1",
        "/path/to/repo2"
      ]
    }
  }
}

You can run a Git MCP Server to read, search, and manipulate Git repositories through a structured MCP interface. It supports multiple repositories, lets you choose between shell-based Git CLI and a Go library implementation, and includes a range of Git operations you can automate or delegate to an AI assistant.

How to use

You interact with the Git MCP Server through an MCP client to perform common Git operations across one or more repositories. You can monitor multiple repositories at once, choose between two implementation modes, and enable write-access for remote operations when needed.

Key usage patterns you can apply include: checking status, viewing diffs for unstaged or staged changes, viewing logs, creating or switching branches, and pushing to remotes. When several repositories are configured, operations typically apply to the first repository by default unless you specify a particular repository path.

You can start the server in two modes: shell mode, which uses Git CLI commands, or go-git mode, which uses a Go library for Git operations where possible. The server can be started with verbose logging and can be set to allow write operations to remote repositories when you need them.

The server exposes a set of tools that cover the main Git actions you would perform in automation tasks, including status checks, diffs, commits, pushes, logs, and repository management. These tools can be auto-approved for use by an AI assistant in secure setups.

How to install

Prerequisites you need before installing: Go 1.18 or higher and Git installed on your system.

Install from source to build the server locally.

# Clone the repository
git clone https://github.com/geropl/git-mcp-go.git
cd git-mcp-go

# Build the server
go build -o git-mcp-go .

Or install the server into your Go workspace so you can run it from your PATH.

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

If you prefer to run directly from the source directory, you can start the server using the provided binary after building.

Additional content

Multi-repository support lets you monitor and operate on several Git repositories at once. You can specify repositories using flags, as positional arguments, or a combination of both. When multiple repositories are configured and you don’t specify a repository for a command, the server will default to the first repository.

The server provides a set of commands to manage repositories and perform common Git operations programmatically. The available operations include reading the repository status, inspecting changes, showing logs, creating and switching branches, initializing repositories, and pushing changes to remotes.

You can start the server in verbose mode to see detailed logs and you can enable write access to permit remote pushes. The mode you run in (shell or go-git) determines whether operations rely on Git CLI commands or a Go Git library.

When you are configuring your client or deployment, you can choose a standard stdio-based MCP command to run the server locally and pass repository paths as needed. If you manage multiple repositories, the server will use the first repository by default for operations without an explicit target.

Tools and capabilities

The Git MCP Server exposes a set of Git operations you can leverage via the MCP interface, including the following functions: git_status, git_diff_unstaged, git_diff_staged, git_diff, git_commit, git_add, git_reset, git_log, git_create_branch, git_checkout, git_show, git_init, git_push, and git_list_repositories. Each tool provides a view or modification of repository state, enabling you to build AI-assisted workflows that require up-to-date repository information or apply changes programmatically.

Notes on configuration and usage

If you run multiple repositories, you can specify one or more repository paths on the command line. The server will default to the first repository when a specific path isn’t provided for a command.

The server supports two implementation modes: shell (default) which uses Git CLI commands, and go-git which uses a Go library for Git operations where possible. Use the --mode flag to switch between these modes.

Write access is disabled by default to avoid unintended changes. You can enable it with the --write-access flag when you start the server if you need remote push capabilities.

Available tools

git_status

Shows the working tree status for the configured repository.

git_diff_unstaged

Displays changes in the working directory that are not yet staged.

git_diff_staged

Shows changes that have been staged for commit.

git_diff

Shows differences between branches or commits.

git_commit

Saves changes to the repository with a commit.

git_add

Adds file contents to the staging area.

git_reset

Unstages all changes that were staged.

git_log

Shows the commit logs.

git_create_branch

Creates a new branch from an optional base branch.

git_checkout

Switches between branches.

git_show

Displays the contents of a commit.

git_init

Initializes a new Git repository.

git_push

Pushes local commits to a remote repository (requires write access).

git_list_repositories

Lists all available Git repositories monitored by the server.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational