Skip to main content
Glama

Git MCP

by kjozsa

깃 MCP

로컬 저장소에서 Git 작업을 관리하기 위한 MCP 서버입니다.

설치

Smithery를 통해 설치

Smithery를 통해 Claude Desktop에 Git MCP를 자동으로 설치하려면:

지엑스피1

수동 설치

uvx install git-mcp

구성

다음 JSON 구성 스니펫을 사용하여 MCP 서버를 추가합니다.

{ "mcpServers": { "git-mcp": { "command": "uvx", "args": ["git-mcp"], "env": { "GIT_REPOS_PATH": "/path/to/your/git/repositories" } } } }

특징 및 사용법

환경 변수

  • GIT_REPOS_PATH : Git 저장소가 있는 디렉토리 경로(필수)

이를 사용자 환경에서 설정할 수도 있고, 서버를 실행하는 디렉토리에 .env 파일을 만들 수도 있습니다.

사용 가능한 방법

저장소 목록

구성된 경로에 있는 모든 Git 저장소를 나열합니다.

  • 매개변수: 없음
  • 반환: 저장소 이름 목록
마지막_git_태그를_가져오기

지정된 저장소에서 마지막 Git 태그를 찾습니다.

  • 매개변수: repo_name (Git 저장소 이름)
  • 반환: version (태그 이름) 및 date (태그 생성 날짜)가 포함된 사전
마지막 태그 이후의 커밋 목록

마지막 Git 태그와 HEAD 사이의 커밋 메시지를 나열합니다.

  • 매개변수:
    • repo_name : Git 저장소의 이름
    • max_count (선택 사항): 반환할 커밋의 최대 수
  • 반환: hash , author , datemessage 포함된 사전 목록
create_git_tag

지정된 저장소에 새로운 git 태그를 생성합니다.

  • 매개변수:
    • repo_name : git 저장소의 이름
    • tag_name : 생성할 태그의 이름
    • message (선택 사항): 주석이 달린 태그에 대한 메시지(제공되지 않으면 가벼운 태그가 생성됨)
  • 반환: status , version (태그 이름), date (태그 생성 날짜), type (주석 있음 또는 경량)이 포함된 사전
푸시_git_태그

기존 git 태그를 기본 원격 저장소에 푸시합니다.

  • 매개변수:
    • repo_name : git 저장소의 이름
    • tag_name : 푸시할 태그의 이름
  • 반환: status , remote (원격의 이름), tag (태그의 이름), message (성공 메시지)가 포함된 사전
저장소 새로 고침

메인 브랜치(또는 대체용으로 마스터)를 체크아웃하고 모든 원격 브랜치에서 가져와서 저장소를 새로 고칩니다.

  • 매개변수:
    • repo_name : git 저장소의 이름
  • 반환: status , repository , branchpull_results (각 원격에 대한 결과)가 포함된 사전

문제 해결

  • 저장소를 찾을 수 없음 : GIT_REPOS_PATH 올바르게 설정되었고 저장소가 있는지 확인하세요.
  • 태그를 찾을 수 없습니다 . 저장소에 아직 태그가 없습니다.

개발

# Install dependencies uv pip install -r requirements.txt # Run in dev mode with Inspector mcp dev git_mcp/server.py

테스트

이 프로젝트에는 두 개의 테스트 스크립트가 포함되어 있습니다.

  1. test_git_mcp.py - MCP 서버를 사용하지 않고 기본 Git 명령 기능을 직접 테스트합니다.
  2. test_mcp_server.py - 서버 인스턴스를 시작하고 호출하여 MCP 서버 기능을 테스트합니다.

테스트를 실행하려면:

# Test the Git command functionality python test_git_mcp.py # Test the MCP server (requires the git-mcp package to be installed) python test_mcp_server.py

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

로컬 저장소에서 Git 작업을 관리하기 위한 MCP 서버로, 표준화된 인터페이스를 통해 사용자가 저장소를 나열하고, 태그를 가져오고 생성하고, 커밋을 나열하고, 태그를 푸시하고, 저장소를 새로 고칠 수 있습니다.

  1. 설치
    1. Smithery를 통해 설치
    2. 수동 설치
  2. 구성
    1. 특징 및 사용법
      1. 환경 변수
      2. 사용 가능한 방법
      3. 문제 해결
    2. 개발
      1. 테스트

        Related MCP Servers

        • A
          security
          F
          license
          A
          quality
          MCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.
          Last updated -
          18
          4
          3
          TypeScript
          • Linux
          • Apple
        • A
          security
          A
          license
          A
          quality
          MCP Tool Server for Gitee, supporting the management of repository files/branches, Issues, and Pull Requests.
          Last updated -
          20
          10
          4
          TypeScript
          MIT License
        • A
          security
          F
          license
          A
          quality
          An MCP server that enables integration with GitHub Enterprise API, allowing users to access repository information, manage issues, pull requests, workflows, and other GitHub features through Cursor.
          Last updated -
          16
          33
          14
          TypeScript
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          An MCP server that provides semantic search over local git repositories, enabling users to clone repositories, process branches, and search code through vectorized code chunks.
          Last updated -
          TypeScript
          MIT License
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/kjozsa/git-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server