# blacksmith

An MCP server connecting your assistant to Blacksmith CI. It inspects failing runs, surfaces flaky tests, and tracks runner costs without leaving your CLI.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: grahamnotgrant
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/grahamnotgrant/blacksmith-mcp
- Updated: 2026-04-30
- HTML: https://affpapa.org/en/nevibecode/mcp/blacksmith

## What it does

This server pulls workflow diagnostics from Blacksmith CI straight into your coding agent. You bypass opening web dashboards or stitching run identifiers by hand. The toolset covers inspecting workflow runs via `list_runs`, dumping step logs with `get_job_logs`, and categorizing failed tests through `get_failures_by_pattern`. It also handles comparing failure diffs across branches to detect regressions in pull requests.

The server also exposes runner metrics. You can inspect active CPU cores via `get_current_usage`, view cache size with `get_cache_stats`, and review billable minutes. On macOS, authentication grabs your active session cookie straight from Chrome. If your browser profile is locked or you run another operating system, you must supply `BLACKSMITH_SESSION_COOKIE` manually.

The tool talks to an undocumented internal web endpoint. Because the API was reverse-engineered from the Blacksmith web interface, upstream changes might disrupt operations. You must also supply your organization slug in `BLACKSMITH_ORG` before initiating queries.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `BLACKSMITH_ORG`, `BLACKSMITH_SESSION_COOKIE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add blacksmith -e BLACKSMITH_ORG=<BLACKSMITH_ORG> -e BLACKSMITH_SESSION_COOKIE=<BLACKSMITH_SESSION_COOKIE> -- npx -y blacksmith-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add blacksmith --env BLACKSMITH_ORG=<BLACKSMITH_ORG> --env BLACKSMITH_SESSION_COOKIE=<BLACKSMITH_SESSION_COOKIE> -- npx -y blacksmith-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "blacksmith": {
            "command": "npx",
            "args": [
                "-y",
                "blacksmith-mcp"
            ],
            "env": {
                "BLACKSMITH_ORG": "<BLACKSMITH_ORG>",
                "BLACKSMITH_SESSION_COOKIE": "<BLACKSMITH_SESSION_COOKIE>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "blacksmith": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "blacksmith-mcp"
            ],
            "env": {
                "BLACKSMITH_ORG": "<BLACKSMITH_ORG>",
                "BLACKSMITH_SESSION_COOKIE": "<BLACKSMITH_SESSION_COOKIE>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e BLACKSMITH_ORG=<BLACKSMITH_ORG> -e BLACKSMITH_SESSION_COOKIE=<BLACKSMITH_SESSION_COOKIE> blacksmith npx -y blacksmith-mcp
```
Replace <…> with your own values

## When to use it
- diagnose reasons behind a failed CI workflow run
- pinpoint flaky tests across recent pipeline executions
- spot test regressions introduced in a pull request
- inspect build cache storage and runner core consumption

## Example prompts
- Why did the latest CI run fail in Blacksmith?
- Show me flaky tests from the past seven days.
- Did this PR introduce any new test failures compared to main?

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23654
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17191
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12110

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
