# mcp-playwright

> MCP Server

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

## Overview

- **Category:** Developer Tools
- **Language:** TypeScript
- **Stars:** 5633
- **Forks:** 148
- **Owner:** executeautomation
- **GitHub:** https://github.com/executeautomation/mcp-playwright
- **Homepage:** https://executeautomation.github.io/mcp-playwright/
- **Created:** 2024-12-03T18:43:20+00:00
- **Updated:** 2025-03-28T23:18:41+00:00
- **Source:** https://model-context-protocol.com/servers/playwright-browser-automation-model-context-protocol

## Setup

## Setup

You can install the package using either npm, mcp-get, or Smithery:

Using npm:
```bash
npm install -g @executeautomation/playwright-mcp-server
```

Using mcp-get:
```bash
npx @michaellatman/mcp-get@latest install @executeautomation/playwright-mcp-server
```
Using Smithery

To install Playwright MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@executeautomation/playwright-mcp-server):

```bash
npx -y @smithery/cli install @executeautomation/playwright-mcp-server --client claude
```
Here's the Claude Desktop configuration to use the Playwright server:

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

## Tools

## Available Tools

		1. Browser automation capabilities (enables LLMs to interact with web pages).
		2. Take screenshots (capture visual representations of web pages).
		3. Generate test code (create automated tests for web applications).
		4. Web scraps the page (extract data from web pages).
		5. Execute JavaScript (run JavaScript code in a real browser environment).
