
Blacksmith
- 3 repo stars
- Updated April 30, 2026
- grahamnotgrant/blacksmith-mcp
Blacksmith is a MCP server that lets AI agents query Blacksmith CI runs, analyze test failures, and detect flaky tests.
About
Blacksmith MCP connects your coding agent to Blacksmith CI so you can ask about workflow runs, failing tests, and flaky behavior in natural language instead of clicking through dashboards alone. operators who already use Blacksmith for faster GitHub Actions-style CI register the npm server with their organization name and an authenticated session, then use testing workflows to turn red builds into actionable fixes. The integration is deliberately narrow: it reads CI intelligence from Blacksmith, it does not replace writing tests, changing workflows, or fixing product bugs in the repo. Session setup is the main friction—org slug plus cookie or Chrome-assisted extraction—so treat it as intermediate once CI is already on Blacksmith. Ideal when release week means repeated “why did this shard fail?” loops you want the agent to shorten.
- Query Blacksmith CI runs and drill into test failures from the agent
- Flaky-test detection surfaced for triage conversations
- npm blacksmith-mcp (v0.1.1) stdio transport
- BLACKSMITH_ORG required; session cookie can auto-extract from Chrome when unset
Blacksmith by the numbers
- Data as of Jul 7, 2026 (Skillselion catalog sync)
claude mcp add --env BLACKSMITH_ORG=YOUR_BLACKSMITH_ORG --env BLACKSMITH_SESSION_COOKIE=YOUR_BLACKSMITH_SESSION_COOKIE blacksmith-mcp -- npx -y blacksmith-mcpAdd your badge
Show developers this MCP server is listed on Skillselion. Paste this into your README.
| repo stars | ★ 3 |
|---|---|
| Package | blacksmith-mcp |
| Transport | STDIO |
| Auth | Required |
| Last updated | April 30, 2026 |
| Repository | grahamnotgrant/blacksmith-mcp ↗ |
What it does
Let your agent inspect Blacksmith CI runs, explain failures, and surface flaky tests while you stabilize releases.
Who is it for?
Best when you're on Blacksmith CI and want agent-assisted triage during ship/testing without building a custom CI API client.
Skip if: Projects on GitHub Actions only, other CI vendors, or teams that forbid browser session cookies for automation.
What you get
After you wire blacksmith-mcp with org and session auth, your agent can answer run-status and failure questions directly from Blacksmith CI data.
- Agent-queryable Blacksmith run and failure context
- Faster flaky-test identification in chat-driven workflows
- Reduced manual copy-paste from Blacksmith CI UI during ship
By the numbers
- Server version 0.1.1
- Package: blacksmith-mcp on npm
- Transport: stdio
README.md
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") |
compare_test_runs |
Compare failures between two runs (find regressions) |
get_flaky_tests |
Detect tests that fail intermittently |
get_slow_tests |
Find tests exceeding duration threshold |
get_test_history |
Track a specific test's pass/fail history |
get_trends |
Analyze trends: duration, failure rate, test count |
Usage & Billing
| Tool | Description |
|---|---|
get_current_usage |
Current core usage (active vs max) |
get_invoice_amount |
Current billing period amount |
get_usage_summary |
Billable minutes vs free tier |
get_cache_stats |
Cache size, entries by repository |
get_cache_entries |
Detailed cache entries for a repo |
Organization
| Tool | Description |
|---|---|
list_orgs |
List accessible organizations |
get_org_status |
Org status (personal, onboarded, region) |
search_logs |
Search logs across all jobs |
Example Conversations
Debug a Failed Run
You: Why did the last CI run fail?
Claude: Uses
list_runs(status="failure", limit=1)thenget_failed_testsThe last run failed with 34 test failures. The main issues are:
- Connection timeout (12 tests) - Tests in
api/are timing out connecting to the test database- Undefined property (8 tests) -
user.settings.themeis undefined in the new dark mode code- Assertion failures (14 tests) - Snapshot mismatches in UI components
Find Flaky Tests
You: Which tests are flaky?
Claude: Uses
get_flaky_tests(days=7, min_runs=5)Found 3 flaky tests:
Test Flake Rate Pattern should handle concurrent requests40% (4/10 runs) Fails on CI, passes locally renders loading state20% (2/10 runs) Race condition with setTimeout validates auth token30% (3/10 runs) Intermittent network timeout
Compare Branches
You: Did my PR introduce new test failures?
Claude: Uses
compare_test_runswith PR run vs base branchYour PR introduced 2 new failures:
UserProfile.test.tsx: "Cannot read property 'avatar' of undefined"api/users.test.ts: Expected 200, got 4045 previously failing tests now pass (nice!).
Development
# Install dependencies
pnpm install
# Build
pnpm build
# Development mode (watch)
pnpm dev
# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js
Troubleshooting
Session Expired
If you see SESSION_EXPIRED, your Blacksmith session has expired. Simply log back into app.blacksmith.sh in Chrome and retry.
Cookie Extraction Failed
The automatic cookie extraction requires:
- macOS with Chrome installed
- Being logged into Blacksmith in Chrome
- Chrome not running with a locked profile
If it fails, set BLACKSMITH_SESSION_COOKIE manually.
No Organization Set
Run list_orgs to see available organizations, then set BLACKSMITH_ORG to your org name.
API Notes
This MCP uses Blacksmith's internal web API, which is undocumented. The API was reverse-engineered from the Blacksmith web app and may change without notice.
License
MIT
Contributing
Contributions welcome! Please open an issue first to discuss proposed changes.
Recommended MCP Servers
How it compares
CI observability MCP hook, not a test authoring or security audit skill.
FAQ
Who is Blacksmith MCP for?
Developers and founders already using Blacksmith CI who want Claude or Cursor to query runs and failures over MCP.
When should I use Blacksmith MCP?
Use it in ship/testing when builds fail or flakes spike and you need fast, conversational access to Blacksmith run details.
How do I add Blacksmith MCP to my agent?
Install blacksmith-mcp from npm, set BLACKSMITH_ORG, provide BLACKSMITH_SESSION_COOKIE or rely on Chrome auto-extraction, and add the stdio server in your MCP config.