smithery.ai

create-playwright-mcp

Sets up Playwright MCP server integration for Claude Code. Use when setting up Playwright, browser automation, web testing, scraping, or adding browser control capabilities.

First seen Apr 12, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read, Write, AskUserQuestion, Glob
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,754 B
  • docs SUMMARY.md 202 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Create Playwright MCP Integration

Purpose

Guide users through setting up a Playwright MCP server to enable Claude Code to interact with browsers for web automation, testing, and scraping.

Instructions

1. Check Prerequisites

Verify Node.js is installed (v18+ required):

node --version

2. Install Playwright Browsers

Playwright requires browser binaries to be installed:

npx playwright install

This installs Chromium, Firefox, and WebKit browsers. For a smaller installation, you can install only specific browsers:

npx playwright install chromium  # Chromium only
npx playwright install firefox   # Firefox only
npx playwright install webkit    # WebKit only

3. Register the MCP Server

Add the official Microsoft Playwright MCP server to Claude Code using npx (no local installation needed):

claude mcp add playwright -s project -- npx @playwright/mcp@latest

4. Display Restart Notice

IMPORTANT: After completing all setup steps, you MUST display this notice to the user:

================================================
  RESTART REQUIRED
================================================
  The Playwright MCP server has been configured.

  Please restart Claude Code for the MCP
  server to be registered and available.

  After restarting:
  1. Run /mcp to verify the server is connected
  2. Test with: "Navigate to google.com and take a screenshot"
================================================

This notice is critical because MCP servers are only loaded when Claude Code starts.

Output Format

Provide step-by-step guidance with commands the user can copy and run. After each step, confirm success before proceeding.

Always end with the restart notice - this is mandatory to ensure users know to restart Claude Code.

Troubleshooting

Browser installation failed:

  • Ensure you have sufficient disk space (browsers require ~500MB each)
  • On Linux, install dependencies: npx playwright install-deps
  • Try installing a single browser: npx playwright install chromium

Node.js issues:

  • Ensure Node.js v18+ is installed
  • Run node --version to verify

MCP not connecting:

  • Restart Claude Code after adding the server
  • Check /mcp shows the playwright server as connected
  • Verify npx can run: npx @playwright/mcp@latest --help

Browser crashes or timeouts:

  • Increase timeout settings if pages are slow to load
  • Use headless mode (default) for better stability
  • Check system resources (memory, CPU)

Best Practices

  • Use headless mode for automated tasks (default behavior)
  • Set appropriate timeouts for page loads and actions
  • Clean up browser sessions after use
  • Test with simple navigation first before complex interactions
  • Consider using specific browsers for compatibility testing

Capabilities

Once set up, the Playwright MCP enables Claude to:

  • Navigate to URLs and interact with web pages
  • Take screenshots and capture page content
  • Fill forms and click buttons
  • Extract text and data from pages
  • Wait for elements and handle dynamic content
  • Execute JavaScript in page context

Example

User: "Set up Playwright MCP for my project"

Response:

  1. Verify Node.js v18+ is installed
  2. Install Playwright browsers via npx playwright install
  3. Register the MCP server with claude mcp add playwright -s project -- npx @playwright/mcp@latest
  4. Display the RESTART REQUIRED notice prominently