Coverctl logo

Coverctl

Enforces per-domain coverage policies across 15 languages through agent-callable MCP tools and local native test runners.

Install Coverctl

Run the project’s own setup commands, in order.

Setup steps from the project

coverctl installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    brew install klarlabs-studio/tap/coverctl
    

Overview

The coverctl MCP server lets AI coding agents run coverage checks, inspect gaps, compare profiles, and enforce per-domain policies across 15 languages. It uses each language's native coverage runner and a repository-level `.coverctl.yaml` configuration, with agent mode exposing `check`, `suggest`, and `debt`, and CI mode exposing all nine tools. Reach for it when coverage feedback needs to happen during an editing session rather than after CI. It runs locally over stdio and does not require source uploads or a hosted account.

Use cases

  • Run coverage checks before committing agent-written code
  • Rank uncovered domains and files for test work
  • Compare coverage profiles to identify regressions
  • Generate pull request coverage comments
  • Track coverage trends over recorded results

Key features

  • Per-domain coverage policy enforcement
  • Native coverage runner support across 15 languages
  • Agent and CI MCP modes
  • Coverage debt and threshold suggestions
  • Profile comparison and trend recording
  • Local stdio execution with input and output sanitization

Tools9

What Coverctl lets your agent do. Expand a tool for its parameters.

Self-reported~156 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 84d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit5d agoMost recent push to the default branch.
Tools exposed9Callable tools this server registers over MCP.

How Coverctl works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Coverctl

coverctl is an MCP server that connects AI coding agents to native coverage runners across 15 languages. Its main tools are check, suggest, and debt in agent mode, with init, report, record, compare, badge, and pr-comment available in CI mode. It enforces per-domain coverage policies from .coverctl.yaml.

Install it with Homebrew using `brew install klarlabs-studio/tap/coverctl`, then configure an MCP client to run `coverctl mcp serve`. Run `coverctl mcp doctor` afterward to validate the installation and show remediation details for failed steps.

Yes, coverctl works with Cursor because it supports MCP servers. Configure Cursor to launch `coverctl mcp serve`; the repository points to client-specific MCP documentation for the exact configuration format.

coverctl supports Python, TypeScript/JavaScript, Java, Rust, Go, C#, C/C++, PHP, Ruby, Swift, Dart, Scala, Elixir, and Shell. It invokes each language's native coverage runner and applies the same domain-policy model across projects.

Use the `compare` tool in CI mode to diff two coverage profiles. It returns the coverage delta, improved and regressed files, and changes by domain.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCoverctl AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/coverctl?style=directory)](https://allmcps.com/mcp/coverctl)
HTML Embed
<a href="https://allmcps.com/mcp/coverctl"><img src="https://allmcps.com/api/badge/coverctl?style=directory" alt="Coverctl on AllMCPs" /></a>