Gerrit Review MCP Server

2
  • Apple
  • Linux

Integrations

  • Provides integration with Gerrit code review system, allowing retrieval of change details, file modifications with diff content, and comparison between patchsets to support code review workflows.

Gerrit 리뷰 MCP 서버

이 MCP 서버는 Gerrit 코드 검토 시스템과의 통합을 제공하여 AI 어시스턴트가 간단한 인터페이스를 통해 코드 변경 사항과 세부 정보를 검토할 수 있도록 합니다.

특징

이 서버는 코드 검토를 위한 간소화된 툴셋을 제공합니다.

변경 사항 세부 정보 가져오기

지엑스피1

  • 파일 및 패치 세트를 포함한 전체 변경 정보를 가져옵니다.
  • 수정된 각 파일에 대한 자세한 diff 정보를 표시합니다.
  • 파일 변경, 삽입 및 삭제를 표시합니다.
  • 특정 패치 세트 검토 지원
  • 다음을 포함한 포괄적인 변경 세부 정보를 반환합니다.
    • 프로젝트 및 지점 정보
    • 저자 및 리뷰어 세부 정보
    • 댓글 및 리뷰 내역
    • diff 콘텐츠로 파일 수정
    • 현재 패치 세트 정보

패치셋 차이점 비교

fetch_patchset_diff(change_id: str, base_patchset: str, target_patchset: str, file_path: Optional[str] = None)
  • 변경 사항의 두 패치 세트 간 차이점을 비교합니다.
  • 특정 파일 차이점 또는 변경된 모든 파일 보기
  • 패치 세트 버전 전반에 걸쳐 코드 수정 사항 분석
  • 검토 반복을 통해 변경 사항의 진화를 추적합니다.

사용 예

완전한 변경 사항 검토:

# Fetch latest patchset of change 23824 change = fetch_gerrit_change("23824")

특정 패치 세트를 비교하세요:

# Compare differences between patchsets 1 and 2 for change 23824 diff = fetch_patchset_diff("23824", "1", "2")

특정 파일 변경 사항 보기:

# Get diff for a specific file between patchsets file_diff = fetch_patchset_diff("23824", "1", "2", "path/to/file.swift")

필수 조건

  • Python 3.10 이상(Python 3.11 권장)
  • Gerrit HTTP 액세스 자격 증명
  • Gerrit 설정에서 생성된 HTTP 비밀번호
  • mcp[cli] 패키지 저장소(비공개 패키지)에 대한 액세스

설치

  1. 이 저장소를 복제하세요:
git clone <repository-url> cd gerrit-review-mcp
  1. 가상 환경을 만들고 활성화하세요.
# For macOS/Linux: python -m venv .venv source .venv/bin/activate # For Windows: python -m venv .venv .venv\Scripts\activate
  1. 이 패키지를 종속성과 함께 편집 가능한 모드로 설치하세요:
pip install -e .

구성

  1. 환경 변수 설정:
export GERRIT_HOST="gerrit.example.com" # Your Gerrit server hostname export GERRIT_USER="your-username" # Your Gerrit username export GERRIT_HTTP_PASSWORD="your-http-password" # Your Gerrit HTTP password

또는 .env 파일을 만듭니다.

GERRIT_HOST=gerrit.example.com GERRIT_USER=your-username GERRIT_HTTP_PASSWORD=your-http-password
  1. HTTP 비밀번호 생성:
  • Gerrit 웹 인터페이스에 로그인하세요
  • 설정 > HTTP 자격 증명으로 이동하세요.
  • 새로운 비밀번호 생성
  • 비밀번호를 환경 또는 .env 파일에 복사하세요.

MCP 구성

이 MCP 서버를 Cursor와 함께 사용하려면 ~/.cursor/mcp.json 파일에 해당 구성을 추가해야 합니다. 필요한 구성은 다음과 같습니다.

{ "mcpServers": { "gerrit-review-mcp": { "command": "/path/to/your/workspace/gerrit-code-review-mcp/.venv/bin/python", "args": [ "/path/to/your/workspace/gerrit-code-review-mcp/server.py", "--transport", "stdio" ], "cwd": "/path/to/your/workspace/gerrit-code-review-mcp", "env": { "PYTHONPATH": "/path/to/your/workspace/gerrit-code-review-mcp", "VIRTUAL_ENV": "/path/to/your/workspace/gerrit-code-review-mcp/.venv", "PATH": "/path/to/your/workspace/gerrit-code-review-mcp/.venv/bin:/usr/local/bin:/usr/bin:/bin" }, "stdio": true } } }

/path/to/your/workspace 실제 작업 공간 경로로 바꾸세요. 예를 들어 프로젝트가 /Users/username/projects/gerrit-code-review-mcp 에 있는 경우 해당 경로를 사용하세요.

구성의 모든 경로가 다음을 가리키는지 확인하세요.

  • 가상 환경의 Python 인터프리터
  • 프로젝트의 server.py 파일
  • 올바른 작업 디렉토리
  • PATH에 있는 가상 환경의 bin 디렉토리

구현 세부 사항

서버는 Gerrit REST API를 사용하여 Gerrit과 상호 작용하며 다음을 제공합니다.

  • 빠르고 안정적인 변경 정보 검색
  • HTTP 다이제스트 인증을 사용한 보안 인증
  • 다양한 Gerrit REST 엔드포인트 지원
  • 깔끔하고 유지 관리가 가능한 코드베이스
  • 안전한 통신을 위한 HTTPS 암호화

문제 해결

연결 문제가 발생하는 경우:

  1. HTTP 비밀번호가 올바르게 설정되었는지 확인하세요
  2. GERRIT_HOST 설정을 확인하세요
  3. Gerrit 서버에서 HTTPS 액세스가 활성화되어 있는지 확인하세요.
  4. curl을 사용하여 연결을 테스트합니다.
    curl -u "username:http-password" https://your-gerrit-host/a/changes/
  5. 귀하의 계정에 대한 Gerrit 액세스 권한을 확인하세요

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다.

기여하다

여러분의 참여를 환영합니다!

  1. 저장소를 포크하세요
  2. 기능 브랜치 생성
  3. 변경 사항을 만드세요
  4. 풀 리퀘스트 제출
-
security - not tested
F
license - not found
-
quality - not tested

Gerrit 코드 검토 시스템과 통합을 제공하여 AI 어시스턴트가 변경 세부 정보를 가져오고 코드 검토를 위해 패치 세트 차이점을 비교할 수 있도록 합니다.

  1. 특징
    1. 변경 사항 세부 정보 가져오기
    2. 패치셋 차이점 비교
    3. 사용 예
  2. 필수 조건
    1. 설치
      1. 구성
        1. MCP 구성
          1. 구현 세부 사항
            1. 문제 해결
              1. 특허
                1. 기여하다

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    Provides code manipulation, execution, and version control capabilities. It allows AI assistants to read, write, and execute code while maintaining a history of changes.
                    Last updated -
                    8
                    Python
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A code review tool for Cursor IDE that uses OpenAI's GPT models to provide intelligent code analysis and suggestions.
                    Last updated -
                    2
                    Python
                    • Linux
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Cursor-compatible toolkit that provides intelligent coding assistance through custom AI tools for code architecture planning, screenshot analysis, code review, and file reading capabilities.
                    Last updated -
                    1,261
                    2
                    TypeScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A server that integrates with Cursor IDE to provide code review functionality for Azure repositories, enabling AI-powered pull request analysis and feedback.
                    Last updated -
                    1
                    TypeScript

                  View all related MCP servers

                  ID: b5msw2883g