Skip to main content
Glama

GitHub MCP Tools

by NZenitram

GitHub MCPツール

Claude Desktop を介して GitHub API と対話するための Multi-Claude プログラム (MCP)。

特徴

  • GitHub リポジトリと問題を検索する
  • GitHub の問題とプルリクエストを作成、更新、管理する
  • リポジトリの設定と構成を管理する
  • リポジトリのワークフローとアクションを処理する
  • ユーザーと組織を検索する
  • リポジトリの共同作業者とチームを管理する

インストール

  1. このリポジトリをクローンします:
    git clone https://github.com/yourusername/github-mcp.git cd github-mcp
  2. 仮想環境を作成してアクティブ化します。
    # On macOS/Linux python -m venv venv source venv/bin/activate # On Windows python -m venv venv .\venv\Scripts\activate
  3. 依存関係をインストールします:
    pip install -r requirements.txt
  4. プロジェクト ルートに.envファイルを作成します。
    touch .env
  5. GitHub の認証情報を.envファイルに追加します。
    GITHUB_TOKEN=your_personal_access_token_here GITHUB_USERNAME=your_github_username
  6. インストールをテストします。
    # Run all tests python -m pytest # Run a specific test file python -m pytest tests/test_search_repos.py
  7. MCP サーバーを起動します。
    python run.py

環境設定

GitHub 個人アクセストークン

GitHub で認証するには、きめ細かな個人アクセス トークンが必要です。

  1. GitHubアカウントにログインする
  2. 設定 > 開発者向け設定 > 個人アクセストークン > きめ細かなトークンに移動します
  3. 「新しいトークンを生成」をクリックします
  4. トークンを設定します。
    • トークン名:「Claude Desktop Integration」
    • 説明: 「Claude Desktop GitHub 統合用のトークン」
    • 有効期限: 適切な有効期限を選択してください
    • リポジトリアクセス:「すべてのリポジトリ」または特定のリポジトリを選択
    • 権限:
      • リポジトリの権限:
        • アクション: 読み取りと書き込み
        • 内容: 読み書き
        • 問題: 読み書き
        • プルリクエスト: 読み取りと書き込み
        • リポジトリフック: 読み取りと書き込み
        • リポジトリ設定: 読み取りと書き込み
      • 組織の権限 (組織リポジトリで作業する場合):
        • メンバー: 読み取り専用
        • チーム: 読み取り専用
  5. 「トークンを生成」をクリックし、生成されたトークンを安全に保存します。

ツール

リポジトリを検索

さまざまな基準を使用して GitHub リポジトリを検索します。

パラメータ:

  • クエリ: 検索クエリ文字列
  • sort: 並べ替えフィールド (スター、フォーク、更新など)
  • order: 並べ替え順(昇順または降順)
  • max_results: 返される結果の最大数(デフォルト: 10)

問題を作成

指定されたリポジトリに新しい GitHub の問題を作成します。

パラメータ:

  • 所有者: リポジトリの所有者
  • repo: リポジトリ名
  • タイトル: 問題のタイトル
  • 本文: 問題の説明
  • ラベル: 適用するラベルのリスト
  • 担当者: 担当者のユーザー名のリスト

プルリクエストを作成する

新しいプルリクエストを作成します。

パラメータ:

  • 所有者: リポジトリの所有者
  • repo: リポジトリ名
  • タイトル: PRタイトル
  • 本文: PRの説明
  • head: ソースブランチ
  • ベース: ターゲットブランチ
  • draft: ドラフトPRとして作成するかどうか

リポジトリ設定の管理

リポジトリの設定と構成を更新します。

パラメータ:

  • 所有者: リポジトリの所有者
  • repo: リポジトリ名
  • 設定: 更新する設定の辞書

検索の問題

リポジトリ全体の問題を検索します。

パラメータ:

  • クエリ: 検索クエリ文字列
  • 状態: 問題の状態 (オープン、クローズ、すべて)
  • 並べ替え: 並べ替えフィールド
  • 順序: 並べ替え順
  • max_results: 結果の最大数

ワークフローを管理する

GitHub Actions ワークフローを管理します。

パラメータ:

  • 所有者: リポジトリの所有者
  • repo: リポジトリ名
  • workflow_file: ワークフローファイルパス
  • action: 実行するアクション(有効化、無効化、トリガー)

共同作業者の管理

リポジトリの共同作業者を管理します。

パラメータ:

  • 所有者: リポジトリの所有者
  • repo: リポジトリ名
  • ユーザー名: 共同作業者のユーザー名
  • 権限: 権限レベル (プル、プッシュ、管理、維持、トリアージ)

使用例

# Search for repositories search_repos(query="python web framework", sort="stars", max_results=5) # Create a new issue create_issue( owner="username", repo="repository", title="Bug: Login not working", body="Users cannot log in using the login button", labels=["bug", "high-priority"] ) # Create a pull request create_pull_request( owner="username", repo="repository", title="Feature: Add user authentication", body="Implements JWT-based authentication", head="feature/auth", base="main" ) # Search for issues search_issues(query="is:open is:issue author:username", max_results=10) # Manage repository settings manage_repo_settings( owner="username", repo="repository", settings={ "has_issues": True, "has_projects": True, "has_wiki": True } )

発達

テストの実行

# Run all tests python -m pytest # Run with coverage python -m pytest --cov=src tests/ # Run specific test file python -m pytest tests/test_search_repos.py

新しいツールの追加

  1. src/tools/に新しいファイルを作成する
  2. ツール機能を実装する
  3. src/main.pyにツールを登録する
  4. テストをtests/に追加する
  5. README.md のドキュメントを更新します

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成する
  3. 変更を加える
  4. テストを実行する
  5. プルリクエストを送信する

ライセンス

MITライセンス

-
security - not tested
F
license - not found
-
quality - not tested

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.

Claude Desktop を介して GitHub API と対話するためのマルチ Claude プログラム。これにより、ユーザーはリポジトリの検索、問題の管理、プル リクエスト、リポジトリ設定、ワークフロー、共同作業者を管理できます。

  1. 特徴
    1. インストール
      1. 環境設定
        1. GitHub 個人アクセストークン
      2. ツール
        1. リポジトリを検索
        2. 問題を作成
        3. プルリクエストを作成する
        4. リポジトリ設定の管理
        5. 検索の問題
        6. ワークフローを管理する
        7. 共同作業者の管理
      3. 使用例
        1. 発達
          1. テストの実行
          2. 新しいツールの追加
          3. 貢献
        2. ライセンス

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            Enables interaction with GitHub through the GitHub API, supporting file operations, repository management, advanced search, and issue tracking with comprehensive error handling and automatic branch creation.
            Last updated -
            9
            1
            TypeScript
          • A
            security
            A
            license
            A
            quality
            Enables AI assistants to interact with GitHub through the PyGithub library, providing tools for managing issues, repositories, pull requests, and other GitHub operations with intelligent parameter handling and error management.
            Last updated -
            19
            Python
            MIT License
          • -
            security
            F
            license
            -
            quality
            A modular command processor server that enables interaction with GitHub's REST API to fetch user details, repository information, and authenticated user data through natural language commands in Claude.
            Last updated -
            Python
          • -
            security
            A
            license
            -
            quality
            Connects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.
            Last updated -
            JavaScript
            MIT License
            • Apple

          View all related MCP servers

          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/NZenitram/github-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server