Heal

MCP server

Use the heal MCP server to run autopilot in build or navigate mode.

Heal MCP server

The heal MCP server exposes Autopilot over MCP so agents can run browser validation loops and test generation without shelling out to the CLI directly.

Supported modes

  • build: create or edit a Playwright .test.ts file.
  • navigate: drive the browser to validate behavior without writing a test file (equivalent to CLI --navigation-mode).

Tools

  • heal_autopilot_start({ mode, request }): start a new autopilot run.
  • heal_autopilot_poll({ runId }): wait for progress updates.
  • heal_autopilot_answer({ runId, ... }): answer pending questions or security gates.
  • heal_autopilot_cancel({ runId }): cancel a running run.

Suggested run loop

  1. Call heal_autopilot_start({ mode, request }).
  2. While status is running:
    • If pendingQuestion is set, collect an answer and call heal_autopilot_answer.
    • If pendingSecurityGate is set, ask the user to explicitly allow or deny, then call heal_autopilot_answer.
    • Otherwise call heal_autopilot_poll({ runId }).
  3. Stop when status is succeeded, failed, or cancelled.

Output behavior

  • In build mode, autopilot writes or edits test files.
  • In navigate mode, no test file is written; use the final message as the validation result.

See also