MCP server · open source · Apache-2.0

End-to-end tests your agent remembers.

Record a flow once in your own browser. Understudy remembers it, replays it as a test, notices when your app changes, and runs goals you describe in words — including goals that need pieces of several recordings.

Install npm GitHub

Why

Cheap to rerun

A remembered flow runs in one call — about 1.5k tokens — instead of an agent re-driving the browser for 40–100k.

Catches change

Every run compares the path it took with recent runs, and turns console errors and failed requests into findings.

Only proven flows

A recording is replayed before it's kept. Memory never holds a flow that doesn't work.

No secrets stored

Passwords become placeholders, filled from your own settings at replay. Emails can too.

Install

You need Node 22+ and a MongoDB with vector search — a free Atlas cluster works, and so does self-hosted MongoDB Community Edition with its search engine (mongot). A Voyage key is optional, to match goals by meaning.

Terminal
npm install -g @jeffawe/understudy
npx playwright install --only-shell chromium
understudy config set MONGODB_URI="mongodb+srv://…" EMBED_KEY="…"

Then add it to your agent. It starts and stops with the agent's session, and reads your settings from the env file, so keys never go in the agent's config or the chat:

Claude Code
claude mcp add understudy -- \
  npx -y -p @jeffawe/understudy understudy-mcp \
  --env-file ~/.understudy/understudy.env

Any MCP client works — Claude Code, Codex, Cursor. To record, load the extension once in Chrome, Edge, Brave or another Chromium browser: understudy extension says where it is.

How it works

  1. RecordClick through a flow in your own browser with the extension — or let the agent drive it and hand over the script.
  2. SaveUnderstudy replays it headless and keeps it if every step passes — or, if you say so, as unproven until a run passes.
  3. RunAsk for a goal in words. It finds the flows that do it, joins them, and runs them — asking the agent only before a browser opens.
  4. LearnDrift, findings, facts and lessons build up over runs, so the next run knows more.