GitHub Integration MCP Server

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 個人アクセス トークンを環境変数として設定します。

export GITHUB_TOKEN=<your-github-token>

プライベートリポジトリにアクセスするには、トークンに少なくとも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の制限に従って切り捨てられる可能性があります
  • トークンには適切なリポジトリアクセス権限が必要です
-
security - not tested
F
license - not found
-
quality - not tested

GitHub プル リクエストから差分を抽出し、ユーザーがリポジトリ内のブランチ間の変更を取得して分析できるようにします。

  1. Available Tools
    1. get_diff_pr
  2. Authentication
    1. Error Handling
      1. Technical Details
        1. Limitations
          ID: hs0xf42a7n