# coverctl [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/felixgeelhaar/coverctl  
**GitHub Stars:** 2  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/coverctl

## Description
Go code coverage analysis tool with MCP server for AI-powered coverage workflows

## Tools
Capabilities this server exposes over MCP:

- **check** — Run tests with coverage and enforce policy. Returns per-domain pass/fail, files, warnings.
- **suggest** — Recommend thresholds (`current` / `aggressive` / `conservative`).
- **debt** — Coverage gap per domain — where to spend effort, ranked.
- **init** — Auto-detect project structure and create `.coverctl.yaml` with domain policies.
- **report** — Analyze an existing coverage profile without running tests.
- **record** — Record current coverage to history for trend tracking.
- **compare** — Diff two coverage profiles. Returns delta, improved/regressed files, domain changes.
- **badge** — Generate SVG coverage badge.
- **pr-comment** — Post coverage report to GitHub / GitLab / Bitbucket PR.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/felixgeelhaar/coverctl), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
brew install klarlabs-studio/tap/coverctl
```

## Documentation

## What coverctl does

The coverctl MCP server brings coverage policy into an AI coding agent's workflow. It supports Python, TypeScript/JavaScript, Java, Rust, Go, C#, C/C++, PHP, Ruby, Swift, Dart, Scala, Elixir, and Shell. Instead of treating coverage as a dashboard metric, it groups paths into domains and checks each domain against configured minimums.

The server can run tests, inspect an existing coverage profile, identify uncovered work, and report whether the configured policy passes. Results include structured information such as domain status, files, warnings, coverage changes, and rejection details. Coverage policy is stored in `.coverctl.yaml`; unusual or mock-heavy project layouts may require an explicit `domains` configuration.

## How it works

The coverctl MCP server runs as a local process and communicates with an MCP client over stdio. In agent mode, the advertised surface contains `check`, `suggest`, and `debt`, keeping the default tool set focused on the most common edit-and-verify loop. CI mode, enabled with `--mode=ci`, adds the remaining operations.

`check` invokes the project's native coverage runner and evaluates the result against policy. `suggest` offers current, aggressive, or conservative threshold recommendations. `debt` ranks coverage gaps by domain to help prioritize test work. Read-only MCP resources are also available for debt, trend history, suggestions, and detected configuration.

Inputs and outputs are handled as untrusted MCP data. Agent mode accepts typed options rather than arbitrary runner arguments, and returned filenames, domain names, and paths are encoded to reduce prompt-injection risk. The repository policy remains authoritative during agent checks.

## Setup and configuration

Install the CLI with Homebrew:

```bash
brew install klarlabs-studio/tap/coverctl
```

Register the coverctl MCP server in an MCP client by launching `coverctl mcp serve`. For Claude Code, the configuration uses the `coverctl` command with the `mcp` and `serve` arguments. Other MCP-capable clients require their corresponding server configuration format. Run `coverctl mcp doctor` to validate the installation and receive pass/fail results with remediation details.

The `init` tool can detect project structure and create `.coverctl.yaml` with domain policies, but it is available in CI mode rather than the default agent surface. Human users can also use the CLI directly.

## Tools and capabilities

The full CI-mode surface includes:

- `check`: run tests with coverage and enforce policy.
- `suggest`: recommend coverage thresholds.
- `debt`: rank coverage gaps by domain.
- `init`: create an initial policy configuration.
- `report`: analyze a profile without rerunning tests.
- `record`: save coverage for trend tracking.
- `compare`: compare profiles and identify file and domain changes.
- `badge`: generate an SVG coverage badge.
- `pr-comment`: post a report to a GitHub, GitLab, or Bitbucket pull request.

The server is Apache-2.0 licensed and local-first. By default, it sends no telemetry, analytics, source data, or coverage data elsewhere. An optional `--mcp-telemetry` flag writes structured tool-call events to stderr.

## Limitations and notes

The MCP server is policy and orchestration around native language coverage runners; it is not a replacement for tools such as `go test -cover` or `pytest --cov`. The agent's suggested code changes still require human review. A project with an unusual layout may need explicit domain mappings.

Agent mode intentionally prevents arbitrary test-runner arguments, alternate policy files, partial-domain checks, narrowed coverage scopes, skipped test runs, and incremental checks. These restrictions help keep an agent from making a failing policy appear to pass. The repository configuration is authoritative, so lowering thresholds is a policy change rather than a coverage fix.

_Full upstream README: https://allmcps.com/mcp/coverctl/readme_

