G
geropl/git-mcp-go
Git MCP based on mcp-go
在 GitHub 查看 ↗链接已于 2026-11-12 核查 · HTTP 200 · 打开的是厂商自己的官网
安装与配置
- 复制上面的命令
- 粘成
claude_desktop_config.json里mcpServers的一项(本地服务器用 command + args,示例见 客户端接法) - 重启客户端
取自该仓库的安装命令
go install github.com/geropl/git-mcp-go@latest
解析自我们于 2026-11-06 抓取的该仓库 README;我们未执行过。
这条是仓库自己写的安装方式,不是 MCP 客户端配置,所以不生成 JSON。
配置项的键名以你的客户端为准:客户端与 CLI
- 来源明细
- 收录自 abordage/awesome-mcp 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
- 收录与活跃
- 收录于 2026-11-05 · 最近见到 2026-11-14 · 共见到 10 次 · 被 10 个来源列出
- 评分构成
- 综合分 1,003 · 10 个来源 · mcp
- 安装
go install github.com/geropl/git-mcp-go@latest
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是
go install github.com/geropl/git-mcp-go@latest。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
我们收录于 2026-11-05;最近见到 2026-11-14。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
# Git MCP Server (Go)
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A Model Context Protocol (MCP) server for Git repository interaction and automation, written in Go. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
## Features
This MCP server provides the following Git operations as tools:
gitstatus: Shows the working tree status
gitdiffunstaged: Shows changes in the working directory that are not yet staged
gitdiffstaged: Shows changes that are staged for commit
gitdiff: Shows differences between branches or commits
gitcommit: Records changes to the repository
gitadd: Adds file contents to the staging area
gitreset: Unstages all staged changes
gitlog: Shows the commit logs
gitcreatebranch: Creates a new branch from an optional base branch
gitcheckout: Switches branches
gitshow: Shows the contents of a commit
gitinit: Initialize a new Git repository
gitpush: Pushes local commits to a remote repository (requires --write-access flag)
gitlistrepositories: Lists all available Git repositories
## Installation
### Prerequisites
Go 1.18 or higher
Git installed on your system
### Download Prebuilt Binaries
You can download prebuilt binaries for your platform from the GitHub Releases page.
### Building from Source
bash
# 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 .
### Install with go install
bash
go install github.com/geropl/git-mcp-go@latest
## Usage
### Command Line Structure
The Git MCP Server uses a command-line structure with subcommands:
git-mcp-go
├── serve [flags] [repository-paths...]
│ ├── --repository, -r # Repository paths (multiple ways to specify)
│ ├── --mode
│ ├── --write-access
│ └── --verbose, -v
└── setup [flags] [repository-paths...]
├── --repository, -r # Repository paths (multiple ways to specify)
├── --mode
├── --write-access
├── --auto-approve
└── --tool
### Multi-Repository Support
The Git MCP Server can now monitor and operate on multiple repositories simultaneously. You can specify repositories in several ways:
1. Using the -r/--repository flag:
With comma-separated paths: -r=/path/to/repo1,/path/to/repo2
With multiple flag instances: -r=/path/to/repo1 -r=/path/to/repo2
2. As positional arguments: serve /path/to/repo1 /path/to/repo2
3. A combination of both approaches
When using multiple repositories, the server will default to the first repository for operations where a specific repository is not specified.
### serve Command
The serve command starts the Git MCP server:
bash
# Run with verbose logging
./git-mcp-go serve -v /path/to/repo1 /path/to/repo2 /path/to/repo3
# Run with go-git implementation
./git-mcp-go serve --mode go-git -r=/path/to/repo1,/path/to/repo2
# Enable write access for remote operations
./git-mcp-go serve -r=/path/to/repo1,/path/to/repo2 --write-access
The --mode flag allows you to choose between two different implementations:
shell: Uses the Git CLI commands via shell execution (default)
go-git: Uses the go-git library for Git operations where possible
The --write-access flag enables operations that modify remote state (currently only the push operation). By default, this is disabled for safety.
### setup Command
The setup command sets up the Git MCP server for use with an AI assistant. It copies itself to ~/mcp-servers/git-mcp-go and modifies the tools config (cline: clinemcpsettings.json) to use that binary.
## Features
This MCP server provides the following Git operations as tools:
gitstatus: Shows the working tree status
gitdiffunstaged: Shows changes in the working directory that are not yet staged
gitdiffstaged: Shows changes that are staged for commit
gitdiff: Shows differences between branches or commits
gitcommit: Records changes to the repository
gitadd: Adds file contents to the staging area
gitreset: Unstages all staged changes
gitlog: Shows the commit logs
gitcreatebranch: Creates a new branch from an optional base branch
gitcheckout: Switches branches
gitshow: Shows the contents of a commit
gitinit: Initialize a new Git repository
gitpush: Pushes local commits to a remote repository (requires --write-access flag)
gitlistrepositories: Lists all available Git repositories
## Installation
### Prerequisites
Go 1.18 or higher
Git installed on your system
### Download Prebuilt Binaries
You can download prebuilt binaries for your platform from the GitHub Releases page.
### Building from Source
bash
# 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 .
### Install with go install
bash
go install github.com/geropl/git-mcp-go@latest
## Usage
### Command Line Structure
The Git MCP Server uses a command-line structure with subcommands:
git-mcp-go
├── serve [flags] [repository-paths...]
│ ├── --repository, -r # Repository paths (multiple ways to specify)
│ ├── --mode
│ ├── --write-access
│ └── --verbose, -v
└── setup [flags] [repository-paths...]
├── --repository, -r # Repository paths (multiple ways to specify)
├── --mode
├── --write-access
├── --auto-approve
└── --tool
### Multi-Repository Support
The Git MCP Server can now monitor and operate on multiple repositories simultaneously. You can specify repositories in several ways:
1. Using the -r/--repository flag:
With comma-separated paths: -r=/path/to/repo1,/path/to/repo2
With multiple flag instances: -r=/path/to/repo1 -r=/path/to/repo2
2. As positional arguments: serve /path/to/repo1 /path/to/repo2
3. A combination of both approaches
When using multiple repositories, the server will default to the first repository for operations where a specific repository is not specified.
### serve Command
The serve command starts the Git MCP server:
bash
# Run with verbose logging
./git-mcp-go serve -v /path/to/repo1 /path/to/repo2 /path/to/repo3
# Run with go-git implementation
./git-mcp-go serve --mode go-git -r=/path/to/repo1,/path/to/repo2
# Enable write access for remote operations
./git-mcp-go serve -r=/path/to/repo1,/path/to/repo2 --write-access
The --mode flag allows you to choose between two different implementations:
shell: Uses the Git CLI commands via shell execution (default)
go-git: Uses the go-git library for Git operations where possible
The --write-access flag enables operations that modify remote state (currently only the push operation). By default, this is disabled for safety.
### setup Command
The setup command sets up the Git MCP server for use with an AI assistant. It copies itself to ~/mcp-servers/git-mcp-go and modifies the tools config (cline: clinemcpsettings.json) to use that binary.
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/geropl-git-mcp-go/)
- 来源
- awesome · https://github.com/geropl/git-mcp-go
- 按领域浏览
- MCP 服务
- 收录来源
- 10 个独立来源
- 收录于
- 今天
同类推荐
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。