GitHub Action Trigger MCP Server

Integrations

  • Provides tools for interacting with GitHub repositories, fetching the latest releases, and accessing repository information.

  • Enables fetching available GitHub Actions workflows from repositories, getting detailed information about specific actions, and triggering workflow dispatch events with custom inputs.

GitHub Action トリガー MCP サーバー

GitHub Actions 統合用のモデル コンテキスト プロトコル サーバー。

概要

これは、GitHub Actions との統合用に設計された TypeScript ベースの MCP サーバーです。以下の機能を提供します。

  • リポジトリから利用可能な GitHub Actions を取得するためのツール
  • 特定のGitHubアクションに関する詳細情報を取得するためのツール
  • GitHub ワークフロー ディスパッチ イベントをトリガーするためのツール
  • GitHub リポジトリから最新のリリースを取得するためのツール

特徴

ツール

  • get_github_actions - リポジトリで利用可能な GitHub Actions を取得する
    • 必須パラメータ: owner (リポジトリの所有者、ユーザー名または組織) およびrepo (リポジトリ名)
    • オプションパラメータ: token (GitHub 個人アクセストークン、プライベートリポジトリへのアクセスや API レート制限の増加に使用)
    • ワークフローID、名前、パス、状態、URL、コンテンツを含むJSONデータを返します。
  • get_github_action - 入力やその要件など、特定の GitHub Action に関する詳細情報を取得します。
    • 必須パラメータ: owner (アクションの所有者、ユーザー名または組織) およびrepo (アクションのリポジトリ名)
    • オプションパラメータ:
      • path : アクション定義ファイルへのパス (デフォルト: 'action.yml')
      • ref : Git 参照 (ブランチ、タグ、またはコミット SHA、デフォルト: 'main')
      • token : GitHub個人アクセストークン(オプション)
    • 名前、説明、作成者、入力(および必須かどうか)など、アクションに関する詳細情報を返します。
  • trigger_github_action - GitHubワークフローをトリガーし、関連するパラメータを渡す
    • 必須パラメータ:
      • owner : リポジトリの所有者(ユーザー名または組織)
      • repo : リポジトリ名
      • workflow_id : トリガーするワークフローのIDまたはファイル名
    • オプションパラメータ:
      • ref : ワークフローをトリガーする git 参照 (デフォルト: 'main')
      • inputs : ワークフローに渡す入力(ワークフローの定義済み入力と一致する必要があります)
      • token : GitHub 個人アクセストークン (ワークフロースコープが必要です)
    • ステータス、URL などを含むワークフロー実行情報を返します。
  • get_github_release - GitHub リポジトリから最新の 2 つのリリースを取得します
    • 必須パラメータ: owner (リポジトリの所有者、ユーザー名または組織) およびrepo (リポジトリ名)
    • オプションパラメータ: token (GitHub 個人アクセストークン、オプション)
    • 最新の2つのリリースに関する情報を返します

インストール

推奨インストール: npx の使用

インストールして使用する最も簡単な方法は、手動でローカルにインストールせずに、Claude Desktop 構成ファイルでnpxコマンドを使用することです。

{ "mcpServers": { "github-action-trigger-mcp": { "command": "npx", "args": [ "-y", "@nextdrive/github-action-trigger-mcp" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here" } } } }

この方法の利点:

  • ローカルパッケージのインストールは不要
  • 最新バージョンを自動的に使用します
  • 一度設定すればすぐに使用可能
  • 組み込みのGitHubトークン設定

ローカルインストール

手動でインストールする場合は、次の手順に従ってください。

  1. パッケージをインストールします。
npm install -g @nextdrive/github-action-trigger-mcp
  1. Claude Desktop 構成での使用:

MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "github-action-trigger-mcp": { "command": "@nextdrive/github-action-trigger-mcp", "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here" } } } }

GitHubトークンの設定

GitHub API(特にプライベートリポジトリやワークフロートリガー)にアクセスするには、GitHub個人アクセストークンを設定する必要があります。設定方法はいくつかあります。

方法 1 (推奨): Claude Desktop での直接設定

Claude Desktop 構成ファイルのenvフィールドを使用してトークンを直接設定します。

"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here" }

方法2: グローバル環境変数

GITHUB_TOKEN環境変数を設定します。

# On Linux/MacOS export GITHUB_TOKEN=your_github_token # On Windows set GITHUB_TOKEN=your_github_token

方法3: ローカル構成ファイル

設定ファイルを編集します。

~/.nextdrive-github-action-trigger-mcp/config.json

GitHub トークンを設定します。

{ "githubToken": "your_github_token" }

この構成ファイルのテンプレートは、サーバーの初回起動時に自動的に作成されます。

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

開発中の自動再構築の場合:

npm run watch

デバッグ

デバッグには MCP Inspector を使用します。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

npmへの公開

このパッケージを npm に公開する場合は、次の手順に従ってください。

  1. npm にログインしていること、および@nextdrive組織に公開する権限があることを確認してください。
    npm login
  2. プロジェクトをビルドします。
    npm run build
  3. npm に公開します (組織スコープのパッケージはデフォルトでは非公開ですが、公開するには--access publicを使用します)。
    npm publish --access public

公開後は、誰でもnpx @nextdrive/github-action-trigger-mcpコマンドを使用してこのツールを実行したり、Claude Desktop 構成で使用したりできます。

使用例

GitHub Actionsのリストを取得する

リポジトリの GitHub Actions を取得するには、 get_github_actionsツールを使用してください。

{ "owner": "username-or-org", "repo": "repository-name" }

デフォルトのトークンが設定されている場合は、プライベート リポジトリにアクセスするときに自動的に使用されます。

応答例:

[ { "id": 12345678, "name": "CI", "path": ".github/workflows/ci.yml", "state": "active", "url": "https://github.com/owner/repo/actions/workflows/ci.yml", "content": "name: CI\n\non:\n push:\n branches: [ main ]\n pull_request:\n branches: [ main ]\n\njobs:\n build:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v2\n - name: Setup Node.js\n uses: actions/setup-node@v2\n with:\n node-version: 16.x\n - name: Install dependencies\n run: npm ci\n - name: Build\n run: npm run build\n - name: Test\n run: npm test\n" } ]

詳細なGitHubアクション情報の取得

特定のアクションに関する詳細情報を取得するには、 get_github_actionツールを使用します。

{ "owner": "actions", "repo": "checkout", "ref": "v4" }

応答例:

{ "name": "Checkout", "description": "Check out a Git repository at a particular version", "author": "GitHub", "inputs": [ { "name": "repository", "description": "Repository name with owner. For example, actions/checkout", "default": "", "required": false }, { "name": "ref", "description": "The branch, tag or SHA to checkout.", "default": "", "required": false } ], "runs": { "using": "node20", "main": "dist/index.js" } }

GitHubワークフローのトリガー

GitHub ワークフローをトリガーするには、 trigger_github_actionツールを使用してください。

{ "owner": "username-or-org", "repo": "repository-name", "workflow_id": "ci.yml", "inputs": { "deploy_environment": "production", "debug_enabled": "true" } }

応答例:

{ "success": true, "message": "Workflow dispatch event triggered successfully", "run": { "id": 12345678, "url": "https://github.com/owner/repo/actions/runs/12345678", "status": "queued", "conclusion": null, "created_at": "2025-03-19T06:45:12Z", "triggered_by": "API" } }

注: ワークフローをトリガーするには以下が必要です。

  1. ワークフローはworkflow_dispatchイベントをサポートするように設定する必要があります
  2. GitHubトークンにはworkflowスコープ権限が必要です
  3. 渡される入力パラメータはワークフローで定義されたものと一致する必要があります

最新リリースの入手

get_github_releaseツールを使用して、リポジトリから最新の 2 つのリリースを取得します。

{ "owner": "username-or-org", "repo": "repository-name" }

応答例:

{ "count": 2, "releases": [ { "id": 12345678, "name": "v1.0.0", "tag_name": "v1.0.0", "published_at": "2025-03-15T10:00:00Z", "draft": false, "prerelease": false, "html_url": "https://github.com/owner/repo/releases/tag/v1.0.0", "body": "Release notes for version 1.0.0", "assets": [ { "name": "app-v1.0.0.zip", "size": 1234567, "download_count": 42, "browser_download_url": "https://github.com/owner/repo/releases/download/v1.0.0/app-v1.0.0.zip", "created_at": "2025-03-15T10:05:00Z", "updated_at": "2025-03-15T10:05:00Z" } ], "author": { "login": "username", "html_url": "https://github.com/username" } }, { "id": 87654321, "name": "v0.9.0", "tag_name": "v0.9.0", "published_at": "2025-03-01T10:00:00Z", "draft": false, "prerelease": true, "html_url": "https://github.com/owner/repo/releases/tag/v0.9.0", "body": "Pre-release notes for version 0.9.0", "assets": [], "author": { "login": "username", "html_url": "https://github.com/username" } } ] }

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

GitHub Actions との統合を可能にするモデル コンテキスト プロトコル サーバー。これにより、ユーザーは利用可能なアクションを取得したり、特定のアクションに関する詳細情報を取得したり、ワークフロー ディスパッチ イベントをトリガーしたり、リポジトリ リリースを取得したりできます。

  1. Overview
    1. Features
      1. Tools
    2. Installation
      1. Recommended Installation: Using npx
      2. Local Installation
      3. GitHub Token Configuration
    3. Development
      1. Debugging
    4. Publishing to npm
      1. Usage Examples
        1. Getting a List of GitHub Actions
        2. Getting Detailed GitHub Action Information
        3. Triggering a GitHub Workflow
        4. Getting Latest Releases
      ID: 6ufwxw61ny