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.
Integrations
Provides functionality to extract diffs from GitHub Pull Requests, allowing retrieval of PR diff content by specifying repository owner, repo name, and PR number.
Serves as the runtime environment for the MCP server, requiring version 18.0.0 or higher for operation.
Used for input validation within the MCP server to ensure proper parameter formatting before API requests are processed.
GitHub 統合
GitHub MCP サーバーは、プル リクエストから差分を抽出する機能を提供します。
利用可能なツール
差分取得
GitHub プル リクエストから diff コンテンツを取得します。
パラメータ:
owner
: リポジトリの所有者/組織名repo
: リポジトリ名pr_number
: プルリクエスト番号
戻り値: 次のものを含むオブジェクト:
content
: PRの差分を含む文字列
認証
必須:GitHub 個人アクセス トークンを環境変数として設定します。
プライベートリポジトリにアクセスするには、トークンに少なくともrepo
スコープの権限が必要です。パブリックリポジトリの場合は、 public_repo
スコープのトークンで十分です。
エラー処理
サーバーは標準のエラー処理を実装します。
- トークンが見つからないか無効な場合は
ErrorCode.AuthenticationError
が返されます - リポジトリの詳細が無効の場合
ErrorCode.InvalidParams
が返されます。 - 存在しない PR は
ErrorCode.NotFound
を返します - 失敗した差分フェッチはフォーマットされたエラーメッセージを返します
- SIGINT による正常なシャットダウン
技術的な詳細
- Highlight AI MCP SDKを使用して構築
- GitHub REST API v3 を使用
- Zodによる入力検証
- stdioベースのMCPサーバーとして実行
- Node.js >=18.0.0 をサポート
制限事項
- GitHub APIの制限に基づいてレート制限が適用されます
- 大きな差分はGitHub APIの制限に従って切り捨てられる可能性があります
- トークンには適切なリポジトリアクセス権限が必要です
This server cannot be installed
GitHub プル リクエストから差分を抽出し、ユーザーがリポジトリ内のブランチ間の変更を取得して分析できるようにします。