Playwright logo Guide · Testing & code quality

How to run Playwright browser tests with Claude Code

Playwright scores 4/5 on our Claude Code fit scale: official Anthropic-marketplace plugin with MCP server (no bundled skills). These steps use only Playwright’s and Anthropic’s official instructions; each step links its source.

  1. 1

    Have Claude Code and a Playwright account ready

    You need Claude Code installed and an account with Playwright (playwright.dev). Some tools only need the account when the agent first calls a live tool.

    Source: https://code.claude.com/docs/en/mcp

  2. 2

    Install the official Playwright plugin

    Run this in Claude Code (or your terminal, as the source shows):

    /plugin install playwright@claude-plugins-official

    Source: https://code.claude.com/docs/en/discover-plugins

  3. 3

    No marketplace setup needed

    This plugin is in Anthropic’s official marketplace (claude-plugins-official), which Claude Code adds automatically the first time you start an interactive session.

    Source: https://code.claude.com/docs/en/plugins/anthropic-marketplaces

  4. 4

    Connect and verify

    Run /mcp inside a Claude Code session to see connected servers, check status and complete sign-in where the server uses OAuth.

    Source: https://code.claude.com/docs/en/mcp

Then just ask

Example prompt (our suggestion, not from vendor docs):

“Help me run Playwright browser tests in this project. Follow the Playwright docs, keep secrets in environment variables, and show me the plan before changing files.”

Comparisons

More guides