Twinkle HubTwinkle Hub
Sign in

📌 2026-05-12 added: Legislature dataset live (8 datasets · 284,257+ rows)

View full changelog →

Playwright MCP

Playwright

Microsoft's official MCP — LLM controls your local Chromium / Firefox / WebKit through the accessibility tree. More accurate than vision-on-screenshot. The go-to for form-filling, e2e flows, and web scraping.

No token5-min install

Why client-side

Browsers are stateful (cookies, login sessions, tab history). A hub-shared instance would let users see each other's logged-in state — non-starter. The only safe path is local install where your Claude Desktop drives the browser directly via stdio.

Prerequisites

  • Node.js ≥ 18 (recommend nvm)
  • MCP-capable client: Claude Desktop / Cursor / Continue / Cline / etc.
  • macOS / Linux / Windows all supported

Install

Claude Desktop (macOS)

~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}

Cursor

{
  "name": "playwright",
  "command": "npx -y @playwright/mcp@latest"
}

Full install doc (GitHub)

First run

Try this prompt

Open example.com and take a full-page screenshot

Common tools

  • browser_navigate(url) load a page
  • browser_snapshot() accessibility-tree dump of the current page (replaces screenshot for most tasks)
  • browser_click(ref) click an element
  • browser_type(ref, text) type into an input
  • browser_take_screenshot() actual screenshot (for vision models)

Troubleshooting

SymptomFix
npx hangs on first runPlaywright downloads ~300 MB of browsers on first install. Wait.
macOS: 'unverified developer'System Settings → Privacy & Security → Allow
Tools don't show upFully quit Claude Desktop (cmd+Q) and reopen. Validate the JSON.
Want persistent login sessionsAdd --user-data-dir /Users/yourname/.playwright-profile to args