MCP Git リポジトリ ブラウザ (Node.js)
モデル コンテキスト プロトコル (MCP) を使用した Git リポジトリ ブラウザーの Node.js 実装。
構成
MCP 設定構成ファイルに以下を追加します。
特徴
サーバーは主に 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がインストールされている
インストール
使用法
サーバーを起動します。
サーバーは stdio 上で実行されるため、MCP クライアントと互換性があります。
ライセンス
MIT ライセンス - 詳細についてはLICENSEファイルを参照してください。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
MCP を介して Git リポジトリを参照できる Node.js サーバー。ディレクトリ構造を表示したり、リポジトリから重要なファイルを読み取ったりするツールを提供します。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA specialized MCP server for in-depth analysis of git repositories, offering tools for branch overview, time period analysis, file changes, and merge recommendations.Last updated -42Apache 2.0
- AsecurityAlicenseAqualityAn MCP server for gitingest. It allows MCP clients like Claude Desktop, Cursor, Cline etc to quickly extract information about Github repositories including repository summaries, project directory structure, file contents, etcLast updated -3123MIT License
- -securityAlicense-qualityAn MCP server that enables communication with GitLab repositories, allowing interaction with GitLab's API to manage projects, issues, and repositories through natural language.Last updated -9,0611MIT License