Skip to main content
Glama

ci-watch-mcp

MCP 服务器包含一个名为 watch_ci 的工具——它等待本地 git 仓库中某个 commit 的 GitHub Actions CI 运行结束,并通过一次调用同时返回摘要,以及如果失败则一并返回错误日志。

为什么

没有它,检查“我的 push 之后 CI 是否通过”是一件纯手动的事:push → sleep → gh run list → 如果状态是“in_progress”,继续 sleep → 再次 gh run list → 如果 结论: failure,还要单独调用 gh run view <id> --log-failed 才能看到具体哪里坏了。watch_ci 把这一切合并为一次调用,并直接返回失败日志,无需手动轮询等待。

Related MCP server: claude-beacon

近

watch_ci

参数

类型

默认值

说明

cwd

string

—(必填)

本地仓库克隆的路径,其 origin 位于 GitHub

ref

string

HEAD

SHA(完整或缩写)或任意 git-ref

workflow

string

—

按 workflow 名称过滤,如果仓库中有多个 workflow

timeout_ms

number

300000(5 分钟)

上限 1200000(20 分钟)

poll_interval_ms

number

5000

轮询 gh run list 的间隔

返回:

  • { ok: true, conclusion: "success", url, sha, workflowName } — CI 通过;

  • { ok: false, conclusion: "failure", url, sha, workflowName, failedLogs } —— CI 失败,failedLogs 是 gh run view --log-failed 的末尾(截断到 8000 个字符,保留末尾部分——那里信息最丰富);

  • { ok: false, timedOut: true, status, url, message } — 在指定时间内未完成或未启动。

如果 ref 无法解析为真实提交(比如 SHA 写错了),工具会立即报错,而不会默默等到超时。

安装

cd ci-watch-mcp
npm install

连接 Claude Code:

claude mcp add ci-watch -s user -- node /шлях/до/ci-watch-mcp/src/server.js

需要已安装并已认证的 gh CLI(gh auth status)。

测试

npm test

这些测试针对 secretscan 仓库中已经完成的真实运行(成功、失败、以及一个无任何 CI 运行提交)进行,无需等待实时 push。

许可证

MIT — Faneraiy14.

Available Tools

1 tool
watch_ciДочекатись завершення GitHub Actions CIA

Чекає, поки GitHub Actions CI завершиться для поточного (або заданого) коміту в локальному git-репозиторії, і повертає підсумок ОДНИМ викликом: ok/conclusion/url, а за провалу - одразу хвіст логу невдалих кроків (--log-failed), без окремого запиту. Заміняє ручний цикл "push -> sleep -> gh run list -> (якщо впало) gh run view --log-failed".

Inputs: cwd (required), ref, workflow, timeout_ms, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is zero ambiguity in tool selection. The tool's purpose is clearly defined and distinct.

    Naming Consistency4/5

    With a single tool, naming consistency is trivially maintained. The name 'watch_ci' is descriptive and follows a verb_noun pattern, though no comparison set exists to evaluate full consistency.

    Tool Count5/5

    A single-purpose server with one tool is well-scoped. The tool encapsulates a complete workflow (waiting for CI and returning results), avoiding unnecessary fragmentation.

    Completeness4/5

    The tool covers the core CI-watching workflow effectively, including failure log retrieval. Minor gaps exist (e.g., no explicit cancel or list operations), but they are outside the tool's stated purpose and do not hinder its primary function.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers