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

Related MCP server: GitHub MCP Server
特徴
リソース
URI経由でGitHubリポジトリ内の任意のファイルにアクセスする
リポジトリの内容を一覧表示し、ディレクトリをナビゲートする
ブランチ固有のファイルアクセスのサポート
ファイルの内容はプレーンテキストとして提供されます
リソースURI
ベース URL 形式:
https://api.github.com/repos/{owner}/{repo}/contents/{path}ファイルとディレクトリの両方をサポート
ファイルは
text/plainMIMEタイプで提供されますディレクトリは
application/x-directoryMIME タイプで提供されます。
構成
サーバーには次の環境変数が必要です。
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.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-server-github-repo": {
"command": "/path/to/mcp-server-github-repo/build/index.js"
}
}
}API実装
サーバーは、次の 3 つの主要な MCP エンドポイントを実装します。
ListResources- リポジトリ内のファイルとディレクトリを一覧表示しますReadResource- 特定のファイルの内容を取得します
認証
サーバーは認証にGitHubパーソナルアクセストークンを使用します。トークンにリポジトリのコンテンツにアクセスするための適切な権限があることを確認してください。
エラー処理
サーバーには次のエラー処理が含まれています:
環境変数が見つかりません
GitHub APIエラー
無効なパス(例:ディレクトリをファイルとして読み取ろうとする)
認証失敗
デバッグ
MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。デバッグにはMCPインスペクターを使用してください。
npm run inspectorこれにより、ブラウザでデバッグ ツールにアクセスするための URL が提供されます。
セキュリティノート
GitHub 個人アクセストークンを安全に保つ
必要最小限の権限を持つトークンの使用を検討する
大規模なリポジトリにアクセスする場合は、リポジトリのサイズ制限に注意してください。
ライセンス
マサチューセッツ工科大学
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA 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.34083MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.18MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to perform GitHub operations including repository management, file operations, issue tracking, and pull request creation.2
- FlicenseNot gradedqualityNot gradedmaintenanceModel Context Protocol server that enables interaction with GitHub repositories, issues, pull requests, and search functionality through natural language.1
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server that gives your AI access to the source code and docs of all public github repos
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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