Skip to main content
Glama

git MCP server

Official

mcp-server-git: git MCP 서버

개요

Git 저장소 상호작용 및 자동화를 위한 모델 컨텍스트 프로토콜 서버입니다. 이 서버는 대규모 언어 모델(LML)을 통해 Git 저장소를 읽고, 검색하고, 조작할 수 있는 도구를 제공합니다.

mcp-server-git은 현재 초기 개발 단계에 있습니다. 서버 개발 및 개선 과정에서 기능 및 사용 가능한 도구가 변경 및 확장될 수 있습니다.

도구

  1. git_status
    • 작업 트리 상태를 보여줍니다
    • 입력:
      • repo_path (문자열): Git 저장소 경로
    • 반환: 작업 디렉토리의 현재 상태를 텍스트 출력으로 반환합니다.
  2. git_diff_unstaged
    • 아직 준비되지 않은 작업 디렉토리의 변경 사항을 표시합니다.
    • 입력:
      • repo_path (문자열): Git 저장소 경로
    • 반환: 스테이징되지 않은 변경 사항의 Diff 출력
  3. git_diff_staged
    • 커밋을 위해 준비된 변경 사항을 표시합니다.
    • 입력:
      • repo_path (문자열): Git 저장소 경로
    • 반환: 단계적 변경 사항의 Diff 출력
  4. git_diff
    • 브랜치 또는 커밋 간의 차이점을 보여줍니다.
    • 입력:
      • repo_path (문자열): Git 저장소 경로
      • target (문자열): 비교할 대상 브랜치 또는 커밋
    • 반환: 현재 상태와 대상을 비교하는 Diff 출력
  5. git_commit
    • 저장소에 대한 변경 사항을 기록합니다.
    • 입력:
      • repo_path (문자열): Git 저장소 경로
      • message (문자열): 커밋 메시지
    • 반환: 새로운 커밋 해시로 확인
  6. git_add
    • 스테이징 영역에 파일 내용을 추가합니다.
    • 입력:
      • repo_path (문자열): Git 저장소 경로
      • files (문자열[]): 스테이징할 파일 경로 배열
    • 반환: 스테이징된 파일 확인
  7. git_reset
    • 모든 단계적 변경 사항을 취소합니다.
    • 입력:
      • repo_path (문자열): Git 저장소 경로
    • 반환: 재설정 작업 확인
  8. git_log
    • 커밋 로그를 보여줍니다
    • 입력:
      • repo_path (문자열): Git 저장소 경로
      • max_count (숫자, 선택 사항): 표시할 커밋의 최대 수(기본값: 10)
    • 반환: 해시, 작성자, 날짜 및 메시지가 포함된 커밋 항목 배열
  9. git_create_branch
    • 새로운 지점을 만듭니다
    • 입력:
      • repo_path (문자열): Git 저장소 경로
      • branch_name (문자열): 새 지점의 이름
      • start_point (문자열, 선택 사항): 새 브랜치의 시작 지점
    • 반환: 지점 생성 확인
  10. git_checkout
  • 지점을 전환합니다
  • 입력:
    • repo_path (문자열): Git 저장소 경로
    • branch_name (문자열): 체크아웃할 지점의 이름
  • 반환: 지점 전환 확인
  1. git_show
  • 커밋의 내용을 보여줍니다
  • 입력:
    • repo_path (문자열): Git 저장소 경로
    • revision (문자열): 표시할 revision(커밋 해시, 브랜치 이름, 태그)
  • 반환: 지정된 커밋의 내용
  1. git_init
  • Git 저장소를 초기화합니다
  • 입력:
    • repo_path (문자열): git repo를 초기화할 디렉토리 경로
  • 반환: 저장소 초기화 확인

설치

uv 사용(권장)

uv 사용하면 별도의 설치가 필요하지 않습니다. uvx 사용하여 mcp-server-git을 직접 실행합니다.

PIP 사용

또는 pip를 통해 mcp-server-git 설치할 수 있습니다.

지엑스피1

설치 후 다음을 사용하여 스크립트로 실행할 수 있습니다.

python -m mcp_server_git

구성

Claude Desktop과 함께 사용

claude_desktop_config.json 에 다음을 추가하세요:

"mcpServers": { "git": { "command": "uvx", "args": ["mcp-server-git", "--repository", "path/to/git/repo"] } }
  • 참고: '/Users/username'을 이 도구에서 액세스할 수 있도록 하려는 경로로 바꾸세요.
"mcpServers": { "git": { "command": "docker", "args": ["run", "--rm", "-i", "--mount", "type=bind,src=/Users/username,dst=/Users/username", "mcp/git"] } }
"mcpServers": { "git": { "command": "python", "args": ["-m", "mcp_server_git", "--repository", "path/to/git/repo"] } }

VS Code를 사용한 사용

빠른 설치를 위해 아래의 원클릭 설치 버튼 중 하나를 사용하세요...

수동 설치의 경우, VS Code의 사용자 설정(JSON) 파일에 다음 JSON 블록을 추가하세요. Ctrl + Shift + P 를 누르고 Preferences: Open Settings (JSON) 입력하면 됩니다.

원하는 경우, 작업 공간의 .vscode/mcp.json 파일에 추가할 수 있습니다. 이렇게 하면 다른 사용자와 구성을 공유할 수 있습니다.

.vscode/mcp.json 파일에는 mcp 키가 필요하지 않습니다.

{ "mcp": { "servers": { "git": { "command": "uvx", "args": ["mcp-server-git"] } } } }

Docker 설치의 경우:

{ "mcp": { "servers": { "git": { "command": "docker", "args": [ "run", "--rm", "-i", "--mount", "type=bind,src=${workspaceFolder},dst=/workspace", "mcp/git" ] } } } }

Zed 와 함께 사용

Zed settings.json에 다음을 추가합니다.

"context_servers": [ "mcp-server-git": { "command": { "path": "uvx", "args": ["mcp-server-git"] } } ],
"context_servers": { "mcp-server-git": { "command": { "path": "python", "args": ["-m", "mcp_server_git"] } } },

디버깅

MCP 검사기를 사용하여 서버를 디버깅할 수 있습니다. UVX 설치의 경우:

npx @modelcontextprotocol/inspector uvx mcp-server-git

또는 특정 디렉토리에 패키지를 설치했거나 해당 디렉토리에서 개발 중인 경우:

cd path/to/servers/src/git npx @modelcontextprotocol/inspector uv run mcp-server-git

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log 실행하면 서버의 로그가 표시되어 문제를 디버깅하는 데 도움이 될 수 있습니다.

개발

로컬 개발을 수행하는 경우 변경 사항을 테스트하는 방법은 두 가지가 있습니다.

  1. MCP 검사기를 실행하여 변경 사항을 테스트하세요. 실행 지침은 디버깅을 참조하세요.
  2. Claude 데스크톱 앱을 사용하여 테스트해 보세요. claude_desktop_config.json 파일에 다음을 추가하세요.

도커

{ "mcpServers": { "git": { "command": "docker", "args": [ "run", "--rm", "-i", "--mount", "type=bind,src=/Users/username/Desktop,dst=/projects/Desktop", "--mount", "type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro", "--mount", "type=bind,src=/path/to/file.txt,dst=/projects/path/to/file.txt", "mcp/git" ] } } }

자외선

{ "mcpServers": { "git": { "command": "uv", "args": [ "--directory", "/<path to mcp-servers>/mcp-servers/src/git", "run", "mcp-server-git" ] } }

짓다

Docker 빌드:

cd src/git docker build -t mcp/git .

특허

이 MCP 서버는 MIT 라이선스에 따라 라이선스가 부여됩니다. 즉, MIT 라이선스의 조건에 따라 소프트웨어를 자유롭게 사용, 수정 및 배포할 수 있습니다. 자세한 내용은 프로젝트 저장소의 LICENSE 파일을 참조하세요.

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

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

Git 저장소 상호작용 및 자동화를 위한 모델 컨텍스트 프로토콜 서버입니다. 이 서버는 대규모 언어 모델(LML)을 통해 Git 저장소를 읽고, 검색하고, 조작할 수 있는 도구를 제공합니다.

  1. 개요
    1. 도구
  2. 설치
    1. uv 사용(권장)
    2. PIP 사용
  3. 구성
    1. Claude Desktop과 함께 사용
    2. VS Code를 사용한 사용
    3. Zed 와 함께 사용
  4. 디버깅
    1. 개발
      1. 도커
      2. 자외선
    2. 짓다
      1. 특허

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that enables Large Language Models to interact with Git repositories through a robust API, supporting operations like repository initialization, cloning, file staging, committing, and branch management.
          Last updated -
          21
          482
          65
          TypeScript
          Apache 2.0
        • -
          security
          F
          license
          -
          quality
          Provides integration with Github through the Model Context Protocol (MCP), allowing Large Language Models to interact with Github's repositories, issues, pull requests and search functionality.
          Last updated -
          1
          TypeScript
          • Apple
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that enables AI assistants to perform GitHub operations including repository management, file operations, issue tracking, and pull request creation.
          Last updated -
          1
          TypeScript
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that generates prompts based on Git repository content, including a command to generate PR descriptions from diffs.
          Last updated -
          1
          Python
          MIT License

        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/modelcontextprotocol/git'

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