We Built Coverage Analytics. Then We Used Them On Ourselves.

By Alex Gandy January 22, 2026

We shipped coverage analytics for Gaffer’s MCP server. Before announcing it, I pointed it at our own codebase.

The Tools

Four coverage tools:

  • get_coverage_summary - Overall metrics and trends
  • get_untested_files - Files below a threshold
  • get_coverage_for_file - Coverage for specific paths
  • find_uncovered_failure_areas - Low coverage + test failures

First Query

// get_coverage_summary response
{
  "current": { "lines": 34, "branches": 82, "functions": 66 },
  "trend": { "direction": "up", "change": 1 },
  "lowestCoverageFiles": [
    { "path": "app/components/SomeComponent.vue", "coverage": 0 }
  ]
}

34% line coverage. The gaps were mostly Vue components, which are harder to unit test and mostly covered by our playwright tests (more to come on this someday).

Server-side code looked better:

// get_coverage_for_file("server/services") response
{
  "files": [
    { "path": "member.service.ts", "percentage": 92 },
    { "path": "github.service.ts", "percentage": 84 },
    { "path": "project.service.ts", "percentage": 16 },
    { "path": "user.service.ts", "percentage": 0 }
  ]
}

I validated these against local coverage runs and they matched within rounding.

The Iterations

Over seven iterations, I targeted files based on MCP data:

IterationTargetBeforeAfter
1Two services at 0%0%100%
2Large service16%82%
3-5Auth and caching utilities0%100%
6Largest uncovered file60%93%
7”Invisible” files (see below)n/atested

Final numbers: 34% → 38% lines, 66% → 71% functions, 237 tests added.

Invisible Files

The interesting discovery: some files don’t appear in coverage reports at all.

When I queried server/utils, I got files with 0% coverage. But several files were missing entirely. They had zero coverage and were never imported during test runs, so the coverage tool had never seen them.

Coverage tools can only report on code that gets loaded. Files that are never touched are invisible. This could be a sign of some terrible sprawl in our code, but I’m not so sure.

To find these, I had to grep for import counts and cross-reference against coverage data manually. We’re adding a find_invisible_files tool to automate this.

What Coverage Data Doesn’t Tell You

get_untested_files returned 230 Vue components. Server code wasn’t surfaced because those files had some coverage.

Coverage data tells you how much is tested. It doesn’t tell you what matters. You still need to know:

  • What runs in production (entry points, handlers)
  • What other code depends on (import counts)
  • What handles critical operations (auth, payments)

The MCP gives you the numbers. Deciding where to focus is still on you.

Try It

The tools are in the Gaffer MCP server:

{
  "mcpServers": {
    "gaffer": {
      "command": "npx",
      "args": ["-y", "@gaffer-sh/mcp@latest"],
      "env": {
        "GAFFER_API_KEY": "your-api-key"
      }
    }
  }
}
Start Free