RC

redhat-community-ai-tools/prow-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

5 stars 9 forks 品質 52 トレンド 13

Prow CI MCP Server

概要

A Model Context Protocol (MCP) server for interacting with Prow CI/CD systems, retrieving build logs, and diagnosing PR build issues. - 🔍 : Get latest job runs and retrieve job logs - 📊 : Find builds for specific PRs and analyze results - 🚀 : Multi-strategy PR build finding with fallback mechanisms - 🔧 : Comprehensive PR build status diagnosis and test failure extraction 1. - Get the latest job run information for a specific job name 2. - Retrieve logs for a specific Prow job ID 3. - Get logs for a specific build ID and job name 4. - Find the latest Prow build for a GitHub PR 5. - Get comprehensive logs for a specific PR 6. - Comprehensive diagnostic tool for PR build issues 7. - Extract test failures from build artifacts For web applications or services that need HTTP-based communication: : Make sure to start the SSE server separately with MCP_TRANSPORT=sse uv run main.py before using this configuration.

README

以下は原文 README の抜粋です。原文を見る。

MCP Prow Server

A Model Context Protocol (MCP) server for interacting with Prow CI/CD systems, retrieving build logs, and diagnosing PR build issues.

Features

  • 🔍 Job Management: Get latest job runs and retrieve job logs
  • 📊 Build Analysis: Find builds for specific PRs and analyze results
  • 🚀 Smart Discovery: Multi-strategy PR build finding with fallback mechanisms
  • 🔧 Diagnostics: Comprehensive PR build status diagnosis and test failure extraction

Architecture Diagram

Available Tools

The server exposes 7 MCP tools:

  1. get_latest_job_run - Get the latest job run information for a specific job name
  2. get_job_logs - Retrieve logs for a specific Prow job ID
  3. get_build_logs - Get logs for a specific build ID and job name
  4. get_latest_prow_build_for_pr - Find the latest Prow build for a GitHub PR
  5. get_prow_logs_from_pr - Get comprehensive logs for a specific PR
  6. diagnose_pr_build_status - Comprehensive diagnostic tool for PR build issues
  7. get_test_failures_from_artifacts - Extract test failures from build artifacts

Example Output

Check out the examples directory.

Quick Start

Installation

cd /path/to/prow-mcp-server
uv sync  # Creates venv and installs dependencies from uv.lock
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

MCP Configuration

Cursor IDE (stdio transport)

Add to your ~/.cursor/mcp.json:

{
  "mcpServers": {
    "prow": {
      "command": "uv",
      "args": ["run", "/path/to/prow-mcp-server/.venv/bin/python", "/path/to/prow-mcp-server/main.py"],
      "description": "MCP server for Prow CI/CD integration"
    }
  }
}

Web-based Integration (SSE transport)

For web applications or services that need HTTP-based communication:

{
  "mcpServers": {
    "prow": {
      "url": "http://0.0.0.0:8000/sse/",
      "description": "MCP server for Prow CI/CD integration with direct SSE",
      "env": {
        "MCP_TRANSPORT": "sse"
      }
    }
  }
}

SSE Endpoint: http://0.0.0.0:8000/sse/

Note: Make sure to start the SSE server separately with MCP_TRANSPORT=sse uv run main.py before using this configuration.

Testing

Run the comprehensive test suite (18 tests):

uv run python run_tests.py           # Recommended
uv run pytest tests/ -v              # Direct pytest

All tests pass in under 0.25 seconds with full coverage of utilities, services, and MCP tools.

Architecture

The server uses a modular architecture with clear separation of concerns:

mcp_server/
├── main.py          # Server entry point
├── config.py        # Configuration
├── models/          # Type definitions
├── utils/           # Helper functions
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "prow": { "command": "uv", "args": ["run", "/path/to/prow-mcp-server/.venv/bin/python", "/path/to/prow-mcp-server/main.py"], "description": "MCP server for Prow CI/CD integration" } } }