Test Coverage MCP
MCP server giving coding agents compact LCOV test coverage stats and session baseline
- Pricing
- Open source
- Platforms
- CLI, vscode, self-hosted
- Runs
- Locally
- Version
- 1.1.0
- Listing updated
- today
Similar MCP servers
About Test Coverage MCP
Test Coverage MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
The README frames this as a way to give coding and testing agents awareness of coverage while they work, instead of having them parse raw LCOV reports themselves. It exposes tools that return overall line and branch coverage percentages, or the figures for a single file, as small JSON responses.
A session baseline feature records coverage at the start of a task and later reports the percentage change, positive or negative. The README says baselines are kept in temporary storage and cleared on restart, so the agent does not have to hold the starting numbers in its own context.
The server is an npm package run over stdio and is configured in Claude Desktop, Cursor, VS Code Copilot and Windsurf through a short JSON entry. The README says it handles standard LCOV variants, including summary-only records, per-line DA entries and branch data.
Install
Run in a terminal
claude mcp add test-coverage-mcp -- npx -y test-coverage-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"test-coverage-mcp": {
"command": "npx",
"args": [
"-y",
"test-coverage-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"test-coverage-mcp": {
"command": "npx",
"args": [
"-y",
"test-coverage-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"test-coverage-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"test-coverage-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"test-coverage-mcp": {
"command": "npx",
"args": [
"-y",
"test-coverage-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"test-coverage-mcp": {
"command": "npx",
"args": [
"-y",
"test-coverage-mcp"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
- coverage_summary
- Get overall project line and branch coverage from an LCOV file.
- coverage_file_summary
- Get line and branch coverage for a specific file.
- start_recording
- Record current coverage as a baseline for later comparison.
- get_diff_since_start
- Compare current coverage against the recorded baseline.
What it does
- Overall coverage summary
- Returns project-wide line and branch coverage percentages from an LCOV file.
- Per-file coverage lookup
- Reports line and branch coverage for a single source file path.
- Session baseline diffs
- Records a starting coverage figure and reports the change since then.
- Compact JSON output
- Responses are small JSON objects intended to keep token use low.
- Broad LCOV format support
- Handles summary records, line-level DA entries and branch BRDA data.
Good for
- Letting a coding agent confirm its changes did not reduce test coverage
- Having a testing agent find which files still have low coverage
- Tracking coverage gain across a single agent coding session
- Avoiding custom LCOV parsing scripts written on the fly by agents
Pricing
Open source
Free and MIT licensed; installed from npm.
Test Coverage MCP FAQ
How do I install it?
The README gives the command npm install -g test-coverage-mcp, and the MCP configuration uses npx -y test-coverage-mcp.
What license is it under?
The README states the project is MIT licensed, © Yoni Goldberg.
Does it run the tests itself?
No. The README says you must run your test suite with coverage enabled first so an LCOV file exists, then point the tools at it.
What happens if I call get_diff_since_start without a baseline?
The README's troubleshooting section says start_recording must be called first, otherwise no baseline is found.
Is Test Coverage MCP free?
Yes. Test Coverage MCP is open source, so you can use and self-host it for free.
How do I add Test Coverage MCP to Claude Code?
Run this command in your terminal: claude mcp add test-coverage-mcp -- npx -y test-coverage-mcp
What are the best alternatives to Test Coverage MCP?
The closest alternatives to Test Coverage MCP are Codecov MCP by usefulapi, Test Intel, Lens MCP, Codelens MCP and MCP Test Runner.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.