MCP Server

Connect your AI coding assistant to Gaffer. Get test health insights, flaky test detection, and test history directly in Claude Code, Cursor, and other MCP-compatible tools.

The Gaffer MCP server (@gaffer-sh/mcp) connects AI coding assistants to your test history. Ask about test health, investigate flaky tests, and get context about failures without leaving your editor.

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants access external tools and data sources. By installing the Gaffer MCP server, your AI assistant gains direct access to your test analytics.

Features

  • Test health insights - Ask about pass rates, trends, and overall test suite health
  • Flaky test detection - Identify tests with inconsistent behavior
  • Test history lookup - Check the history of specific tests to understand stability
  • Cross-project access - Query all your projects from a single API key
  • Report file access - Get links to HTML reports, coverage files, and other artifacts
  • Slowest test analysis - Find tests that are slowing down your CI pipeline

Prerequisites

  1. A Gaffer account with test results uploaded
  2. An API Key from Account Settings > API Keys

Setup

Claude Code

Add to your Claude Code settings (~/.claude.json or project .claude/settings.json):