GitHub Workflow Debugger MCP

GitHub 工作流调试器 MCP

使用 GitHub API 诊断和修复 GitHub Actions 工作流程故障的多选提示 (MCP) 实用程序。

概述

该工具通过结构化决策树帮助用户诊断和修复 GitHub Actions 工作流程故障。它使用 GitHub API 获取工作流程运行信息、分析故障并提供可行的解决方案。

特征

  • 获取存储库最近失败的工作流程运行
  • 分析工作流运行作业和步骤
  • 识别常见的故障模式
  • 针对常见问题提出具体修复建议
  • 查看和更新工作流文件

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 githubworkflowmcp:

npx -y @smithery/cli install @Maxteabag/githubworkflowmcp --client claude

手动安装

# Clone the repository git clone https://github.com/yourusername/github-workflow-debugger-mcp.git cd github-workflow-debugger-mcp # Install dependencies npm install # Build the project npm run build # Link the binary for local use npm link

用法

GitHub Workflow Debugger MCP 旨在与支持模型上下文协议 (MCP) 的 AI 助手配合使用。它提供了多种工具,可用于诊断和修复 GitHub Actions 工作流故障。

所需权限

要使用此工具,您需要具有以下权限的 GitHub 个人访问令牌 (PAT):

  • repo - 完全控制私有存储库
  • workflow - 更新 GitHub Action 工作流程

您必须将此令牌设置为名为GITHUB_PERSONAL_ACCESS_TOKEN的环境变量。

配置

当与兼容 MCP 的客户端一起使用此工具时,您可以按如下方式进行配置:

{ "mcpServers": { "github": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-github" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>" } } } }

<YOUR_TOKEN>替换为您的 GitHub 个人访问令牌。

可用工具

  1. get-failed-workflow-runs - 获取存储库中最近失败的工作流程运行
  2. get-workflow-run-jobs - 获取特定工作流运行的作业
  3. get-workflow-file - 检索工作流文件的内容
  4. update-workflow-file - 使用修复程序更新工作流文件
  5. analyze-workflow-failure - 分析失败的工作流程运行并提出修复建议

示例用法

以下是如何将 GitHub Workflow Debugger MCP 与 AI 助手一起使用的示例:

  1. 首先,获取最近失败的工作流程运行:
    I need to check recent failed workflow runs for my repository "username/repo".
  2. 分析特定的失败运行:
    Can you analyze workflow run #123456 and suggest fixes?
  3. 查看工作流文件:
    Show me the content of the workflow file at .github/workflows/main.yml
  4. 使用修复程序更新工作流文件:
    Update the workflow file with the suggested fixes.

发展

先决条件

  • Node.js 16 或更高版本
  • npm 或 yarn

设置

# Install dependencies npm install # Build the project npm run build

项目结构

  • src/index.ts - MCP 服务器的主入口点
  • build/ ——编译的 JavaScript 文件

执照

国际学习中心

-
security - not tested
-
license - not tested
-
quality - not tested

该实用程序通过分析运行日志、识别常见故障模式并通过结构化决策树建议特定的修复方法来帮助诊断和修复 GitHub Actions 工作流故障。

  1. Overview
    1. Features
      1. Installation
        1. Installing via Smithery
        2. Manual Installation
      2. Usage
        1. Required Permissions
        2. Configuration
        3. Available Tools
        4. Example Usage
      3. Development
        1. Prerequisites
        2. Setup
        3. Project Structure
      4. License
        ID: ul886fxu2v