GB

grahamnotgrant/blacksmith-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 4 forks 质量 68 趋势 14MIT

MCP server for Blacksmith CI analytics

概览

An MCP server that connects Claude to your Blacksmith CI data. Query workflow runs, analyze test failures, detect flaky tests, and monitor usage—all through natural conversation. Debugging CI failures usually means clicking through dashboards, copying run IDs, and piecing together information across multiple pages. With this MCP, you can just ask: - "Why did the last CI run fail?" - "Which tests are flaky this week?" - "Compare test failures between main and my PR" - "What's using the most cache storage?" Claude handles the API calls and gives you actionable insights. The MCP automatically extracts your session from Chrome cookies. No manual token copying needed. Log into app.blacksmith.sh in Chrome. The MCP extracts your session cookie automatically. Set BLACKSMITH_SESSION_COOKIE environment variable with your session cookie value. Why did the last CI run fail? *Uses list_runs(status="failure", limit=1) then get_failed_tests* The last run failed with 34 test failures.

README

以下为原文 README 节选,完整内容请查看原文。

Blacksmith MCP

An MCP server that connects Claude to your Blacksmith CI data. Query workflow runs, analyze test failures, detect flaky tests, and monitor usage—all through natural conversation.

Why?

Debugging CI failures usually means clicking through dashboards, copying run IDs, and piecing together information across multiple pages. With this MCP, you can just ask:

  • “Why did the last CI run fail?”
  • “Which tests are flaky this week?”
  • “Compare test failures between main and my PR”
  • “What’s using the most cache storage?”

Claude handles the API calls and gives you actionable insights.

Quick Start

Zero-config if you’re logged into Blacksmith in Chrome:

# Add to Claude Code
claude mcp add blacksmith -- npx blacksmith-mcp

# Set your org (run once)
export BLACKSMITH_ORG="your-org-name"

The MCP automatically extracts your session from Chrome cookies. No manual token copying needed.

Installation

Option 1: Claude Code CLI

claude mcp add blacksmith -- npx blacksmith-mcp

Option 2: Project Configuration

Add to your .mcp.json:

{
  "mcpServers": {
    "blacksmith": {
      "type": "stdio",
      "command": "npx",
      "args": ["blacksmith-mcp"],
      "env": {
        "BLACKSMITH_ORG": "your-org-name"
      }
    }
  }
}

Option 3: Global Install

npm install -g blacksmith-mcp

Configuration

Authentication

Automatic (recommended): Log into app.blacksmith.sh in Chrome. The MCP extracts your session cookie automatically.

Manual: Set BLACKSMITH_SESSION_COOKIE environment variable with your session cookie value.

Environment Variables

Variable Required Description
BLACKSMITH_ORG Yes Your Blacksmith organization name
BLACKSMITH_SESSION_COOKIE No Session cookie (auto-extracted from Chrome if not set)

Available Tools

Workflow Runs

Tool Description
list_runs List workflow runs with filters (status, branch, workflow, actor, PR)
get_run Get run details including all jobs
list_jobs List jobs for a workflow run
get_job Get job details (steps, timing, runner info)
get_job_logs Get raw log output for a job

Test Analytics

Tool Description
get_job_tests Get all test results for a job
get_failed_tests Get failed tests with full error messages
get_failures_by_pattern Group failures by error pattern (e.g., “Cannot read properties”)
在 GitHub 查看完整 README

安装

npx blacksmith-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "blacksmith": { "type": "stdio", "command": "npx", "args": ["blacksmith-mcp"], "env": { "BLACKSMITH_ORG": "your-org-name" } } } }