
Mcp Zuul
io.github.imatza-rh由 GitHub 帳號 imatza-rh 發布v0.11.0更新於 Oct 24, 2026
Zuul CI — build failure analysis, log search, pipeline status, and job configuration
概覽
一個針對 Zuul CI 的 MCP 伺服器,讓助理檢視建置、解析失敗原因、搜尋日誌並檢查流水線狀態。
- 可以做什麼
- 透過 Zuul REST API 提供約 48 個工具,涵蓋建置、建置集、流水線、作業、專案與 nodepool 基礎設施。它會把 job-output.json 解析成結構化失敗資訊(任務、主機、錯誤、回傳碼),可依行號範圍讀取並用正規表達式搜尋任何建置日誌檔,解析 JUnit XML 測試結果,並統計容易間歇失敗的作業。另提供即時流水線狀態、作業相依圖,以及選用的 LogJuicer 機器學習日誌異常偵測。
- 適用情境
- 適合排查失敗的 CI 建置、確認某個變更是否在排隊或執行中、調查作業為何沒有觸發,以及檢視 Zuul 執行個體中的作業設定與節點可用性。可取代在 Zuul 網頁介面反覆點選與手動解析 JSON。
- 執行需求
- 以 stdio 方式在本機執行,通常透過 uvx 或 pip 安裝。必須設定 ZUUL_URL;選用設定包括 ZUUL_DEFAULT_TENANT、ZUUL_AUTH_TOKEN、ZUUL_USE_KERBEROS、ZUUL_TIMEOUT、ZUUL_VERIFY_SSL、工具過濾變數與 LOGJUICER_URL。Kerberos 支援需要有效票證與 gssapi 套件;即時主控台串流需要額外安裝。需要能連線至 Zuul 執行個體與日誌主機的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Zuul,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-zuul
[PyPI] [Python] [License] [CI] [MCP] [Downloads] [codecov] [Listed on AiList]
Debug build failures by asking questions, not clicking through web UIs. An MCP server for Zuul CI.
[mcp-zuul diagnosing a build failure]
If mcp-zuul saves you a debugging session, a ⭐ star helps others find it.
One command, no install:
48 tools, 5 prompts, 3 resources — covering builds, logs, pipelines, jobs, infrastructure, and live status. Works with Claude Code, Claude Desktop, Cursor, Codex, Windsurf, and any MCP-compatible client.
Why mcp-zuul?
Quick Start
uvx (no install, recommended):
pip:
Docker:
LobeHub — send this to your AI agent:
See Setup for full configuration options including Kerberos and multi-instance.
Features
Structured failure analysis — get_build_failures parses Zuul's job-output.json and returns exactly which Ansible task failed, on which host, with error message, return code, and stderr. No log scrolling needed.
Read any log file — get_build_log isn't limited to job-output.txt. Pass log_name to read any file in the build's log directory (ci_script logs, ansible.log, deployment logs) with full grep, tail, and line-range support.
Precise log navigation — Jump to exact line ranges with start_line/end_line. After finding an error at line 6148, read lines 6130-6160 instead of scrolling through 200-line chunks.
Smart grep — Regex search with context lines. Auto-converts common shell-grep \| syntax to Python regex | so patterns like error\|failed\|timeout just work.
Live pipeline awareness — get_change_status returns live job progress with elapsed times, estimated completion, and pre-failure detection (pre_fail field). When the change isn't in pipeline, automatically fetches the latest completed buildset.
Tool filtering — Reduce LLM tool-selection noise with ZUUL_ENABLED_TOOLS or ZUUL_DISABLED_TOOLS. Only expose the tools your workflow needs — the rest are removed from the server entirely.
URL-based input — Paste a Zuul build URL directly. Tools auto-parse the tenant and UUID from URLs like https://zuul.example.com/t/tenant/build/abc123 — no manual extraction needed.
Flaky job detection — find_flaky_jobs analyzes recent build history and computes pass/fail statistics to identify intermittent failures automatically.
Job dependency graph — get_freeze_jobs returns the fully-resolved job graph for a pipeline/project/branch, showing all jobs with their dependencies after inheritance resolution.
Kerberos/SPNEGO auth — First-class support for Zuul instances behind OIDC + Kerberos. Drives the full SPNEGO redirect chain automatically. Session cookies persist and re-authenticate transparently on expiry.
Streamable HTTP transport — Run as a persistent HTTP server with MCP_TRANSPORT=streamable-http for remote/shared deployment. Supports stdio (default), SSE, and streamable-http.
Write operations — Enqueue/dequeue/promote changes and re-enqueue buildsets. Pipeline-affecting tools are disabled by default (ZUUL_READ_ONLY=true) and removed from the server entirely so LLMs don't even see them. Autohold management (create/delete) is always available since it doesn't affect running pipelines.
LogJuicer integration — get_build_anomalies uses ML-based log analysis to find unusual lines by comparing failed logs against successful baselines. Optional — requires LOGJUICER_URL.
Token-efficient output — All responses strip None values and use compact formatters. tail_build_log returns just the last N lines — the fastest way to check why a build failed.
Error handling — All tools return JSON, errors included. Network failures, auth issues, and invalid parameters produce {"error": "descriptive message"}. Tools never raise unhandled exceptions.
Tools
Builds & Failures
Buildsets
Pipeline & Status
Jobs & Projects
Infrastructure
Write Operations
Pipeline-affecting operations — disabled by default (ZUUL_READ_ONLY=true). Set ZUUL_READ_ONLY=false to enable. Requires auth token or Kerberos. Autohold management (create/delete) is always available since it doesn't affect running pipelines.
Test Results & Log Analysis
Prompts
Pre-built prompt templates that pre-load context and guide analysis:
Resources
Browsable context that clients can attach to conversations without tool calls:
Setup
MCP client configuration
All clients use the same JSON structure. Add to your client's MCP config file:
Claude Code (~/.claude.json → mcpServers):
Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json), and other MCP clients use the same format. GUI-based clients don't inherit your shell PATH - use the full path to uvx (run which uvx to find it).
Or via CLI:
Environment variables
Token authentication
Pass ZUUL_AUTH_TOKEN via host environment — never hardcode tokens in config files (visible in ps output):
For Docker, forward without a value to inherit from host:
Kerberos / SPNEGO
For Zuul behind OIDC + Kerberos. Requires a valid Kerberos ticket (kinit) and the gssapi package.
Linux prerequisites - gssapi has no pre-built Linux wheels and must compile from source:
macOS and Windows have pre-built wheels - no extra packages needed.
Then install with Kerberos support:
Via CLI:
Or via JSON config:
For Docker, mount the Kerberos ticket cache:
Multiple instances
Add separate entries per Zuul instance:
Troubleshooting
krb5-config: not found or Python.h: No such file when installing mcp-zuul[kerberos] on Linux:
gssapi has no pre-built Linux wheels - it compiles from source. Install system packages first:
uvx: command not found in Cursor or Claude Desktop:
GUI-based MCP clients don't inherit your shell PATH. Use the full path to uvx:
Then use that absolute path as command in your MCP config:
Permission errors on ~/.local/share/uv/:
If uv was previously run with sudo, the cache directory may be root-owned:
Usage Examples
Debug a build failure
→ list_builds(project="my-project", result="FAILURE", limit=1) → get_build_failures(uuid="...") → root cause with task name, error, and return code.
Deep-dive into logs
→ browse_build_logs(uuid="...", path="controller/ci-framework-data/logs/") → finds ci_script_008_run.log → get_build_log(uuid="...", log_name="controller/ci-framework-data/logs/ci_script_008_run.log", grep="error|timed out|Error 1", context=2) → exact error with surrounding context.
Navigate to a specific error
→ get_build_log(uuid="...", start_line=6478, end_line=6484) → exactly those 7 lines.
Check live pipeline status
→ get_change_status(change="54321") → live jobs with elapsed times and ETA, or latest completed buildset if not in pipeline.
Compare build results across a pipeline
→ list_builds to get buildset_uuid → get_buildset(uuid="...") → all sibling builds with results and durations.
Paste a Zuul URL directly
→ get_build_failures(url="https://zuul.example.com/t/tenant/build/abc123def") → tenant and UUID auto-extracted.
Debug why a job isn't running
→ get_config_errors(project="org/my-project") → configuration errors, missing refs, or repo access issues.
Check node availability
→ list_nodes() → node states with by_state summary → list_labels() → available node types.
Detect flaky jobs
→ find_flaky_jobs(job_name="my-deploy-job", limit=30) → pass/fail stats, failure rate, flaky=true/false.
See what jobs run for a project
→ get_freeze_jobs(pipeline="check", project="openstack-k8s-operators/openstack-operator") → resolved job graph with dependencies.
Quick log tail
→ tail_build_log(uuid="...", lines=30) → just the tail, minimal tokens.
What nodeset does my job use after inheritance?
→ get_freeze_job(pipeline="check", project="org/repo", job_name="deploy-job") → resolved nodeset, playbooks, variables, timeout after all parent inheritance.
Development
Architecture
See CLAUDE.md for full architecture details.
Listings
[mcp-zuul MCP server]- PyPI —
pip install mcp-zuul - Glama — Quality: A/A/A
- Conare — Marketplace listing
- PulseMCP — Server directory
- LobeHub — MCP marketplace with agent install
- HiFriendBot — AI tools directory
- pepy.tech — Download statistics
- Docker —
ghcr.io/imatza-rh/mcp-zuul
Contributing
Contributions welcome. Please open an issue first to discuss significant changes.
License
Apache-2.0
來源:README.md,提交 e1a0ffa
工具
0版本歷史
1- v0.11.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分