# test-coverage-mcp

Feeds your coding agent real coverage numbers from an LCOV file, so it can tell whether its edits helped or hurt the tests.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 42
- Author: goldbergyoni
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/goldbergyoni/test-coverage-mcp
- Updated: 2026-02-03
- HTML: https://affpapa.org/en/nevibecode/mcp/test-coverage-mcp

## What it does

The server parses LCOV and hands the agent percentages instead of a giant report. Four tools are exposed: `coverage_summary` for the whole project, `coverage_file_summary` for one file, `start_recording` to snapshot the current numbers, and `get_diff_since_start` to compare against that snapshot. The LCOV path goes in `lcovPath`, and it falls back to `./coverage/lcov.info`.

Recording a baseline keeps the starting figures out of the agent's context. It saves them once at the top of a session, then asks for the delta later and gets the gain or drop in percentage points. Answers are short, so the context window stays free.

Any language works as long as your test runner can emit LCOV. The `lcov.info` file has to exist when a tool is called — otherwise there is nothing to read. Install with `npm install -g test-coverage-mcp`, then register the server in your editor's config.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add test-coverage-mcp -- npx -y test-coverage-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add test-coverage-mcp -- npx -y test-coverage-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "test-coverage-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "test-coverage-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "test-coverage-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "test-coverage-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add test-coverage-mcp npx -y test-coverage-mcp
```

## When to use it
- see whether an agent's edits dropped coverage
- locate files with no test coverage before touching them
- compare coverage against the start of a session
- get project-wide percentages without opening the full LCOV
- check one file's coverage before refactoring it

## Example prompts
- Check the current test coverage with `coverage_summary`
- Record a baseline with `start_recording`, then show me the diff
- What's the coverage for `src/utils/parser.ts`? Use `coverage_file_summary`

## Similar
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74559
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [SeleniumBase MCP](https://affpapa.org/en/nevibecode/mcp/seleniumbase-mcp.md) — MCP server · ★ 13169
- [mobile-mcp](https://affpapa.org/en/nevibecode/mcp/mobile-mcp.md) — MCP server · ★ 9946
- [e2e](https://affpapa.org/en/nevibecode/mcp/e2e.md) — MCP server · ★ 11912
- [mockserver](https://affpapa.org/en/nevibecode/mcp/mockserver.md) — MCP server · ★ 4996

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
