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) を使用した Git リポジトリ ブラウザーの Node.js 実装。
構成
MCP 設定構成ファイルに以下を追加します。
Copy
特徴
サーバーは主に 2 つのツールを提供します。
git_directory_structure
: リポジトリのディレクトリ構造のツリー状の表現を返します- 入力: リポジトリ URL
- 出力: リポジトリ構造のASCIIツリー表現
git_read_important_files
: リポジトリ内の指定されたファイルの内容を読み取り、返します。- 入力: リポジトリのURLとファイルパスのリスト
- 出力: ファイルパスとその内容をマッピングする辞書
実装の詳細
- コア機能には Node.js ネイティブ モジュール (crypto、path、os) を使用します
- 強化されたファイル操作のために fs-extra を活用
- Gitリポジトリ操作にはsimple-gitを使用します
- クリーンなエラー処理とリソースのクリーンアップを実装します
- リポジトリの URL ハッシュに基づいて決定論的な一時ディレクトリを作成します。
- 効率性を高めるために、可能な場合はクローンリポジトリを再利用します。
要件
- Node.js 14.x 以上
- システムにGitがインストールされている
インストール
Copy
使用法
サーバーを起動します。
Copy
サーバーは stdio 上で実行されるため、MCP クライアントと互換性があります。
ライセンス
MIT ライセンス - 詳細についてはLICENSEファイルを参照してください。
You must be authenticated.
MCP を介して Git リポジトリを参照できる Node.js サーバー。ディレクトリ構造を表示したり、リポジトリから重要なファイルを読み取ったりするツールを提供します。