MCP Git Repo Browser

by razorback16
Verified

local-only server

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

Integrations

  • Provides tools to browse Git repositories, including retrieving directory structures as ASCII trees and reading specified file contents from repositories accessed via URL.

  • Implements Git repository browsing functionality in Node.js, allowing for efficient cloning and exploration of repositories through a standardized interface.

MCP Git 리포 브라우저(Node.js)

MCP(Model Context Protocol)를 사용하는 Git 저장소 브라우저의 Node.js 구현입니다.

구성

MCP 설정 구성 파일에 다음을 추가하세요.

지엑스피1

특징

서버는 두 가지 주요 도구를 제공합니다.

  1. git_directory_structure : 저장소의 디렉토리 구조를 트리 형태로 표현한 것을 반환합니다.
    • 입력: 저장소 URL
    • 출력: 저장소 구조의 ASCII 트리 표현
  2. git_read_important_files : 저장소의 지정된 파일의 내용을 읽고 반환합니다.
    • 입력: 저장소 URL 및 파일 경로 목록
    • 출력: 파일 경로를 해당 내용에 매핑하는 사전

구현 세부 사항

  • 핵심 기능을 위해 Node.js 네이티브 모듈(crypto, path, os)을 사용합니다.
  • 향상된 파일 작업을 위해 fs-extra를 활용합니다.
  • Git 저장소 작업에 simple-git을 사용합니다.
  • 깔끔한 오류 처리 및 리소스 정리를 구현합니다.
  • 저장소 URL 해시를 기반으로 결정론적 임시 디렉토리를 생성합니다.
  • 효율성을 위해 가능한 경우 복제된 저장소를 재사용합니다.

요구 사항

  • Node.js 14.x 이상
  • 시스템에 Git 설치

설치

git clone <repository-url> cd mcp-git-repo-browser npm install

용법

서버를 시작합니다:

node src/index.js

서버는 stdio에서 실행되므로 MCP 클라이언트와 호환됩니다.

특허

MIT 라이센스 - 자세한 내용은 LICENSE 파일을 참조하세요.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

MCP를 통해 Git 저장소를 탐색할 수 있는 Node.js 서버로, 디렉토리 구조를 보고 저장소에서 중요한 파일을 읽을 수 있는 도구를 제공합니다.

  1. Configuration
    1. Features
      1. Implementation Details
        1. Requirements
          1. Installation
            1. Usage
              1. License
                ID: zmmq29sb91