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.tsfile.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
- Call
heal_autopilot_start({ mode, request }). - While status is
running:- If
pendingQuestionis set, collect an answer and callheal_autopilot_answer. - If
pendingSecurityGateis set, ask the user to explicitly allow or deny, then callheal_autopilot_answer. - Otherwise call
heal_autopilot_poll({ runId }).
- If
- Stop when status is
succeeded,failed, orcancelled.
Output behavior
- In
buildmode, autopilot writes or edits test files. - In
navigatemode, no test file is written; use the final message as the validation result.