Skip to main content
Glama

MCP GitHub Repository Server

by loglmhq

MCP GitHub リポジトリサーバー

GitHubリポジトリのコンテンツへのアクセスを提供するMCP(Model Context Protocol)サーバー。このサーバーにより、AIアシスタントは指定されたGitHubリポジトリからファイルを参照および読み取ることができます。

デモ

デモ

特徴

リソース

  • URI経由でGitHubリポジトリ内の任意のファイルにアクセスする
  • リポジトリの内容を一覧表示し、ディレクトリをナビゲートする
  • ブランチ固有のファイルアクセスのサポート
  • ファイルの内容はプレーンテキストとして提供されます

リソースURI

  • ベース URL 形式: https://api.github.com/repos/{owner}/{repo}/contents/{path}
  • ファイルとディレクトリの両方をサポート
  • ファイルはtext/plain MIMEタイプで提供されます
  • ディレクトリはapplication/x-directory MIME タイプで提供されます。

構成

サーバーには次の環境変数が必要です。

GITHUB_PERSONAL_ACCESS_TOKEN=your_github_token GITHUB_OWNER=repository_owner GITHUB_REPO=repository_name GITHUB_BRANCH=branch_name # Optional

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

インストール

Claude Desktop で使用するには、サーバー構成を追加します。

設定場所

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "mcp-server-github-repo": { "command": "/path/to/mcp-server-github-repo/build/index.js" } } }

API実装

サーバーは、次の 3 つの主要な MCP エンドポイントを実装します。

  1. ListResources - リポジトリ内のファイルとディレクトリを一覧表示します
  2. ReadResource - 特定のファイルの内容を取得します

認証

サーバーは認証にGitHubパーソナルアクセストークンを使用します。トークンにリポジトリのコンテンツにアクセスするための適切な権限があることを確認してください。

エラー処理

サーバーには次のエラー処理が含まれています:

  • 環境変数が見つかりません
  • GitHub APIエラー
  • 無効なパス(例:ディレクトリをファイルとして読み取ろうとする)
  • 認証失敗

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。デバッグにはMCPインスペクターを使用してください。

npm run inspector

これにより、ブラウザでデバッグ ツールにアクセスするための URL が提供されます。

セキュリティノート

  • GitHub 個人アクセストークンを安全に保つ
  • 必要最小限の権限を持つトークンの使用を検討する
  • 大規模なリポジトリにアクセスする場合は、リポジトリのサイズ制限に注意してください。

ライセンス

マサチューセッツ工科大学

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

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

AI アシスタントが指定された GitHub リポジトリからファイルを参照して読み取ることができるサーバー。モデル コンテキスト プロトコルを介してリポジトリの内容にアクセスできるようにします。

  1. デモ
    1. 特徴
      1. リソース
      2. リソースURI
    2. 構成
      1. 発達
        1. インストール
          1. 設定場所
        2. API実装
          1. 認証
          2. エラー処理
        3. デバッグ
          1. セキュリティノート
            1. ライセンス

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.
                Last updated -
                9
                TypeScript
                MIT License
                • Linux
                • Apple
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that enables AI models to interact with GitHub's API, allowing for repository creation and management with descriptions, topics, and website URLs through natural language commands.
                Last updated -
                1
                JavaScript
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.
                Last updated -
                129
                Python
              • -
                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

              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/loglmhq/mcp-server-github-repo'

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