EasyPlaywrightMCP
Enables automated testing and demo video creation using Playwright, with login, session orchestration, narration, and video compilation.
README
EasyPlaywrightMCP
LLM-driven Playwright MCP for automated testing and demo videos.
Capture: synthetic cursor + always-on click highlight, 1920×1080 @ deviceScaleFactor 2, WebM→H.264 60fps minterpolate, smooth rAF scroll.
Narration: Microsoft Edge neural TTS via edge-tts.
Install
| Client | Guide |
|---|---|
| Cursor | docs/INSTALL-CURSOR.md |
| Cursor CLI | docs/INSTALL-CURSOR-CLI.md |
| Claude Desktop | docs/INSTALL-CLAUDE.md |
| Claude CLI | docs/INSTALL-CLAUDE-CLI.md |
Example prompts
Using EasyPlaywrightMCP Make a demo video of the feature in my last PR
Using EasyPlaywrightMCP Connect my google oauth and test this feature in production. Report the success or failure reason for each operation
Using EasyPlaywrightMCP Create a demo video of the steps in this MD
Workflows
Automated testing
login→ saveprofileId(orset_session_authfor Google/bot-blocked OAuth)start_session(usually headless) withprofileId- Loop:
query_session→orchestrate_session end_session- Short answer to the user (pass/fail + findings)
Demo videos
loginif auth is needed (orset_session_authfor restricted providers)start_sessionwithrecordVideoPath(demoMode / auto-narrate on by default)- Loop:
query_session→orchestrate_session— put spoken lines indescription/narration; server TTS + holds end_session(finalizes WebM, trims idle, writes/updates.cues.json)compile_demowith clipvideoPathonly (loads cues automatically)
Demo vs testing: Recording sessions conjoin speech and UI on the server. Testing sessions (no recordVideoPath) keep snappy startMs/endMs pacing.
Restricted auth: For Google OAuth / Sign in with Google (and Microsoft, Discord, Cloudflare bot walls, etc.), do not use headed login. Immediately give the user the login URL, Network → Cookie header steps, and the console snippet from MCP instructions; then set_session_auth with their paste → start_session({ profileId }).
Per-app cookie guides: LinkedIn · Google OAuth / Workspace
Tools & type examples
login
// LoginInput
{
siteUrl: "https://app.example.com",
authUrl: "https://app.example.com/login",
username?: "user@example.com",
password?: "secret",
oauth?: {
accessToken?: "eyJ...",
cookies?: [{ name: "sid", value: "x", domain: "app.example.com" }],
localStorage?: [{ name: "token", value: "eyJ..." }]
},
httpCredentials?: { username: "u", password: "p" },
tokens?: { bearer?: "eyJ...", cookies?: [], localStorage?: [] },
timeoutMs?: 120000,
profileId?: "prof_abc" // reuse
}
// LoginResult → { ok: true, profileId: "prof_…", strategy: "password" }
Strategies: password · http_basic · token_inject · oauth_tokens · manual (headed OAuth/password window) · reuse_profile
set_session_auth
// SetSessionAuthInput
{
siteUrl: "https://app.example.com/dashboard",
credentialsJson: JSON.stringify({
origin: "https://app.example.com",
cookies: [{ name: "session", value: "abc", domain: "app.example.com", path: "/" }],
localStorage: [{ name: "token", value: "eyJ..." }],
sessionStorage: []
}),
sessionId?: "sess_…", // optional: also inject into a live session
authUrl?: "https://app.example.com/login"
}
// → { ok: true, profileId: "prof_…", strategy: "restricted_auth", sessionId?: "sess_…" }
Use when the user must log in in their own browser. Always (Google OAuth / Sign in with Google, Microsoft, Apple, Discord, Cloudflare Turnstile, Okta/Auth0 social). Accepts Network Cookie-header snippet JSON or Playwright storageState. Always saves a reusable profileId.
start_session
{
startUrl?: "https://app.example.com/dashboard",
headed?: false,
recordVideoPath?: "C:/Videos/clip.webm", // omit = no record; set => demoMode
narrate?: true, // default true when recording; false = silent capture
voice?: "en-US-AndrewNeural",
rate?: "+10%",
profileId?: "prof_abc"
}
// → { sessionId: "sess_…", headed: false, recording: true, demoMode: true, startUrl?: "…" }
query_sessions / query_session
// query_session
{ sessionId: "sess_…" }
// → { url, title, viewport, ariaSnapshot, interactive: [{ role, name, selectorHint }] }
orchestrate_session
{
sessionId: "sess_…",
recordStepsPath?: "C:/Videos/steps.md",
commands: [
{
action: "click", // move|click|tap|type|press|scroll|wait|navigate|select|hover
description: "Open Settings from the sidebar", // also default VO text in demoMode
narration?: "Spoken override",
skipNarration?: false,
startMs: 0, // ignored for pacing while recording
endMs: 1000,
selector: "nav >> text=Settings",
speed: "fast", // fast (default) | slow | timed
fill?: false // demos: false for live typing
}
]
}
// → { commands: [{ index, description, action, startMs, endMs, videoStartMs?, videoEndMs?, ok, reason? }] }
// Recording also writes C:/Videos/clip.cues.json
end_session
{ sessionId: "sess_…" }
// → { ok: true, videoPath?: "C:/Videos/clip.webm" }
compile_demo
{
outputPath: "C:/Videos/final-demo.mp4",
fast?: false, // skip minterpolate for quick check
content: [
{
kind: "slate",
eyebrow: "INTRO",
heading: "Product Demo",
body: "A quick walkthrough",
durationMs: 3000,
narration: [{ startMs: 0, endMs: 2800, text: "Welcome to the demo." }]
},
{
kind: "clip",
videoPath: "C:/Videos/clip.webm" // loads clip.cues.json automatically
}
]
}
// → { ok: true, outputPath: "C:/Videos/final-demo.mp4" }
Prerequisites
- Node 20+
ffmpeg/ffprobeon PATH (Gyan build:winget install Gyan.FFmpeg)python -m pip install edge-tts- Chromium via
npx playwright install chromium(runs onnpm install)
Install
Hey Siri, install https://github.com/Macioa/EasyPlaywrightMCP to cursor
| Client | Doc |
|---|---|
| Cursor IDE | docs/INSTALL-CURSOR.md |
| Cursor CLI | docs/INSTALL-CURSOR-CLI.md |
| Claude Desktop | docs/INSTALL-CLAUDE.md |
| Claude Code CLI | docs/INSTALL-CLAUDE-CLI.md |
npm install
npm run build
npm start # stdio MCP
npm test
npm run typecheck
Auth profiles and scratch files live under %USERPROFILE%\.easy-playwright-mcp\.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.