Labsco
MCP SERVER

LCOV Coverage Reports

by sofia-open-source

Read an lcov report as something actionable: which files are worst, exactly which lines and branches are uncovered, and the source annotated line by line.

Automated Testing & QAVerified
Summary
The third tool is what changes an agent's relationship with coverage: the uncovered lines arrive with the code around them.

A percentage says a file needs tests and a list of line numbers says where, but neither says what the untested branch does. get_annotated_source marks each line COVERED, NOT COV or NO DATA across a range, which puts the gap and its surrounding logic in front of the model together. NO DATA is worth reading as its own state rather than as zero, since it marks lines the report says nothing about. The merging inside list_uncovered_regions is what keeps this workable — ranges rather than a column of individual line numbers.

What it is

A coverage reader with three tools over an lcov file — aggregated and per-file statistics, uncovered regions for one file, and source annotated with per-line coverage status.

What you get
  • get_coverage_overview returns aggregated and per-file line, function and branch percentages, with a directory filter, a sort order and a threshold for prioritising.
  • list_uncovered_regions returns the uncovered lines and branches for one file, merging consecutive uncovered lines into startLine and endLine ranges.
  • get_annotated_source returns the file's source annotated line by line as COVERED, NOT COV or NO DATA, over a line range you choose.
Requirements

An lcov report and the project root it was generated against — lcov_path and project_root are parameters on all three tools, with additional_roots and source_root for source that sits elsewhere.

Setup effort

One command — npx -y @sofia-open-source/analyze-coverage-mcp