Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Playwright MCP

$ playwright-mcp Official Med Risk
Microsoft · Agent Bridges & Meta · Apache-2.0 · macos / linux / windows

Microsoft's official Playwright MCP server enables LLMs to interact with web pages using structured accessibility snapshots instead of pixel-only screenshots. Supports --headless, --browser, --port for HTTP/SSE hosting, --isolated, --config, and --secrets env files.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g @playwright/mcp
CLI vs MCP Decision MCP Preferred

playwright-mcp exposes structured accessibility snapshots and stateful page interactions as MCP tools; for deterministic script/CLI runs, pair with playwright-cli.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Deterministic accessibility-tree snapshots avoid vision-model fragility, with --headless, --isolated, and --port transport controls.

  • Structured accessibility snapshot MCP tools + --headless / --port / --config flags
Trust & Safety 20 / 25

Supports --isolated ephemeral profiles, --allowed-origins/--blocked-origins, and --secrets, though full browser navigation can mutate remote web apps.

  • --isolated memory-only profiles and --secrets credential scoping
Setup & Portability 14 / 15

Cross-platform via npx @playwright/mcp@latest on macOS, Linux, and Windows (downloads browser binaries on first use if absent).

  • Published on npm (@playwright/mcp) with Docker image support
Utility & Efficiency 14 / 15

Accessibility snapshots consume far fewer tokens and click more accurately than screenshot-only computer use.

  • Accessibility-tree DOM refs eliminate coordinate guessing
Maintenance & Lineage 10 / 10

First-party Microsoft Playwright team repository (microsoft/playwright-mcp) under Apache-2.0.

  • Official Microsoft repository under Apache-2.0
Docs & Verifiability 9 / 10

Detailed README covering CLI flags, JSON config schema, Docker, and extension/isolated modes.

  • Comprehensive CLI and config reference in GitHub README

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Uses ephemeral browser profiles (--isolated), persistent user data dirs, or secret key-value files via --secrets <path>.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Free and Apache-2.0 open-source.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Playwright MCP Agent Rules
- Prefer `--headless --isolated` in automated runs so personal browser sessions and cookies stay untouched.
- Pass credentials via `--secrets <file>` instead of hardcoding values into prompt text.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect Playwright MCP CLI flags
npx -y @playwright/mcp@latest --help

Lists browser, viewport, transport (--port), --headless, and --isolated flags without launching Chromium.

Controlled Writes & Previews

Launch headless isolated Playwright MCP on HTTP
npx -y @playwright/mcp@latest --headless --isolated --port 8931

Starts an isolated headless browser MCP server listening on localhost port 8931 without reusing personal cookies.

Strengths for Agents

  • + Accessibility-tree snapshots make web interaction deterministic and token-efficient.
  • + --isolated and --secrets protect local browser state and credentials cleanly.
  • + Official Microsoft Playwright maintenance with --port HTTP/SSE hosting support.

Caveats & Pitfalls

  • ! Long-lived MCP server process requires --port or an MCP host; it is not a one-shot page-query CLI.
  • ! Large DOM accessibility snapshots can still consume significant context on heavy web apps.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI