mcp-playwright

This repository hosts a Model Context Protocol (MCP) server leveraging Playwright for browser automation, enabling LLMs to interact with web pages and execute JavaScript. It supports tasks like screenshot capture

3,251
148

Playwright MCP Server

smithery badge

The Playwright MCP Server empowers Large Language Models (LLMs) with browser automation capabilities using Playwright. It enables LLMs to interact with web pages, capture screenshots, generate test code, scrape web content, and execute JavaScript within a real browser environment.

<a href="https://glama.ai/mcp/servers/yh4lgtwgbe"><img width="380" height="200" src="https://glama.ai/mcp/servers/yh4lgtwgbe/badge" alt="mcp-playwright MCP server" /></a>

Screenshot

Playwright + Claude

Documentation | API reference

Installation

Installation is supported via npm, mcp-get, or Smithery:

Using npm:

npm install -g @executeautomation/playwright-mcp-server

Using mcp-get:

npx @michaellatman/mcp-get@latest install @executeautomation/playwright-mcp-server

Using Smithery

To install Playwright MCP for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @executeautomation/playwright-mcp-server --client claude

Configuration to use Playwright Server

Configuration example for Claude Desktop:

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

Testing

Jest is used for testing, with tests located in the src/__tests__ directory.

Running Tests

Tests can be executed using:

# Run tests using the custom script (with coverage)
node run-tests.cjs

# Run tests using npm scripts
npm test           # Run tests without coverage
npm run test:coverage  # Run tests with coverage
npm run test:custom    # Run tests with custom script (same as node run-tests.cjs)

Coverage reports are generated in the coverage directory.

Star History

Star History Chart

Repository

EX
executeautomation

executeautomation/mcp-playwright

Created

December 3, 2024

Updated

March 28, 2025

Language

TypeScript

Category

Developer Tools