Git

Git

Allows LLM to interact with a local git repository, incl. optional push support.

29
Stars
6
Forks
6
Releases

Overview

The Git MCP Server (Go) implements the Model Context Protocol to enable AI agents to interact with local Git repositories. It exposes a set of tooling commands (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, git_list_repositories) that cover common read and write operations, status checks, history, branching, and repository discovery. It supports two implementation modes: shell (using the Git CLI commands) and go-git (a pure Go implementation) with fallback to CLI for capabilities not covered by go-git. The server can monitor multiple repositories simultaneously and supports various ways to specify them (flags, positional args, or combinations). When multiple repositories are configured, operations default to the first repository if a specific one isn’t provided. The project provides a dedicated tool to list repositories and their paths, details, and counts. Auto-approval and write-access mechanisms allow safe integration with AI assistants, and the setup process demonstrates how to register and configure the server for use with an AI assistant. The repository includes tests across both modes and CI pipelines with multi-platform releases.

Details

Owner
geropl
Language
Go
License
Updated
2025-12-07

Features

git_status

Shows the working tree status.

git_diff_unstaged

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

git_diff_staged

Shows changes that are staged for commit.

git_diff

Shows differences between branches or commits.

git_commit

Records changes to the repository.

git_add

Adds file contents to the staging area.

git_log

Shows the commit logs.

git_list_repositories

Lists all available Git repositories monitored by the server.

Audience

AI developersUse MCP server to empower LLMs to read, search, and automate Git workflows.
DevOps teamsManage and automate multiple repositories with controlled write access via MCP tools.

Tags

gitmcpllmgogo-gitgit-opsautomationmultiple-reposclisetup