github-repo-mcp
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 個人アクセス トークン |
GitHub トークンの設定(オプション)
サーバーは認証なしで動作しますが、GitHub API には認証されていないリクエストに対するレート制限が大幅に低く設定されています。レート制限を上げるには、以下の手順を実行してください。
https://github.com/settings/tokensで個人アクセストークンを作成します。
mcp.json でトークンを環境変数として設定します。
{
"mcpServers": {
"github-repo-mcp": {
"command": "...",
"args": [
...
],
"env": {
"GITHUB_TOKEN": "Your_Github_Token"
}
"enabled": true,
}
}
}機能の概要
リポジトリ閲覧ツール
サーバーは、GitHub リポジトリと対話するための 3 つの主要なツールを提供します。
1. getRepoAllDirectories
GitHub リポジトリのルートにあるすべてのファイルとディレクトリを一覧表示します。
パラメータ:
repoUrl: GitHubリポジトリのURL(例: " https://github.com/owner/repo ")
2. getRepoDirectories
GitHub リポジトリ内の特定のディレクトリの内容を一覧表示します。
パラメータ:
repoUrl: GitHubリポジトリのURLpath: 取得するディレクトリパス(例:"src")
3. getRepoFile
GitHub リポジトリから特定のファイルの内容を取得して表示します。
パラメータ:
repoUrl: GitHubリポジトリのURLpath: 取得するファイルパス(例: "src/index.js")
使用例
AI アシスタントでこれらのツールを使用する方法の例をいくつか示します。
リポジトリ ルートの参照: AI アシスタントに「 https://github.com/Ryan0204/github-repo-mcpにあるリポジトリの内容を見せて」と依頼します。
特定のディレクトリの探索: 「 https://github.com/Ryan0204/github-repo-mcpの src ディレクトリにはどのようなファイルがありますか?」と質問します。
ファイルの表示: 「 https://github.com/Ryan0204/github-repo-mcpの README.md ファイルを表示してください」と質問する
制限事項
レート制限:認証がない場合、GitHub API には厳しいレート制限(1 時間あたり 60 リクエスト)があります。
プライベートリポジトリ: 適切な権限を持つトークンが提供されない限り、パブリックリポジトリにのみアクセスできます。
バイナリファイル: サーバーは一般的なバイナリファイル拡張子を検出し、その内容を表示しません。
大きなファイル: GitHub API では取得できるファイルのサイズに制限があります
トラブルシューティング
以下に一般的な問題とその解決策を示します。
レート制限を超えました: 設定セクションの説明に従ってGitHubトークンを設定してください
コマンドが見つかりません: パッケージがグローバルにインストールされていることを確認してください
接続エラー: インターネット接続とGitHub APIのステータスを確認してください
問題が発生した場合は、出力でエラー メッセージを確認するか、GitHub リポジトリで問題を作成してください。
お楽しみください!☺️
Available Tools
3 toolsgetRepoAllDirectoriesD
| Name | Required | Description | Default |
|---|---|---|---|
| repoUrl | Yes | The URL of the Github repo |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The directory path to fetch | |
| repoUrl | Yes | The URL of the Github repo |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The file path to fetch | |
| repoUrl | Yes | The URL of the Github repo |
TDQS
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.
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.
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.
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.
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.
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.
3 tool updates
v1.0.0- First observed
getRepoAllDirectories - First observed
getRepoDirectories - First observed
getRepoFile
TDQS
Scored across 3 tools
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.
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.
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.
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
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that allows AI assistants to browse and read files from specified GitHub repositories, providing access to repository contents via the Model Context Protocol.6MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that enables Claude to retrieve and analyze code from GitHub repositories through the uithub API.4 npm21MIT
- FlicenseNot gradedqualityDmaintenanceA server-side implementation that handles context processing between GitHub repositories and AI models, enabling seamless integration of AI capabilities with codebases through the Model Context Protocol.1-
- FlicenseNot gradedqualityNot gradedmaintenanceModel Context Protocol server that enables interaction with GitHub repositories, issues, pull requests, and search functionality through natural language.1-