
GitHub Action Trigger MCP Server
一个模型上下文协议服务器,可以与 GitHub Actions 集成,允许用户获取可用的 Actions、获取关于特定 Actions 的详细信息、触发工作流分发事件以及获取仓库发布版本。
Tools
get_github_actions
Get available GitHub Actions for a repository
get_github_action
Get detailed information about a specific GitHub Action, including inputs and their requirements
trigger_github_action
Trigger a GitHub workflow dispatch event with custom inputs
get_github_release
Get the latest 2 releases from a GitHub repository
README
GitHub Action Trigger MCP 服务器
用于 GitHub Actions 集成的模型上下文协议 (MCP) 服务器。
概述
这是一个基于 TypeScript 的 MCP 服务器,专为 GitHub Actions 集成而设计。它提供以下功能:
- 用于从存储库获取可用 GitHub Actions 的工具
- 用于获取有关特定 GitHub Action 的详细信息的工具
- 用于触发 GitHub workflow dispatch 事件的工具
- 用于从 GitHub 存储库获取最新版本的工具
功能
工具
-
get_github_actions
- 获取存储库的可用 GitHub Actions- 必需参数:
owner
(存储库所有者,用户名或组织)和repo
(存储库名称) - 可选参数:
token
(GitHub 个人访问令牌,用于访问私有存储库或增加 API 速率限制) - 返回包含 workflow ID、名称、路径、状态、URL 和内容的 JSON 数据
- 必需参数:
-
get_github_action
- 获取有关特定 GitHub Action 的详细信息,包括输入及其要求- 必需参数:
owner
(Action 所有者,用户名或组织)和repo
(Action 的存储库名称) - 可选参数:
path
:Action 定义文件的路径(默认值:'action.yml')ref
:Git 引用(分支、标签或提交 SHA,默认值:'main')token
:GitHub 个人访问令牌(可选)
- 返回有关 Action 的详细信息,包括名称、描述、作者、输入(以及它们是否是必需的)等。
- 必需参数:
-
trigger_github_action
- 触发 GitHub workflow 并传递相关参数- 必需参数:
owner
:存储库所有者(用户名或组织)repo
:存储库名称workflow_id
:要触发的 workflow 的 ID 或文件名
- 可选参数:
ref
:触发 workflow 的 git 引用(默认值:'main')inputs
:传递给 workflow 的输入(必须与 workflow 定义的输入匹配)token
:GitHub 个人访问令牌(必须具有 workflow 作用域)
- 返回 workflow 运行信息,包括状态、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 令牌配置
本地安装
如果您更喜欢手动安装,请按照以下步骤操作:
- 安装软件包:
npm install -g @nextdrive/github-action-trigger-mcp
- 在 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,特别是对于私有存储库或 workflow 触发器,您需要配置 GitHub 个人访问令牌。 有几种方法可以做到这一点:
方法 1(推荐):在 Claude Desktop 中直接配置
通过 env
字段直接在 Claude Desktop 配置文件中设置令牌:
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_github_token_here"
}
方法 2:全局环境变量
设置 GITHUB_TOKEN
环境变量:
# 在 Linux/MacOS 上
export GITHUB_TOKEN=your_github_token
# 在 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
Inspector 将提供一个 URL 以访问浏览器中的调试工具。
发布到 npm
如果要将此软件包发布到 npm,请按照以下步骤操作:
-
确保您已登录到 npm 并且有权发布到
@nextdrive
组织:npm login
-
构建项目:
npm run build
-
发布到 npm(组织范围的软件包默认是私有的,使用
--access public
使其公开):npm publish --access public
发布后,任何人都可以使用 npx @nextdrive/github-action-trigger-mcp
命令运行此工具,或在他们的 Claude Desktop 配置中使用它。
使用示例
获取 GitHub Actions 列表
使用 get_github_actions
工具获取存储库的 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 Action 信息
使用 get_github_action
工具获取有关特定 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 Workflow
使用 trigger_github_action
工具触发 GitHub workflow:
{
"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"
}
}
注意:触发 workflow 需要:
- workflow 必须配置为支持
workflow_dispatch
事件 - GitHub 令牌必须具有
workflow
作用域权限 - 传递的输入参数必须与 workflow 中定义的参数匹配
获取最新版本
使用 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"
}
}
]
}
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。