Back to MCP Servers
🔌

microsoft/playwright-mcp

Apache-2.0API key required

Official Microsoft Playwright MCP server, enabling LLMs to interact with web pages through structured accessibility snapshots

TypeScriptBrowser

Install

npx -y @playwright/mcp@latest

Required environment variables

PLAYWRIGHT_MCP_SECRETSet in your MCP config

claude_desktop_config.json

claude_desktop_config.json
{
  "mcpServers": {
    "microsoft-playwright-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@playwright/mcp@latest"
      ],
      "env": {
        "PLAYWRIGHT_MCP_SECRET": "<YOUR_PLAYWRIGHT_MCP_SECRET>"
      }
    }
  }
}

Add this to your Claude Desktop config file. Find it at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS.

What this does

microsoft/playwright-mcp exposes a set of tools to Claude over the Model Context Protocol. After you add it to claude_desktop_config.json (snippet above) and restart Claude Desktop, those tools become callable inside any conversation. That makes it useful when you want Claude to reach into live web pages and browser sessions without copy-pasting context every turn.

Requirements

This server needs the following environment variables to be set before it can run:

PLAYWRIGHT_MCP_SECRET

Set these via the env object in your MCP config (see claude_desktop_config.json snippet above).

Common use cases

  • Navigate, fill forms, and scrape pages on demand from Claude
  • Test UI flows or capture screenshots as part of a debugging session
  • Reach data behind logins or interactive pages that simple HTTP fetch cannot