GitHub Actions Trigger MCP server

Enables GitHub Actions integration for triggering workflows, fetching action details, and retrieving repository releases through authenticated API interactions
Back to servers
Setup instructions
Provider
NextDrive Team
Release date
Mar 25, 2025
Language
TypeScript
Package
Stats
4.5K downloads
1 star

The GitHub Action Trigger MCP Server provides a Model Context Protocol server for seamless GitHub Actions integration. It enables you to fetch workflows, trigger actions, get releases, and manage pull requests through Claude's interface.

Installation

Using npx (Recommended)

The simplest installation method is using npx in your Claude Desktop configuration file:

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

Local Installation

If you prefer a manual installation:

  1. Install the package globally:
npm install -g @nextdrive/github-action-trigger-mcp
  1. Configure in Claude Desktop:
{
  "mcpServers": {
    "github-action-trigger-mcp": {
      "command": "@nextdrive/github-action-trigger-mcp",
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here"
      }
    }
  }
}

The configuration file is located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

GitHub Token Configuration

There are three ways to configure your GitHub personal access token:

  1. Direct Configuration (Recommended) - In your Claude Desktop config file:
"env": {
  "GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here"
}
  1. Global Environment Variable - Set the GITHUB_TOKEN environment variable:
# On Linux/macOS
export GITHUB_TOKEN=your_github_token

# On Windows
set GITHUB_TOKEN=your_github_token
  1. Local Configuration File - Edit ~/.nextdrive-github-action-trigger-mcp/config.json:
{
  "githubToken": "your_github_token"
}

Available Tools

Get GitHub Actions

Retrieves available workflows from a repository:

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

Example response:

[
  {
    "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"
  }
]

Get GitHub Action Details

Retrieves detailed information about a specific GitHub Action:

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

Example response:

{
  "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"
  }
}

Trigger GitHub Workflow

Triggers a GitHub workflow with custom inputs:

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

Example response:

{
  "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"
  }
}

Get Latest Releases

Retrieves the latest 2 releases from a repository:

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

Example response:

{
  "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"
      }
    }
  ]
}

Enable Pull Request Auto-merge

Enables auto-merge for a specific pull request:

{
  "owner": "username-or-org",
  "repo": "repository-name",
  "pull_number": 123,
  "merge_method": "SQUASH"
}

Example response:

{
  "success": true,
  "message": "Auto-merge enabled successfully",
  "pullRequest": {
    "id": "PR_kwDOABCD123_456",
    "title": "Add new feature",
    "number": 123,
    "autoMergeEnabled": true,
    "enabledAt": "2025-08-21T03:00:00Z",
    "mergeMethod": "SQUASH"
  }
}

Requirements and Notes

For triggering workflows:

  • The workflow must support the workflow_dispatch event
  • Your GitHub token needs the workflow scope permission
  • Input parameters must match those defined in the workflow

For enabling auto-merge:

  • The repository must have auto-merge enabled in settings
  • Your GitHub token must have write permissions
  • The PR must be open and not already have auto-merge enabled

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

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

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later