playwright-mcp-server

playwright-mcp-server

6

The Playwright MCP Server is a tool designed to fetch and manipulate web page content using the Model Context Protocol (MCP). Its key features include content retrieval, interactive element detection, and simulated mouse operations, making it suitable for web automation tasks.

Playwright MCP Server

This project is a server offering Playwright web page content retrieval functionality using the Model Context Protocol (MCP).

Features

  • Page navigation
  • Full and visible page content retrieval
  • Interactive elements detection
  • Mouse operation simulation
  • Echo functionality for testing

Installation

Via Smithery

Install automatically via Smithery for Claude Desktop.

Manual Installation

Use npm for manual installation.

Usage

Starting the Server

Use npm scripts to build and start the server.

MCP Tools

  • Navigate to a specified URL
  • Retrieve all or visible content on a page
  • Detect positions of interactive elements
  • Simulate mouse movements and clicks
  • Perform drag and drop operations
  • Echo tool for testing

Development

Run tests and generate coverage reports using npm scripts. Test structure includes function tests for tools and MCP server functions.

Important Notes

Ensure environment variables are set, follow website terms of service, and maintain appropriate intervals between requests.