Skip to main content
Glama

TestHeal

The missing reliability layer for AI coding agents — zero API cost.

Gives Claude Code, Cursor, Gemini CLI, OpenCode and others a disciplined protocol for diagnosing and fixing failing tests. Uses the agent's own model. No API keys. No extra cost.


Easiest ways to connect (pick one)

1. Claude Code — one command

claude mcp add test-heal -- npx -y github:webscout9-png/test-heal

Verify:

claude mcp list

Remove later:

claude mcp remove test-heal

2. Any agent — one command with add-mcp

npx add-mcp github:webscout9-png/test-heal -y

3. Cursor — paste this config

Put in ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "test-heal": {
      "command": "npx",
      "args": ["-y", "github:webscout9-png/test-heal"]
    }
  }
}

Restart Cursor.


4. From source

git clone https://github.com/webscout9-png/test-heal.git
cd test-heal
npm install
npm run build

Then:

{
  "mcpServers": {
    "test-heal": {
      "command": "node",
      "args": ["/absolute/path/to/test-heal/bin/run.js"]
    }
  }
}

Related MCP server: MCP Workflow Engine

What was fixed (v0.3.3)

Root cause of connection failures:
The package bin pointed at dist/index.js, but dist/ is not committed to the repo. When agents ran npx github:webscout9-png/test-heal, the entry file was missing and the server failed to start.

Fix:
A small pure-JS launcher (bin/run.js) now:

  1. Uses dist/index.js if it exists (after a local build)

  2. Otherwise runs the TypeScript source with tsx (works for npx github: installs)

No pre-build required to connect the server to an agent.


Tools

Tool

When to use

diagnose_test_failure

First step when a test fails

propose_minimal_fix

After diagnosis — forces a tiny, safe patch

assess_fix_safety

Before applying any non-trivial fix


License

MIT

Available Tools

3 tools
assess_fix_safetyA

Evaluate whether a proposed patch is likely to introduce regressions. Returns risk level, potential side effects, and a clear recommendation. Use before applying any non-trivial fix.

Inputs: patch (required), source_files (required), language, diagnosis, +1 more.

diagnose_test_failureA

Perform deep root-cause analysis of a failing test. Returns ranked hypotheses with confidence scores, evidence, and precise locations. Call this first when a test fails. Prefer this over guessing from the raw test output.

Inputs: test_output (required), source_files (required), git_diff, language, +2 more.

propose_minimal_fixA

Generate the smallest possible high-confidence patch for a diagnosed root cause. Always prefer minimal edits. Returns a unified diff, explanation, confidence, and risk level. Call diagnose_test_failure first when possible.

Inputs: test_output (required), source_files (required), git_diff, language, +4 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool handles a distinct stage of a clear pipeline: diagnose, propose, assess. There is no overlap or ambiguity about which tool to call at each step.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: diagnose_test_failure, propose_minimal_fix, assess_fix_safety. The verbs clearly indicate distinct actions and the nouns describe the target artifact.

    Tool Count4/5

    Three tools is on the smaller side, but each covers a necessary phase of the test-fix workflow. The count is reasonable for a focused MCP server, though slightly thin.

    Completeness4/5

    The tools cover the core diagnose-propose-assess lifecycle well. A minor gap is the lack of an explicit tool to apply or commit the fix, but that may be intentionally outside the server's scope.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables LLMs to automatically diagnose coding errors through codebase search, test execution, and live debugger integration (DAP/V8 CDP). Provides a secure, policy-gated environment for investigating failures while preventing destructive operations.
      9
      ISC
    • A
      license
      A
      quality
      B
      maintenance
      Provides coding agents with visibility into test health through tools for flaky test detection, test quality linting, and LLM evaluation harness, enabling them to triage failures, review test quality, and check prompt changes for regressions.
      9
      Apache 2.0