Skip to main content
Momentic is a managed testing platform for the web with its own MCP server. A coding agent (Cursor, Claude Code, Codex, any MCP client) previews each candidate step against the live page, gets a screenshot back, and only commits the step on success. Saved tests are YAML, executed on a managed runner with a multi-modal step cache and auto-heal so generated tests replay deterministically. Playwright MCP is Microsoft’s open-source MCP server. It lets a coding agent (Cursor, Claude Code, VSCode Copilot) drive a browser, capture snapshots, and synthesize Playwright tests. It’s a fit for teams already on Playwright who want to assist authoring with a coding agent and end up with standard Playwright code.

Speed and caching

How the multi-modal cache works

A cached step stores more than one way to find the target: where it sits on screen, what it looks like, what text it contains, and the structural and accessibility attributes around it. Which of those signals matters for a given step is inferred from the natural-language description. “The red Cancel button below the Order Summary header” leans on visual and positional signals; “the Submit button in the form” leans on structure and role. When a step replays, the runner checks the stored signals against the live page and runs the action without invoking the LLM when there’s a match.

What happens on replay

The authoring loop only matters if the generated artifact survives the next day. Take this generated Playwright spec the day after authoring, against the same app with one change: the team replaced the static welcome string with a personalized one ("Welcome, Ada" -> "Hi Ada, welcome back"). Playwright MCP, replay:
  1. page.locator('input[type="email"]').fill(...) and the subsequent interactions resolve normally.
  2. page.waitForTimeout(2000) blocks for 2s regardless of whether the page is ready.
  3. expect(page.getByText("Welcome, Ada")).toBeVisible() fails. The text was guessed from the snapshot the agent saw during authoring; it no longer matches.
  4. The CI job fails. The maintainer either re-runs the MCP authoring loop from scratch or hand-edits the spec to use a different selector. Either way it’s a code review.
Momentic, replay:
  1. type / click steps hit the cache and run in milliseconds.
  2. assert: The dashboard chart is visible and not cut off is evaluated by the assertion agent against the current page state. The agent reasons over the intent of the assertion, not a literal string match, so the rephrased welcome banner doesn’t trip it.
  3. The test passes without a code change to review.
Playwright MCP materializes locators and string literals at authoring time, so a change to either is a test failure. Momentic resolves user-intent descriptions at runtime, caches them for speed, and re-resolves them when the UI changes, so the same change heals instead of failing.
Each MCP tool call (browser_click, browser_snapshot, browser_navigate, …) returns a structured snapshot of the page: rendered DOM, a11y tree, and console messages. The agent’s prompt history accumulates every snapshot from every tool call in the session.Momentic’s MCP server returns a compressed screenshot plus a short status from each preview / run call. Snapshot expansion happens server-side during locator resolution; the full DOM is only returned when the agent explicitly asks for the session state. Locator resolution runs against the cache first; cache hits return without invoking the LLM at all.

Authoring loop

Add a spec-driven section to AGENTS.md so the coding agent keeps Momentic tests in sync with feature work. See the integration docs.

Generated artifact side-by-side

Playwright MCP (after running the flow once from memory):
The text was guessed from a stale snapshot; the 2000ms wait was inserted because the agent saw a transient loading state. Replay often fails on one or both. Agentic simplified format (each step previewed live before commit):
Explicit simplified format (same flow, step-by-step):
The test contains no hard-coded waits, guessed text, or brittle selectors materialized at generation time.

A more realistic test

The hello-world above doesn’t show the full simplified format surface. A representative checkout regression with module reuse, parameter inputs, typed extraction, and a conditional looks like this:
checkout.test.yaml
The matching module:
../modules/sign-in.module.yaml

When to pick which

Playwright MCP is the right call if you have an existing Playwright codebase you want to keep, your test suite is small and stable, you have a hard requirement for OSS with no SaaS, and your agent surface is VSCode or Claude Code only. Momentic is the right call if coding agents are part of your authoring flow at scale, you need generated tests to replay deterministically without re-prompting, your product churns frequently enough that hard-coded waits and text assertions break on a weekly basis, and you expect AI-native primitives + auto-heal + recovery + a managed dashboard built in. For the build-it-yourself version of this decision, see Build vs. buy.