GG

geropl/git-mcp-go

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

37 stars 11 forks 품질 48 트렌드 0

geropl/git-mcp-go는 MCP 서버 후보가 https://github.com/geropl/git-mcp-go.에서 가져온

개요

geropl/git-mcp-go는 MCP 서버 후보가 https://github.com/geropl/git-mcp-go.에서 가져온

개요(AI 번역)

Git 저장소 상호 작용 및 자동화에 대한 모델 Context Protocol (MCP) 서버, 이동에서 작성. 이 서버는 큰 언어 모델을 통해 Git 저장소를 읽고, 검색 및 조작 할 수있는 도구를 제공합니다.

특징

이 MCP 서버는 다음과 같은 Git 작업을 도구로 제공합니다.

  • 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 저장소 초기화
  • git push: 원격 저장소에 로컬 커밋을 밀어 ([T0] 플래그가 필요합니다)
  • git list repositories: 모든 Git 저장소 목록

설치

# 필수품

  • 1.18이상
  • 시스템에서 Git 설치

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Git MCP Server (Go)

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:

  • 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_reset: Unstages all staged changes
  • git_log: Shows the commit logs
  • git_create_branch: Creates a new branch from an optional base branch
  • git_checkout: Switches branches
  • git_show: Shows the contents of a commit
  • git_init: Initialize a new Git repository
  • git_push: Pushes local commits to a remote repository (requires --write-access flag)
  • git_list_repositories: 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

# 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

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:

# Run with verbose logging
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

"mcpServers": { "git": { "command": "/path/to/git-mcp-go", "args": ["serve", "-r=/path/to/repo1,/path/to/repo2", "--mode", "shell"] } }