Listed from the MCP registry; nobody on Odel publishes it.
Is this yours? Claim itTest analytics for AI agents: test history, flaky tests, failure clusters, coverage.
One address for any MCP client. You sign in at app.gaffer.sh once, after adding it.
At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
| Access to | Read | Change |
|---|---|---|
| Read |
From the sign-in at app.gaffer.sh, as the endpoint publishes it. You approve it there.
Odel could not list its tools without signing in.
MCP (Model Context Protocol) server for Gaffer - give your AI assistant memory of your tests. Full setup guide: gaffer.sh/docs/mcp.
This MCP server connects AI coding assistants like Claude Code and Cursor to your Gaffer test history and coverage data. It runs in code mode: three MCP tools over a namespace of 18 functions — 17 read-only analytics functions plus upload_test_results. It allows AI to:
There are two ways to connect. Use the hosted endpoint unless your client only supports local stdio servers.
Most people need no npm package: Claude Code, claude.ai and Claude Desktop connect to the hosted endpoint and sign in.
| Hosted endpoint | npm package | |
|---|---|---|
| Install | Nothing | npx runs @gaffer-sh/mcp on your machine |
| Credential | OAuth sign-in, or Authorization: Bearer <key> header | GAFFER_API_KEY environment variable |
execute_code runs | In an isolated sandbox with no network access | In a local Node process |
| Functions | 18 with a key, same as npm. A signed-in connection has 17: it is read-only, so upload_test_results is listed but refused | All 18 |
| Clients | Those that support remote HTTP servers | Any client that can start a stdio server |
The endpoint is https://app.gaffer.sh/mcp (Streamable HTTP, POST only). Each credential is limited to 1,000 requests per hour. Requests without a valid credential get a 401, and requests over the limit get a 429 with a Retry-After header.
Claude Code, claude.ai and Claude Desktop sign in with OAuth. You do not create an API key.
Claude Code
claude mcp add --transport http gaffer https://app.gaffer.sh/mcp
Then run /mcp inside Claude Code, select gaffer, and finish the sign-in in your browser.
claude.ai and Claude Desktop
https://app.gaffer.sh/mcp as the URL, then click Add and sign in to Gaffer.Anthropic's steps for custom connectors are the reference if the menu names change.
Share it with your team
Commit this .mcp.json at the root of your repository. It holds no secret. Each teammate signs in once with /mcp and Claude Code asks them to approve the project server first.
{
"mcpServers": {
"gaffer": {
"type": "http",
"url": "https://app.gaffer.sh/mcp"
}
}
}
What signing in grants
upload_test_results.To revoke access, open Account Settings > AI assistants at app.gaffer.sh/account/ai-assistants and click Disconnect next to the app under Connected apps.
Use a key for CI, Cursor, or if you prefer one. A key can also upload results.
Claude Code:
claude mcp add --transport http gaffer https://app.gaffer.sh/mcp --header "Authorization: Bearer gaf_YOUR_KEY"
Cursor: add to .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project:
{
"mcpServers": {
"gaffer": {
"url": "https://app.gaffer.sh/mcp",
"headers": {
"Authorization": "Bearer gaf_YOUR_KEY"
}
}
}
}
The package runs locally over stdio and reads your key from GAFFER_API_KEY.
claude mcp add gaffer -e GAFFER_API_KEY=gaf_YOUR_KEY -- npx -y @gaffer-sh/mcp
Add to your Claude Code settings (~/.claude.json or project .claude/settings.json):
{
"mcpServers": {
"gaffer": {
"command": "npx",
"args": ["-y", "@gaffer-sh/mcp"],
"env": {
"GAFFER_API_KEY": "gaf_YOUR_KEY"
}
}
}
}
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"gaffer": {
"command": "npx",
"args": ["-y", "@gaffer-sh/mcp"],
"env": {
"GAFFER_API_KEY": "gaf_YOUR_KEY"
}
}
}
}
Open Settings > Developer > Edit Config, or edit the file directly:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"gaffer": {
"command": "npx",
"args": ["-y", "@gaffer-sh/mcp"],
"env": {
"GAFFER_API_KEY": "gaf_YOUR_KEY"
}
}
}
}
Quit and restart Claude Desktop after saving. Node.js must be installed.
This server uses code mode. Instead of exposing one MCP tool per API call, it exposes three tools plus a codemode namespace you call from JavaScript. Fewer tool definitions occupy the context window, and a single execution can chain several calls.
| MCP tool | What it does |
|---|---|
execute_code | Run JavaScript against codemode.<function>(). Max 20 API calls, 30s timeout. |
search_tools | Find available functions by keyword. An empty query lists all of them. |
list_projects | List projects. Registered for a user API Key (gaf_) and for sign-in, not for a project token (gfr_). |
const health = await codemode.get_project_health({ projectId: "proj_abc" });
if (health.flakyTestCount > 0) {
const flaky = await codemode.get_flaky_tests({ projectId: "proj_abc" });
return { health, flaky };
}
return { health };
execute_code| Function | Category | Description |
|---|---|---|
get_project_health | health | Health score, pass rate, flaky count, trend |
get_test_history | testing | Pass/fail history for a specific test |
get_flaky_tests | testing | Tests with high flip rates (pass↔fail) |
list_test_runs | testing | Recent test runs, filterable by commit/branch/status |
get_test_run_details | testing | Parsed individual results for one run |
get_failure_clusters | testing | Failed tests grouped by root cause |
get_slowest_tests | testing | Slowest tests by P95 duration |
compare_test_metrics | testing | Compare test performance between commits or runs |
search_failures | testing | Search failures by error or test-name pattern, or list all recent failures |
get_coverage_summary | coverage | Overall coverage metrics and trend |
get_coverage_for_file | coverage | Coverage for specific files or paths |
get_untested_files | coverage | Files below a coverage threshold |
find_uncovered_failure_areas | coverage | Files with low coverage AND test failures |
get_report | reports | Report file URLs for a test run |
get_test_run_logs | reports | List a run's attached log files, or read one a page at a time with a text filter |
get_report_browser_url | reports | Signed browser-navigable report URL (30 min) |
get_upload_status | uploads | Whether CI results are uploaded and processed |
upload_test_results | uploads | Upload test results (write) — rate-limited and audit-logged |
Every function except upload_test_results is read-only.
Every days parameter defaults to 30 and accepts up to 365. The server then reduces it to your plan's analytics window: 30 days on Free, 90 on Pro and 180 on Team. A larger value is not an error, and you get the window your plan allows.
list_projectsList all projects you have access to. A user API Key lists projects in every organization you belong to. Sign-in lists the projects in the one organization you connected. Not available with a project token.
organizationId (optional), limit (optional, default: 50, max: 100)get_project_healthGet the health metrics for a project.
projectId (required for gaf_ keys), days (optional, default: 30, max: 365)get_test_historyGet the pass/fail history for a specific test.
projectId (required for gaf_ keys), testName, filePath or fullName (at least one), limit (optional, default: 20, max: 100; at most 50 on the Free plan). fullName is the exact value from get_flaky_tests and keeps Playwright projects apartmessage for failed runsget_flaky_testsGet the list of flaky tests in a project.
projectId (required for gaf_ keys), threshold (optional, default: 0.1), days (optional, default: 30, max: 365), limit (optional, default: 50, max: 100)name, fullName (tells apart entries that share a name, one per Playwright project), flip rates, transition counts, run counts, flakinessScore and lastSeenlist_test_runsList recent test runs with optional filtering.
projectId (required for gaf_ keys), commitSha (optional), branch (optional), status (optional), limit (optional, default: 20, max: 100), offset (optional, default: 0)pagination (total, hasMore)get_test_run_detailsGet parsed test results for a specific test run.
testRunId (required), projectId (required for gaf_ keys), status (optional filter), limit (optional, default: 100, max: 500), offset (optional, default: 0)suite, line, retryAttempt, error, full errorStack and attachments (name, contentType, and file: a filename within the run's upload, or null if it was not uploaded); a summary with passed/failed/skipped/flaky/total countsget_test_run_logsRead the log files attached to a test run (backend or service logs uploaded with the results) a page at a time, without downloading the file.
testRunId (required), projectId (required for gaf_ keys), file (optional; omit to list the run's log files), q (optional, case-insensitive substring), after (optional byte offset, default: 0), limit (optional, default: 200, max: 1000)file: files (file, size). With file: lines (offset, text), nextAfter (byte offset for the next call, null at end of file) and truncated (the per-call scan budget ran out; call again with nextAfter)get_reportGet URLs for report files uploaded with a test run.
testRunId (required). Not available with a project token (gfr_)get_report_browser_urlGet a browser-navigable URL for viewing a test report.
projectId (required for gaf_ keys), testRunId (required), filename (optional)get_slowest_testsGet the slowest tests in a project, sorted by P95 duration.
projectId (required for gaf_ keys), days (optional, default: 30, max: 365), limit (optional, default: 20, max: 100), framework (optional), branch (optional)compare_test_metricsCompare test metrics between two commits or test runs.
projectId (required for gaf_ keys), testName (required), beforeCommit/afterCommit OR beforeRunId/afterRunIdget_coverage_summaryGet the coverage metrics summary for a project.
projectId (required for gaf_ keys), days (optional, default: 30, max: 365)get_coverage_for_fileGet coverage metrics for specific files or paths.
projectId (required for gaf_ keys), filePath (required - exact or partial match)get_untested_filesGet files with little or no test coverage.
projectId (required for gaf_ keys), maxCoverage (optional, default: 10%), limit (optional, default: 20, max: 100)find_uncovered_failure_areasFind code areas with both low coverage AND test failures (high risk).
projectId (required for gaf_ keys), days (optional, default: 30, max: 365), coverageThreshold (optional, default: 80%)get_failure_clustersGroup failed tests by root cause using error message similarity.
projectId (required for gaf_ keys), testRunId (required)search_failuresSearch past failures by error message, stack trace, or test name — or list every failure in the window.
query (optional, omit to return all failures), projectId (required for gaf_ keys), searchIn (optional: errors/names/all, default all), days (optional, default: 30, max: 365), branch (optional), limit (optional, default: 20, max: 100), offset (optional, default: 0)errorStack, run and commit context, plus pagination (limit, offset, hasMore) and truncated when scan caps cut the list shortget_upload_statusCheck if CI results have been uploaded and processed.
projectId (required for gaf_ keys), sessionId (optional), commitSha (optional), branch (optional)upload_test_resultsUpload structured test results. This is the only function that writes.
Use it when you have results in hand — parsed from CI output or a runner's JSON report — and no Gaffer CLI is available to upload them.
projectId (required for gaf_ keys), framework (required), tests (required), branch, commitSha, ciProvider, startedAt, finishedAt, coverageuploadSessionId, the generated runId, and the derived pass/fail/skip summaryrunId, the run timestamps and the summary are derived from tests — pass
startedAt/finishedAt only if you know the real wall-clock window.
Two constraints worth knowing:
get_upload_status instead of retrying.Processing is asynchronous: results take a few seconds to become visible to the read functions.
These workflows show how an AI agent diagnoses CI failures, waits for results, and finds coverage gaps. Each step is a codemode function, so a whole chain runs inside one execute_code call rather than one round-trip per step.
list_test_runs(projectId, status="failed")
→ get_test_run_details(projectId, testRunId, status="failed")
→ get_failure_clusters(projectId, testRunId)
→ get_test_history(projectId, testName="...")
→ compare_test_metrics(projectId, testName, beforeCommit, afterCommit)
get_upload_status(projectId, commitSha="abc123")
→ poll until processingStatus="completed"
→ get_test_run_details(projectId, testRunId)
find_uncovered_failure_areas(projectId)
→ get_untested_files(projectId)
→ get_coverage_for_file(projectId, filePath="src/critical/")
| Agent Question | Function |
|---|---|
| "What failed?" | get_test_run_details |
| "Same root cause?" | get_failure_clusters |
| "Seen this error before?" | search_failures |
| "Is it flaky?" | get_flaky_tests |
| "Is this new?" | get_test_history |
| "Did my fix work?" | compare_test_metrics |
| "Are results ready?" | get_upload_status |
| "What's untested?" | find_uncovered_failure_areas |
| "What's slow?" | get_slowest_tests |
When using coverage tools to improve your test suite, combine coverage data with codebase exploration for best results:
Before targeting files purely by coverage percentage, explore which code is actually critical:
Low coverage alone doesn't indicate priority. Consider:
find_uncovered_failure_areas for thisThe get_untested_files tool may return many frontend components. For backend or specific areas:
# Query specific paths with get_coverage_for_file
get_coverage_for_file(filePath="server/services")
get_coverage_for_file(filePath="src/api")
get_coverage_for_file(filePath="lib/core")
get_coverage_summaryget_coverage_for_file on critical pathsThere are three credentials.
| Credential | Prefix | Scope | What it can do |
|---|---|---|---|
| OAuth sign-in | none | One organization, chosen at sign-in | Read functions only. No upload_test_results. list_projects lists that organization's projects. Hosted endpoint only. |
| User API key | gaf_ | Every project your account can reach | Read functions, plus upload_test_results. list_projects lists projects in every organization you belong to. |
| Project token | gfr_ | One project | Read functions and upload_test_results for that project. Omit projectId. |
On the hosted endpoint, Claude Code, claude.ai and Claude Desktop sign in without a key. The grant covers one organization and is read-only: it cannot call upload_test_results. Revoke it under Account Settings > AI assistants > Connected apps.
User API Keys (gaf_ prefix) cover every project your account can reach. They can read all of them and upload test results to any of them (upload_test_results, rate-limited to 300 per hour per project). Get your API Key from: Account Settings > API Keys
Project Tokens (gfr_ prefix) are designed for uploading test results and only provide access to a single project. When you use one, omit projectId: it resolves automatically. list_projects and get_report are not available with one. A user API Key or sign-in is preferred for the MCP server because both enable list_projects.
| Variable | Required | Description |
|---|---|---|
GAFFER_API_KEY | Yes | Your Gaffer API Key (starts with gaf_) |
GAFFER_API_URL | No | API base URL (default: https://app.gaffer.sh) |
pnpm install
pnpm build
Test locally with Claude Code (use absolute path to built file):
{
"mcpServers": {
"gaffer": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": {
"GAFFER_API_KEY": "gaf_..."
}
}
}
}
MIT