GitHub MCP Server
GitHub MCP サーバー
GitHub APIと連携するためのツールを提供するModel Context Protocol(MCP)サーバー。このサーバーにより、LLMエージェントは標準化されたインターフェースを通じてGitHubリポジトリ、課題、プルリクエスト、ブランチ、ファイル、リリースを管理できます。
目次
Related MCP server: GitHub MCP Server
概要
github-mcp-server はモデルコンテキストプロトコル (MCP) を実装し、以下を通じて LLM と外部システム間の標準化された通信を可能にします。
クライアント: Claude Desktop、IDE、およびその他の MCP 互換クライアント
サーバー: プロジェクト管理とコラボレーションのためのツールとリソース
LLM エージェント: GitHub 操作をプログラムで実行する機能を活用する AI モデル。
これは AI モデルと GitHub API 間のブリッジとして機能し、一貫したパターンに従い、認証、検証、エラー処理、レート制限を処理する、明確に定義された一連のツールを提供します。
主な機能:
GitHub API 統合: GitHub の REST API との安全でシームレスな統合
包括的な GitHub 機能: リポジトリ、ブランチ、問題、PR などを完全に管理
アトミック機能アーキテクチャ: 保守性を考慮した整理されたモジュールコード構造
入力検証: すべての操作に対して Zod スキーマによる堅牢な検証
エラー処理: 一貫したエラー分類とレポート
レート制限:GitHub API レート制限処理を組み込み
パフォーマンス重視: 最適化された操作と応答フォーマット
アーキテクチャとコンポーネント
コアシステムアーキテクチャ:
flowchart TB
subgraph API["API Layer"]
direction LR
MCP["MCP Protocol"]
Val["Validation"]
Rate["Rate Limiting"]
MCP --> Val --> Rate
end
subgraph Features["Feature Modules"]
direction LR
Repo["Repository Management"]
Branch["Branch Management"]
Issue["Issue Management"]
PR["Pull Request Management"]
File["File Management"]
Release["Release Management"]
Repo <--> Branch
Repo <--> Issue
Repo <--> PR
Repo <--> File
Branch <--> PR
end
subgraph Services["Services Layer"]
direction LR
GitHub["GitHub Service"]
Mapper["Response Mapper"]
RateLimiter["Rate Limiter"]
GitHub <--> RateLimiter
GitHub <--> Mapper
end
Rate --> Repo
Rate --> Branch
Rate --> Issue
Rate --> PR
Rate --> File
Rate --> Release
Repo --> GitHub
Branch --> GitHub
Issue --> GitHub
PR --> GitHub
File --> GitHub
Release --> GitHub
classDef layer fill:#2d3748,stroke:#4299e1,stroke-width:3px,rx:5,color:#fff
classDef component fill:#1a202c,stroke:#a0aec0,stroke-width:2px,rx:3,color:#fff
classDef api fill:#3182ce,stroke:#90cdf4,stroke-width:2px,rx:3,color:#fff
classDef features fill:#319795,stroke:#81e6d9,stroke-width:2px,rx:3,color:#fff
classDef services fill:#2f855a,stroke:#9ae6b4,stroke-width:2px,rx:3,color:#fff
class API,Features,Services layer
class MCP,Val,Rate api
class Repo,Branch,Issue,PR,File,Release features
class GitHub,Mapper,RateLimiter servicesコアコンポーネント:
MCPプロトコル層:AIアシスタントとの通信を処理する
検証層: スキーマ検証を通じてデータの整合性を保証する
GitHub サービス: GitHub REST API とのコア統合
レートリミッター: APIレート制限の枯渇を防ぐ
機能モジュール: ドメイン固有のGitHub操作
エラー処理: 包括的なエラー処理およびログ記録システム
特徴
リポジトリ管理
作成、一覧表示、取得: 新しいリポジトリを作成し、ユーザーのリポジトリを一覧表示し、詳細なリポジトリ情報を取得します。
検証と構成: リポジトリ設定を検証し、構成オプションを管理します
支店管理
作成、削除、リスト: 安全な検証による完全なブランチライフサイクル管理
保護されたブランチのサポート: 保護されたブランチのフィルタリングと操作
問題管理
作成とリスト: ラベルを使用して詳細な問題を作成し、フィルタリングオプションを使用して問題をリストします
ステータス追跡: 問題の状態 (オープン、クローズ、すべて) でフィルタリング
プルリクエスト管理
作成、更新、マージ、リスト: 完全なプルリクエストライフサイクル管理
レビューとコメントの統合: プルリクエストにレビューとコメントを追加する
マージオプション: さまざまなマージ戦略 (マージ、スカッシュ、リベース) のサポート
ファイル管理
ファイルの作成と更新: コミットメッセージを使用してリポジトリのコンテンツを追加および変更します
Base64エンコードのサポート: テキストとバイナリファイルの両方のコンテンツを処理します
リリース管理
リリースの作成: カスタマイズ可能なオプションでタグ付きリリースを作成します
ドラフトとプレリリースのサポート: ドラフトとプレリリースのワークフローのサポート
インストール
前提条件
Node.js (v16以降)
適切な権限を持つGitHub個人アクセストークン
設定
リポジトリをクローンします。
git clone https://github.com/cyanheads/github-mcp-server.git cd github-mcp-server依存関係をインストールします:
npm installGitHub トークンを使用して、プロジェクト ルートに
.envファイルを作成します。GITHUB_TOKEN=your_github_personal_access_token LOG_LEVEL=info SERVER_NAME=github-mcp-serverプロジェクトをビルドします。
npm run buildサーバーを起動します。
node build/index.js
構成
サーバーは環境変数を通じて設定できます:
環境変数 | 説明 | デフォルト |
| GitHub 個人アクセス トークン (必須) | - |
| ログレベル(デバッグ、情報、警告、エラー、致命的) | 情報 |
| MCPサーバー名 | github-mcp-server |
| MCP サーバーバージョン | 0.1.0 |
| API 呼び出しのタイムアウト(ミリ秒) | 10000 |
| レート制限が有効かどうか | 真実 |
| スロットル前の残りのリクエストの最小数 | 100 |
| レート制限リセット時間に追加する時間バッファ | 5000 |
MCPクライアント設定
MCP クライアント設定に追加:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/github-mcp-server/build/index.js"],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token",
"LOG_LEVEL": "info",
"SERVER_NAME": "github-mcp-server"
}
}
}
}プロジェクト構造
このプロジェクトは、アトミックな機能指向のアーキテクチャ パターンに従います。
/src
/configuration // Application configuration
/dependencyInjection // Tool registry and DI container
/features // Feature modules organized by domain
/repositoryManagement
/resources // Read operations
/modifications // Write operations
/branchManagement
/issueManagement
/pullRequestManagement
/fileManagement
/releaseManagement
/services // External service integrations
/githubAccess // GitHub API client and utilities
/types // Core type definitions
/utilities // Helper functions and utilities各機能ドメインは次のように分割されます。
リソース: データを変更しない読み取り操作
変更: データを作成、更新、または削除する書き込み操作
各操作は次の独自のディレクトリに含まれています。
操作実装ファイル
型定義ファイル
インデックスファイルをエクスポートする
ツール
GitHub MCP Server は、GitHub と対話するための包括的なツール スイートを提供します。
リポジトリ管理ツール
道具 | 説明 |
| 特定のリポジトリに関する詳細情報を取得します。パラメータ: |
| 認証されたユーザーのリポジトリを一覧表示しますパラメータ: |
| 新しい GitHub リポジトリを作成するパラメータ: |
ブランチ管理ツール
道具 | 説明 |
| リポジトリ内のブランチを一覧表示します。パラメータ: |
| 新しいブランチを作成するパラメータ: |
| ブランチを削除するパラメータ: |
問題管理ツール
道具 | 説明 |
| リポジトリに新しい問題を作成しますパラメータ: |
| リポジトリ内の問題を一覧表示するパラメータ: |
プルリクエスト管理ツール
道具 | 説明 |
| 新しいプルリクエストを作成するパラメータ: |
| プルリクエストをマージするパラメータ: |
| 既存のプルリクエストを更新するパラメータ: |
| リポジトリ内のプルリクエストを一覧表示します。パラメータ: |
ファイル管理ツール
道具 | 説明 |
| リポジトリ内のファイルを作成または更新します。パラメータ: |
リリース管理ツール
道具 | 説明 |
| 新しいリリースを作成しますパラメータ: |
発達
プロジェクト構造
このプロジェクトは、厳密な命名規則とディレクトリ構造に従います。
ファイル名:
action.entity.type.ts(例:create.repository.operation.ts)各モジュールには明確に定義された目的がある
型は実装と同じ場所に配置されます
すべてのエクスポートはインデックスファイルを通じて一元管理されます
スクリプト
npm run build- プロジェクトをビルドするnpm run watch- 変更を監視して再構築するnpm run inspector- MCPインスペクターツールを実行するnpm run clean- ビルド成果物をクリーンアップするnpm run rebuild- プロジェクトをクリーンアップして再構築するnpm run tree- ディレクトリツリー表現を生成する
エラー処理
サーバーは包括的なエラー処理戦略を実装します。
標準化されたエラーオブジェクト: 分類された一貫したエラー形式
入力検証: Zodスキーマを使用した事前検証
レート制限保護:GitHub API レート制限の自動処理
エラーカテゴリ:
ネットワーク エラー (接続の問題)
認証エラー(トークンの問題)
検証エラー(無効な入力)
GitHub API エラー (API 固有の問題)
システムエラー(予期しない障害)
詳細なログ記録: すべての操作とエラーの構造化されたログ記録
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
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.…
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- FlicenseBqualityDmaintenanceA 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.11-
- 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-
- -licenseCqualityNot gradedmaintenanceA Model Context Protocol server with GitHub API integration that enables interaction with repositories, issues, pull requests, and file management through a standardized interface.1-
Appeared in Searches
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/cyanheads/github-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server