Gaffer logo

Gaffer

Connects AI coding assistants to Gaffer test history, failure analytics, coverage data, and test-result uploads.

Install Gaffer

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "gaffer": {
      "command": "npx",
      "args": [
        "-y",
        "@gaffer-sh/mcp"
      ],
      "env": {
        "GAFFER_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env GAFFER_API_KEY=YOUR_VALUE_HERE --transport stdio gaffer -- npx -y @gaffer-sh/mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y @gaffer-sh/mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Gaffer MCP server connects Claude Code, Claude Desktop, and Cursor to Gaffer test history and coverage data. It uses code mode: three MCP tools expose a JavaScript namespace with 17 functions for health checks, test analysis, coverage, reports, and uploads. Use the hosted Streamable HTTP endpoint for OAuth-based access, or run the npm package locally over stdio with an API key. It fits debugging and test-maintenance workflows that need historical results, flaky-test detection, failure clustering, or coverage context.

Use cases

  • Inspect project test health and pass-rate trends
  • Find flaky tests and review their history
  • Group failures to investigate shared root causes
  • Locate untested files and coverage gaps
  • Upload CI test results with an API key

Key features

  • Code-mode access to 17 Gaffer functions
  • Flaky-test, failure-cluster, and test-history analytics
  • Coverage summaries and uncovered-file detection
  • Test report URLs and upload-status checks
  • Hosted HTTP and local stdio connection options

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

17/17 checks healthy over the last 88d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · @gaffer-sh/mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads1.1kPackage downloads in the last 30 days.
Last commit15d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.

How Gaffer works

What Gaffer does

Gaffer connects an AI coding assistant to data stored in Gaffer. The assistant can inspect project health, pass rates, trends, flaky tests, individual test histories, recent runs, failure patterns, test durations, coverage, report links, and upload processing status. These capabilities help an agent investigate unstable tests, understand recurring failures, compare metrics across commits or runs, and locate files that need more tests.

The function set contains 17 operations. Sixteen are read-only analytics or reporting functions. upload_test_results is the only write operation and sends test results to Gaffer for processing. Access to projects and data is controlled by the selected organization, API key, or project token permissions.

How it works

The server uses code mode rather than publishing one MCP tool for every Gaffer API operation. Its three MCP tools are execute_code, search_tools, and list_projects. execute_code runs JavaScript that calls functions in the codemode namespace, allowing one execution to combine related queries. Each execution can make up to 20 API calls and runs with a 30-second timeout.

For example, an agent can retrieve project health and then request flaky tests only when the health response reports a nonzero flaky-test count. search_tools finds namespace functions by keyword, while an empty search lists them. list_projects returns accessible projects for user API keys and signed-in connections, but not for project tokens.

The hosted service is available at https://app.gaffer.sh/mcp over Streamable HTTP and accepts POST requests. OAuth sign-in provides read-only access to one selected organization. An API key can also authenticate the hosted endpoint and enables the upload function. Hosted requests are limited to 1,000 per hour per credential or connected app.

Setup and configuration

A Gaffer account with uploaded test results is required. For the hosted option, connect the endpoint from Claude Code, claude.ai, or Claude Desktop and complete the browser sign-in flow. With an API key, send an Authorization: Bearer gaf_YOUR_KEY header; this is the option documented for Cursor, CI, and other API-key workflows.

The local option runs the @gaffer-sh/mcp npm package through npx and communicates over stdio. Set GAFFER_API_KEY in the MCP client's environment, then configure the command as npx -y @gaffer-sh/mcp. Claude Code, Cursor, and Claude Desktop configuration examples use this arrangement. Node.js must be installed for the local package.

The hosted endpoint can be shared in a project configuration without storing a secret when users authenticate individually. Each signed-in connection can read data only from its selected organization. Access can be revoked from Gaffer's AI assistant account settings.

Tools and capabilities

Functions available through execute_code include:

  • get_project_health for health score, pass rate, flaky count, and trends
  • get_test_history, get_flaky_tests, list_test_runs, and get_test_run_details for test analysis
  • get_failure_clusters, search_failures, and get_slowest_tests for debugging and performance review
  • compare_test_metrics for comparisons between commits or runs
  • get_coverage_summary, get_coverage_for_file, and get_untested_files for coverage analysis
  • find_uncovered_failure_areas to find low-coverage files that also have test failures
  • get_report and get_report_browser_url for test report access
  • get_upload_status and upload_test_results for CI result processing

Time-range parameters default to 30 days and accept up to 365 days. Gaffer reduces the requested range to the plan's analytics window: 30 days on Free, 90 on Pro, and 180 on Team. Report browser URLs are signed and remain usable for 30 minutes.

Limitations and notes

OAuth-connected sessions are read-only, so upload_test_results is listed but rejected for those sessions. API-key access is required for uploads. Project tokens beginning with gfr_ cannot use list_projects; user API keys beginning with gaf_ can list projects across the user's organizations.

The hosted service returns 401 for missing or invalid credentials and 429 after the hourly request limit, including a Retry-After header. In hosted code mode, execute_code runs in an isolated sandbox without network access. The npm package runs code in a local Node process instead. Larger date ranges do not expand the analytics data beyond the connected Gaffer plan's allowed window.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Gaffer

Gaffer is an MCP server that connects AI coding assistants to Gaffer test history and coverage data. Its main tools run JavaScript code, search available functions, and list projects, exposing analytics for test health, flaky tests, failures, coverage, reports, and test-result uploads.

Install it locally by configuring your MCP client to run `npx -y @gaffer-sh/mcp` with `GAFFER_API_KEY` set. Alternatively, use the hosted endpoint at `https://app.gaffer.sh/mcp`, which requires no npm package and supports OAuth sign-in for documented clients.

Yes, Gaffer works with Cursor through either the hosted HTTP endpoint or the local npm package. Add the endpoint and an Authorization bearer header to Cursor's MCP configuration, or run `npx -y @gaffer-sh/mcp` with `GAFFER_API_KEY`.

Yes, an API-key connection can call `upload_test_results` to send results to Gaffer. OAuth sign-in connections are read-only and refuse that function. Uploads are rate-limited and audit-logged.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGaffer AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gaffer?style=directory)](https://allmcps.com/mcp/gaffer)
HTML Embed
<a href="https://allmcps.com/mcp/gaffer"><img src="https://allmcps.com/api/badge/gaffer?style=directory" alt="Gaffer on AllMCPs" /></a>