Token导航 LogoToken导航TokenDH.com
Act Testing MCP logo
开发工具未说明官方级别未说明来源级核验

Act Testing MCP

MCP Server

一个用于本地测试GitHub Actions工作流的MCP服务器,提供工作流列表、运行、验证和调试功能。

工具数

4

提示词数

0

GitHub Stars

0

资源数

0
JavaScriptClaude开发工具ClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

GarthDB

提供方

GarthDB

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

![Verified on MseeP](https://mseep.ai/app/f18a0332-2186-49a9-a29d-c0de85307440)

动作测试MCP

](https://www.npmjs.com/package/act-testing-mcp) ](https://www.npmjs.com/package/act-testing-mcp) ![License](LICENSE) ![CI](https://github.com/GarthDB/act-testing-mcp/actions)

用于本地测试GitHub Actions工作流的模型上下文协议(MCP)服务器 联系/行动.

目的

此MCP为人工智能助手(如Claude)提供了直接访问本地测试GitHub Actions工作流的权限,消除了使用CI/CD管道时的试错开发周期。

特性

  • 🔍 列出工作流:在任何存储库中发现所有可用的GitHub Actions工作流
  • ▶️ 运行工作流:使用act在本地执行工作流
  • ✅ 验证语法:提交前检查工作流文件是否有错误
  • 🎭 自定义事件:使用自定义事件数据测试工作流,以模拟不同的场景
  • 🐛 调试支持:详细的日志记录和错误报告
  • 📊 依赖性监控:轨道 act 兼容性和检测破坏性更改
  • 🔐 供应链安全:发布了可验证构建的npm出处证明

先决条件

  • Docker桌面 (跑步)
  • 联系/行动 已安装(安装指南)
  • Node.js 20+

安装游泳设备

# macOS
brew install act

# Linux (with curl)
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash

# Windows (with chocolatey)
choco install act-cli

# Or download from releases
# https://github.com/nektos/act/releases

安装

npm install -g act-testing-mcp

验证包完整性

此软件包随发布 以增强供应链安全。您可以验证包裹的证明:

npm audit signatures

或者克隆并在本地运行:

git clone https://github.com/GarthDB/act-testing-mcp.git
cd act-testing-mcp
npm install

配置

MCP设置

添加到您的MCP配置中(例如。, .cursor/mcp.json 对于游标IDE):

选项1:使用npx(推荐)

{
  "mcpServers": {
    "act-testing": {
      "command": "npx",
      "args": ["act-testing-mcp"]
    }
  }
}

选项2:使用全局安装

{
  "mcpServers": {
    "act-testing": {
      "command": "act-testing-mcp"
    }
  }
}

选项3:使用自定义项目路径(如果需要)

{
  "mcpServers": {
    "act-testing": {
      "command": "npx",
      "args": ["act-testing-mcp"],
      "env": {
        "PROJECT_ROOT": "/path/to/your/project"
      }
    }
  }
}

方案4:地方发展

{
  "mcpServers": {
    "act-testing": {
      "command": "node",
      "args": ["./path/to/act-testing-mcp/index.js"],
      "env": {
        "PROJECT_ROOT": "/path/to/your/project",
        "ACT_BINARY": "act"
      }
    }
  }
}

动作配置

创建一个 .actrc 项目根目录中的文件(从示例中复制):

# Copy example configuration and customize paths
cp mcp-config.example.json .cursor/mcp.json
# Edit .cursor/mcp.json to set your PROJECT_ROOT path

# Copy act configuration (optional)
cp .actrc /path/to/your/project/.actrc

提供的工具

list_workflows

列出存储库中所有可用的GitHub Actions工作流。

参数:

例子:

📋 **CI** (ci.yml)
   Job: test (test)
   Events: push, pull_request

📋 **Release** (release.yml)
   Job: release (release)
   Events: workflow_dispatch

run_workflow

使用act在本地运行工作流。

参数:

  • workflow (必填):工作流文件名或作业ID
  • event (可选):事件类型(推送、拉取请求等)
  • dryRun (可选):显示执行计划而不运行
  • verbose (可选):启用详细输出
  • env (可选):环境变量
  • secrets (可选):要提供的秘密
  • eventData (可选):用于测试的自定义事件数据

示例:

# Run CI workflow
run_workflow workflow="ci.yml" event="push"

# Dry run with custom event data
run_workflow workflow="ci.yml" event="pull_request" dryRun=true eventData='{"number": 123}'

# Run with environment variables
run_workflow workflow="release.yml" env='{"NODE_ENV": "production"}'

validate_workflow

验证工作流语法和结构。

参数:

  • workflow (必需):要验证的工作流文件名

act_doctor

检查act配置和Docker设置。

参数:

使用示例

人工智能助理(Claude)

配置后,您可以要求您的AI助手直接测试工作流:

  • _“测试我的CI工作流”_
  • _“以模拟运行模式运行发布工作流”_
  • _“检查我的新工作流文件是否有效”_
  • _“使用自定义PR数据测试拉取请求工作流”_

直接使用

# Start the MCP server
npm start

# Run tests
npm test

# Run with coverage
npm run test:coverage

# Debug mode
npm run dev

发展

运行测试

# Install dependencies
npm install

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run in watch mode
npm run test:watch

测试覆盖

该工具包括全面的测试:

  • 单元测试 使用AVA框架
  • 集成测试 使用real act和Docker
  • 代码覆盖率 c8(核心逻辑目标为70%+)
  • ES模块 支持原生Node.js

兼容性监控

随时间推移跟踪行为兼容性:

# Create baseline
npm run compatibility:baseline

# Check for changes
npm run compatibility:check

# Generate detailed report
npm run compatibility:report

项目结构

act-testing-mcp/
├── index.js              # Main MCP server
├── package.json          # Dependencies and scripts
├── README.md             # This file
├── LICENSE               # Apache 2.0 license
├── .actrc                # Act configuration example
├── ava.config.js         # Test configuration
├── mcp-config.example.json # MCP configuration example
├── utils/                # Utility modules
│   ├── act-helpers.js    # Core act integration
│   └── act-monitor.js    # Compatibility monitoring
├── scripts/              # Utility scripts
│   └── check-act-compatibility.js
├── test/                 # Test suites
│   ├── index.test.js
│   ├── act-compatibility.test.js
│   ├── act-monitor.test.js
│   └── utils.test.js
└── docs/                 # Additional documentation
    ├── SETUP.md
    ├── GUIDE.md
    ├── TESTING.md
    └── DEPENDENCY_MONITORING.md

故障排除

Docker问题

# Check Docker is running
docker ps

# Pull required images
docker pull catthehacker/ubuntu:act-latest

法案问题

# Check act installation
act --version

# Test act with simple workflow
act --list

MCP连接问题

  1. 验证MCP配置文件路径
  2. 检查Node.js路径是否正确
  3. 确保设置了PROJECT_ROOT环境变量
  4. 检查项目是否具有 .github/workflows/ 目录

贡献

  1. 分叉存储库
  2. 创建要素分支
  3. 进行更改
  4. 添加新功能的测试
  5. 确保所有测试通过
  6. 提交拉取请求

许可证

此项目根据Apache许可证2.0获得许可-请参阅 许可证 文件以获取详细信息。

相关项目

支持

  • 创建一个 问题 用于错误报告或功能请求
  • 检查 文档 获取详细指南
  • 审查现有 问题 解决方案

______________________________________________________________________

备注:此工具最初是为 Adobe Spectrum代币 该项目已被提取为一个独立的、可重用的MCP服务器。

目录标签

目录标签

JavaScriptClaude开发工具CI/CD测试本地部署工作流验证本地开发工具GitHubActionsDocker集成

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP