Skip to main content
Glama
Ryan0204

github-repo-mcp

by Ryan0204

GitHub リポジトリ MCP

鍛冶屋のバッジ

目次

Related MCP server: UIThub MCP Server

✨ 主な機能

  • 💻 Cursor、Windsurf、Claude Desktop、およびstdioプロトコルをサポートするその他のMCPクライアントと互換性があります

  • 🔎 GitHubの公開リポジトリの内容を閲覧する

  • 📂 リポジトリのディレクトリとサブディレクトリを移動する

  • 📝 コードとテキストファイルの内容を表示する

  • 📦 パッケージマネージャーによる簡単なインストール

はじめる

前提条件

サーバーをインストールするには、システムに次のものが必要です。

  • Node.js 18歳以上

  • npmまたはyarn

ステップ1. インストール

Smithery、NPX、または IDE の mcp.json の設定を使用して、GitHub Repo MCP をインストールして実行できます。

macOS

npx github-repo-mcp

ウィンドウズNPX

cmd /c npx -y github-repo-mcp

.cursor/mcp.json 経由の Windows NPX

{
  "mcpServers": {
    "github-repo-mcp": {
      "command": "wsl",
      "args": [
        "bash",
        "-c",
        "cmd /c npx -y github-repo-mcp"
      ],
      "enabled": true
    }
  }
}

Windows NPX は .cursor/mcp.json 経由で (パスが設定されていない場合)

# Find the full path to npx first
which npx
{
  "mcpServers": {
    "github-repo-mcp": {
      "command": "wsl",
      "args": [
        "bash",
        "-c",
        "'/home/[username]/.nvm/versions/node/v20.18.0/bin/npx github-repo-mcp'"
      ],
      "enabled": true
    }
  }
}

Smithery経由でインストール

Smithery経由で Claude Desktop 用の GitHub Repo MCP を自動的にインストールするには:

npx -y @smithery/cli install @Ryan0204/github-repo-mcp --client claude

反映されない場合は、数秒待つか、更新ボタンを数回クリックしてください。それでも反映されない場合は、正しいコマンドを入力したかどうかを確認してください。

ステップ2. 構成

GitHub Repo MCP サーバーは、GitHub API にアクセスするときに、より高いレート制限のために GitHub トークンを使用できます。

環境変数

変数

必須

デフォルト

説明

GITHUB_TOKEN

いいえ

なし

より高いレート制限のための GitHub 個人アクセス トークン

GitHub トークンの設定(オプション)

サーバーは認証なしで動作しますが、GitHub API には認証されていないリクエストに対するレート制限が大幅に低く設定されています。レート制限を上げるには、以下の手順を実行してください。

  1. https://github.com/settings/tokensで個人アクセストークンを作成します。

  2. mcp.json でトークンを環境変数として設定します。

{
  "mcpServers": {
    "github-repo-mcp": {
      "command": "...",
      "args": [
        ...
      ],
      "env": {
        "GITHUB_TOKEN": "Your_Github_Token"
      }
      "enabled": true,
    }
  }
}

機能の概要

リポジトリ閲覧ツール

サーバーは、GitHub リポジトリと対話するための 3 つの主要なツールを提供します。

1. getRepoAllDirectories

GitHub リポジトリのルートにあるすべてのファイルとディレクトリを一覧表示します。

2. getRepoDirectories

GitHub リポジトリ内の特定のディレクトリの内容を一覧表示します。

  • パラメータ:

    • repoUrl : GitHubリポジトリのURL

    • path : 取得するディレクトリパス(例:"src")

3. getRepoFile

GitHub リポジトリから特定のファイルの内容を取得して表示します。

  • パラメータ:

    • repoUrl : GitHubリポジトリのURL

    • path : 取得するファイルパス(例: "src/index.js")

使用例

AI アシスタントでこれらのツールを使用する方法の例をいくつか示します。

  1. リポジトリ ルートの参照: AI アシスタントに「 https://github.com/Ryan0204/github-repo-mcpにあるリポジトリの内容を見せて」と依頼します。

  2. 特定のディレクトリの探索: 「 https://github.com/Ryan0204/github-repo-mcpの src ディレクトリにはどのようなファイルがありますか?」と質問します。

  3. ファイルの表示: 「 https://github.com/Ryan0204/github-repo-mcpの README.md ファイルを表示してください」と質問する

制限事項

  • レート制限:認証がない場合、GitHub API には厳しいレート制限(1 時間あたり 60 リクエスト)があります。

  • プライベートリポジトリ: 適切な権限を持つトークンが提供されない限り、パブリックリポジトリにのみアクセスできます。

  • バイナリファイル: サーバーは一般的なバイナリファイル拡張子を検出し、その内容を表示しません。

  • 大きなファイル: GitHub API では取得できるファイルのサイズに制限があります

トラブルシューティング

以下に一般的な問題とその解決策を示します。

  • レート制限を超えました: 設定セクションの説明に従ってGitHubトークンを設定してください

  • コマンドが見つかりません: パッケージがグローバルにインストールされていることを確認してください

  • 接続エラー: インターネット接続とGitHub APIのステータスを確認してください

問題が発生した場合は、出力でエラー メッセージを確認するか、GitHub リポジトリで問題を作成してください。


お楽しみください!☺️

Available Tools

3 tools
getRepoAllDirectoriesD
ParametersJSON Schema
NameRequiredDescriptionDefault
repoUrlYesThe URL of the Github repo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

getRepoDirectoriesD
ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesThe directory path to fetch
repoUrlYesThe URL of the Github repo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

getRepoFileD
ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesThe file path to fetch
repoUrlYesThe URL of the Github repo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedgetRepoAllDirectories
    • First observedgetRepoDirectories
    • First observedgetRepoFile

TDQS

D1.4/5.0

Scored across 3 tools

Disambiguation2/5

The tools have overlapping purposes with unclear boundaries: getRepoAllDirectories and getRepoDirectories appear to serve similar directory-related functions without descriptions to clarify their differences, while getRepoFile is distinct but the directory tools are ambiguous. This overlap will likely cause misselection between the two directory tools.

Naming Consistency4/5

The naming follows a consistent camelCase pattern (getRepoAllDirectories, getRepoDirectories, getRepoFile) with a clear verb_noun structure, though the lack of descriptions makes it harder to assess intent. There are no deviations in style, but the similarity in names for the directory tools slightly reduces clarity.

Tool Count2/5

With only 3 tools, this server feels thin for a GitHub repository domain, as it lacks essential operations like create, update, delete, or search. The limited scope suggests incomplete coverage, making it difficult for agents to perform comprehensive repository management tasks.

Completeness1/5

The tool surface is severely incomplete for a GitHub repository server: it only includes retrieval tools for directories and files, missing core CRUD operations (e.g., create repo, update files, delete items), search functionality, and lifecycle management. This will cause significant agent failures in handling typical repository workflows.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers