Skip to main content
Glama

CI Investigator MCP

Published MCP server for investigating GitHub Actions CI failures.

This package exposes tools to:

  • list recent failed workflow runs

  • summarize a failed run from logs

  • compare a failed run with the previous success

  • detect flaky jobs on a branch

  • explain likely root cause category

  • suggest remediation and validation steps

  • report failure trends and CI health

  • identify likely regression commit/PR

  • generate failure digest for notifications

Available Tools

1) get_failed_runs

List recent failed workflow runs for a repository.

Input:

  • owner (string, required): repo owner or org

  • repo (string, required): repo name

  • limit (number, optional, default: 10, min: 1, max: 100)

Returns:

  • array of failed runs with id, workflow name, branch, short commit, URL, and timestamps

2) summarize_failure

Fetch and summarize a failed run.

Input:

  • owner (string, required)

  • repo (string, required)

  • run_id (number, required): failed workflow run id

Returns:

  • run id

  • failed job name

  • failed step name

  • log excerpt text

Notes:

  • attempts run log download first

  • falls back to failed job logs

  • falls back to check-run annotations when logs are unavailable

3) compare_with_last_success

Compare a failed run with the previous successful run on the same branch.

Input:

  • owner (string, required)

  • repo (string, required)

  • run_id (number, required): failed workflow run id

Returns:

  • failed run snapshot

  • last successful run snapshot (or null)

  • diff fields:

    • commit_changed

    • author_changed

    • event_changed

    • commits_between (GitHub compare URL or fallback text)

4) detect_flaky_tests

Detect flaky jobs by analyzing recent completed runs on a branch.

Input:

  • owner (string, required)

  • repo (string, required)

  • branch (string, required)

  • limit (number, optional, default: 30, min: 1, max: 100)

Returns:

  • repository and branch metadata

  • number of analyzed runs

  • flaky jobs with pass/fail counts and flakiness score

5) explain_failure_root_cause

Classify likely failure cause based on logs and fallback data.

Input:

  • owner (string, required)

  • repo (string, required)

  • run_id (number, required)

Returns:

  • cause category (test_regression, infra_network, dependency, timeout, lint_or_type, auth_permissions, unknown)

  • confidence and supporting evidence lines

  • failed job and failed step

6) suggest_fix_for_failure

Suggest practical remediation and validation steps for a failed run.

Input:

  • owner (string, required)

  • repo (string, required)

  • run_id (number, required)

Returns:

  • classified category

  • targeted suggestions

  • validation checklist

Summarize recurring failed jobs over a configurable time window.

Input:

  • owner (string, required)

  • repo (string, required)

  • days (number, optional, default: 14)

  • branch (string, optional)

  • limit (number, optional, default: 100)

Returns:

  • failure totals in the selected window

  • top failing jobs with occurrence counts and first/last seen timestamps

8) find_regression_pr_or_commit

Find likely regression commit and linked PR for a failed run.

Input:

  • owner (string, required)

  • repo (string, required)

  • run_id (number, required)

Returns:

  • suspect commit SHA

  • compare URL from last success to failed commit

  • suspected PR metadata (if available)

9) ci_health_score

Compute CI health score for a branch using pass/fail and flaky-job signals.

Input:

  • owner (string, required)

  • repo (string, required)

  • branch (string, required)

  • days (number, optional, default: 14)

  • limit (number, optional, default: 100)

Returns:

  • pass/failure rates

  • flaky jobs count

  • overall health score (0-100)

10) failure_notifications_digest

Build deduplicated digest of recent failures for alerting/triage workflows.

Input:

  • owner (string, required)

  • repo (string, required)

  • interval_hours (number, optional, default: 24)

  • branch (string, optional)

  • limit (number, optional, default: 20)

Returns:

  • grouped failure signatures

  • occurrence counts

  • latest run references and compact example summary

Related MCP server: Woodpecker CI Pipeline Analyzer

Requirements

  • Node.js 20+

  • GitHub token in environment

Recommended token permissions:

  • actions:read

  • checks:read

  • contents:read

Using an MCP Client

Running a server on its own is less useful than wiring it into an MCP client.

Set GITHUB_TOKEN in your client config:

{
  "servers": {
    "ci-investigator": {
      "command": "npx",
      "args": ["-y", "ci-investigator-mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token"
      }
    }
  }
}

On Windows, wrap npx with cmd /c:

{
  "servers": {
    "ci-investigator": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "ci-investigator-mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token"
      }
    }
  }
}

Troubleshooting

  • 401 or 403 errors: verify GITHUB_TOKEN and permissions.

  • Empty or partial logs: some workflows/log artifacts can be unavailable; the server uses fallback strategies.

  • Run not found: confirm run_id, owner, and repo are correct.

IDE can't find node or npx

Some IDEs (VS Code, Cursor) launch with a limited PATH and can't find Node.js installed via nvm or similar version managers.

Run the following to find the full paths:

which node && which npx

Then use the full path in your MCP config:

{
  "servers": {
    "ci-investigator": {
      "command": "/Users/your-user/.nvm/versions/node/v22.14.0/bin/npx",
      "args": ["-y", "ci-investigator-mcp"],
      "env": {
        "GITHUB_TOKEN": "your_token",
        "PATH": "/Users/your-user/.nvm/versions/node/v22.14.0/bin:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

License

ISC

Available Tools

10 tools
ci_health_scoreB

Compute a CI health score for a branch based on pass/fail and flakiness

Inputs: repo (required), owner (required), branch (required), days, +1 more.

compare_with_last_successA

Compare a failed run with the last successful run on the same branch

Inputs: repo (required), owner (required), run_id (required).

detect_flaky_testsB

Analyze run history to detect flaky jobs on a branch

Inputs: repo (required), owner (required), branch (required), limit.

explain_failure_root_causeB

Classify the likely root cause category for a failed CI run

Inputs: repo (required), owner (required), run_id (required).

failure_notifications_digestC

Build a deduplicated digest of recent failures for alerting and triage

Inputs: repo (required), owner (required), limit, branch, +1 more.

find_regression_pr_or_commitA

Find likely regression commit and related pull request for a failed run

Inputs: repo (required), owner (required), run_id (required).

get_failed_runsB

List recent failed CI runs for a GitHub repo

Inputs: repo (required), owner (required), limit.

suggest_fix_for_failureB

Suggest remediation steps and validation checks for a failed CI run

Inputs: repo (required), owner (required), run_id (required).

summarize_failureB

Fetch and summarize the logs of a failed CI run

Inputs: repo (required), owner (required), run_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose, covering different aspects of CI failure analysis without overlap. For example, ci_health_score computes a health metric, while detect_flaky_tests analyzes flakiness, and explain_failure_root_cause classifies root causes.

    Naming Consistency4/5

    Tool names follow a consistent snake_case pattern and mostly use verb_noun or verb_phrase structure (e.g., detect_flaky_tests, list_failure_trends). One minor deviation is ci_health_score, which is a noun phrase, but it still fits the pattern.

    Tool Count5/5

    With 10 tools, the server is well-scoped for its purpose of CI failure investigation. This count allows comprehensive coverage without being overwhelming.

    Completeness5/5

    The tool set covers the full lifecycle of CI failure analysis: identification (get_failed_runs), summarization (summarize_failure), root cause analysis (explain_failure_root_cause, find_regression_pr_or_commit), trend detection (list_failure_trends, detect_flaky_tests), and remediation (suggest_fix_for_failure, ci_health_score). No obvious gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables automated analysis of Woodpecker CI pipeline failures with intelligent error detection and fix suggestions. Supports both direct pipeline analysis and IDE-integrated git-context analysis using repository names, PR numbers, or branch information.
      16 npm
      3
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Analyzes GitHub Actions workflows and performance, helping identify bottlenecks, failures, and optimization opportunities in CI/CD pipelines.
      19 npm
      MIT