🌐

Playwright

Reliable browser automation for screenshots, flows, and scraping.

Category: Automation
Difficulty: Advanced

Quick Configuration

Choose the setup that matches your environment.

Before You Start

  • Confirm you have the account, endpoint, or API key required for Playwright.
  • Start with minimum scopes and read-only access where possible.
  • Keep secrets in environment variables instead of hardcoding them in JSON.

Hosted / Remote

JSON
Hosted Config json
{
  "playwright": {
    "url": "https://YOUR_PLAYWRIGHT_MCP_ENDPOINT"
  }
}

Local CLI (npx)

JSON
Local Config json
{
  "playwright": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://YOUR_PLAYWRIGHT_MCP_ENDPOINT"],
    "env": {
      "PLAYWRIGHT_API_KEY": "YOUR_PLAYWRIGHT_API_KEY"
    }
  }
}

Common Pitfalls & Fixes

  • âš ī¸ Watch out: Headless browser dependencies and handling logins/consent screens safely.
  • 🔑 Always store API keys in environment variables, never hardcode them in JSON.
  • đŸ›Ąī¸ Start with read-only scopes if available to verify connection safely.

Example Prompts

Once connected, try these prompts to test capabilities:

  • Open https://example.com, take a full-page screenshot, and extract the main headline.
  • Navigate to a test form page, fill inputs, submit, and confirm success text.
  • Click through a multi-step flow and summarize what changed on each step.

Verification Checklist

  • Run 1-2 real prompts to confirm Playwright returns usable data.
  • Check that error messages are clear enough for troubleshooting.
  • Document the required scopes, dependencies, and env vars for future reuse.