$ timeahead.in
/ servers/npm/playwright-mcp
npm

playwright-mcp

Playwright integration for ModelContext

31 stars12k/wkupdated 242d agogithub ↗
79fair
▣ Overview
npm versionDocs

What it does

playwright-mcp spins up a Playwright-controlled browser and exposes it as an MCP server, giving Claude and Cursor live access to page state. It provides tools to capture screenshots, extract the DOM, record interactions, and execute JavaScript. This lets an AI assistant write Playwright tests with real visual and structural context instead of guessing selectors.

Who it's for

QA engineers, frontend developers, and test automation specialists who use Claude or Cursor to generate Playwright tests and want the AI to see the actual page DOM and visual state instead of working blind.

Common use cases

  • Generate Playwright test cases based on live page screenshots and DOM inspection
  • Extract reliable selectors from the live DOM instead of asking the AI to guess them
  • Record user interactions and convert them into reproducible test scripts
  • Debug test failures by capturing page state and running JavaScript validators in-context

Setup pitfalls

  • Requires Node.js and Playwright (with Chromium) pre-installed—the server doesn't manage these dependencies
  • IDE integration varies: Cursor uses npx -y playwright-mcp; Claude Desktop requires manual config file edits at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
  • Browser startup is on-demand and requires explicit approval in your AI tool—you must call init-browser before using page interaction tools
  • Last commit was 211 days ago; may have compatibility issues with recent Playwright or Node.js versions
▣ Score BreakdownMCPScore = Σ(raw × weight)
DimensionRawWeighted
Security
35%
100
35.0
Freshness
25%
65
16.3
Adoption
20%
64
12.8
Quality
10%
100
10.0
Trust
10%
50
5.0
Total
79.0
⚿ Capabilities & Risk Explainer
fs readnetworksecrets
◆ Risk level: medium· 5 tools · auth: API key
fs read + network + secrets — requires access to credentials or environment secrets.
Tool nameDescriptionDestructive?
init-browser✓ no
get-full-dom✓ no
get-screenshot✓ no
execute-code⚠ yes
get-context✓ no
⚙ Install config
Claude Desktop · Cursor · Windsurf · VS Code (Copilot) · Claude Code
add to your MCP client config:
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "-y",
        "playwright-mcp"
      ]
    }
  }
}
📈 Score historylast 33 snapshots
5/25/20267/6/2026 · 33 snapshots
⚙ Maintenance health
maintenance data not yet available — check back later.
⛁ Raw data
weekly downloads12k
github stars31
forks5
open issues5
license✓ present
readme length5893 chars
last publish38d ago
last commit242d ago
last updated7d ago
install verified✗ fail · 9d ago
owner of this server? claim your listing to get a verified badgeclaim →
🔔 Score drop alerts
get notified by email when this server's score drops 5+ points