Skip to main content
Glama

GitHub MCPツール

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

特徴

  • GitHub リポジトリと問題を検索する

  • GitHub の問題とプルリクエストを作成、更新、管理する

  • リポジトリの設定と構成を管理する

  • リポジトリのワークフローとアクションを処理する

  • ユーザーと組織を検索する

  • リポジトリの共同作業者とチームを管理する

Related MCP server: GitHub MCP Server

インストール

  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ライセンス

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • -
    license
    -
    quality
    -
    maintenance
    A GitHub integration for Claude Desktop that provides access to GitHub features directly from Claude, offering 15 powerful tools for repository management, issues, pull requests, and code operations.
    1
  • A
    license
    -
    quality
    -
    maintenance
    Connects Claude Desktop directly to GitHub repositories and git commands, enabling users to clone repos, check status, commit changes, push code, create repositories, and manage GitHub resources through natural conversation.
    467
  • F
    license
    -
    quality
    -
    maintenance
    A Model Context Protocol server that provides comprehensive GitHub integration for Claude Desktop, allowing users to manage repositories, issues, and pull requests. It supports file operations, branch management, and repository searches through natural language commands.
    467
  • F
    license
    A
    quality
    D
    maintenance
    Enables Claude to access and manage GitHub repositories dynamically at runtime, including private repos, with tools for browsing files, searching code, and viewing commits, pull requests, and issues.
    11
    1

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor

  • A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…

View all MCP Connectors

Latest Blog Posts

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