Skip to main content
Glama
coverage-orchestrator-mcp

coverage-orchestrator-mcp

by markgregg

coverage-orchestrator-mcp

A TypeScript MCP server that drives test coverage toward target thresholds by coordinating workspace test execution with code-tree-mcp uncovered-symbol analysis.

What It Does

  • ensures workspace coverage tooling exists

  • runs tests with coverage and collects failures

  • imports LCOV into code-tree-mcp

  • fetches uncovered symbols from code-tree-mcp

  • ranks the next highest-impact coverage actions

  • iterates until thresholds are met or a stop condition is reached

Related MCP server: OrangePro MCP

Requirements

  • Node.js 20+

  • a reachable code-tree-mcp binary, typically via npx code-tree-mcp

  • a target workspace with a Node-based test runner

Install

npm install
npm run build

Run

One-command server startup after build:

npx coverage-orchestrator-mcp

Run the fixture workflow and call the orchestrator from npx:

npx coverage-orchestrator-mcp implementTestCoverage

Optional target percentage:

npx coverage-orchestrator-mcp implementTestCoverage 90

If the percentage is omitted, this command targets 100% (highest possible target).

During local development:

npm run dev

Setup

Print VS Code MCP configuration:

npx coverage-orchestrator-mcp setup --print-config

Write .vscode/mcp.json in the current working directory:

npx coverage-orchestrator-mcp setup --client vscode

If the current directory is not the workspace you want to update, pass --project-root.

Workspace

This repository tree includes a multi-root workspace file at ../new mc.code-workspace that opens both:

  • code-tree-mcp

  • coverage-orchestrator-mcp

Tool Workflow Example

  1. Call ensure_coverage_setup for the target workspace.

  2. Call run_tests_with_coverage.

  3. Call fetch_uncovered_code.

  4. Call verify_coverage_target.

  5. Call improve_test_coverage_orchestrator for iterative orchestration.

Troubleshooting

  • If setup cannot write .vscode/mcp.json, rerun with --print-config and copy the JSON manually.

  • If code-tree-mcp is not on your path, configure the orchestrator process with CODE_TREE_MCP_COMMAND and CODE_TREE_MCP_ARGS.

  • If coverage artifacts are missing, confirm the target workspace can run npm run test:coverage and produces both coverage/coverage-summary.json and coverage/lcov.info.

Validation

  • npm test runs unit coverage helpers, CLI, server routing, and orchestrator-loop tests.

  • npm run test:integration rebuilds the sibling code-tree-mcp package, launches it over stdio, and verifies uncovered-symbol fetching against a real MCP server.

Available Tools

5 tools
ensure_coverage_setupC

Ensure the target workspace has runnable coverage commands and coverage dependencies.

Inputs: workspacePath, workspacePaths, preferredRunner, preferredCoverageProvider.

fetch_uncovered_codeC

Import LCOV into code-tree-mcp and fetch ranked uncovered symbols.

Inputs: limit, language, nodeType, pathPrefix, +3 more.

improve_test_coverage_orchestratorC

Drive the full iterative coverage improvement loop and produce prioritized next actions.

Inputs: excludePaths, includePaths, maxIterations, workspacePath, +6 more.

run_tests_with_coverageC

Run tests and coverage in the target workspace and collect failures plus artifact paths.

Inputs: testCommand, workspacePath, workspacePaths, coverageCommand.

verify_coverage_targetC

Compare current coverage metrics against requested thresholds.

Inputs: workspacePath, workspacePaths, targetLinesPercent, targetBranchesPercent, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose: setup, fetching uncovered code, running tests, verifying targets, and orchestrating improvements. No two tools serve overlapping functions.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., ensure_coverage_setup, fetch_uncovered_code, verify_coverage_target), making them predictable and easy to differentiate.

    Tool Count5/5

    Five tools is appropriate for a coverage orchestration server, covering the essential workflow without unnecessary complexity. The scope is well-defined.

    Completeness5/5

    The tool set covers the full lifecycle: setup, running tests, fetching uncovered code, verification against thresholds, and orchestration of iterative improvements. No obvious gaps for the intended purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Wraps existing test frameworks (Jest, Vitest, Pytest) and exposes structured, LLM-optimized results via MCP tools with progressive disclosure and diff-aware execution.
      11
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coding agents to deterministically audit test files for fake or fragile tests (no assertions, tautological or swallowed assertions, focused/skipped tests, fixed sleeps, real network calls) and to run the project's actual test runner, treating an exit-0 run with zero tests as a failure and flagging changed source files that lack test coverage.
      51 npm
      MIT