playwright-mcp

Integrations

  • Provides keyboard shortcuts support for macOS users to access the Cursor AI window with Cmd + I.

  • Utilized as a runtime for running the playwright-mcp server, which enables browser automation and DOM interaction.

How to Use playwright-mcp?

Introduction

playwright-mcp (Model Context Protocol) is a powerful tool that bridges the gap between AI assistants and browser automation. It enables AI models to interact with web browsers, inspect DOM elements, record user interactions, and generate Playwright test scripts with higher accuracy. This guide will walk you through setting up and using playwright-mcp effectively.

Tools

Available tools in the browser interface:

Browser Toolbox

  1. Pick DOM (🎯): Click to select and capture HTML elements from the page. Use this to record selectors for your test cases.
  2. Pick Image (📸): Capture screenshots of specific elements. Useful for visual testing or documentation.
  3. Record Interactions (📋): Record browser interactions such as clicks, inputs, and navigations. These interactions automatically generate selectors and can be passed as context to MCP clients like Claude or Cursor to help write test cases.

MCP Commands

  1. init-browser: Initialise the playwright browser.
  2. get-context: Get the website context, which would be used to write the test case
  3. execute-code: Execute custom Playwright JS code against the current page
  4. get-screenshot: Get a screenshot of the current page
  5. get-full-dom: Get the full DOM of the current page. (Prefer using get-context instead)

Learn More

Want to dive deeper? Check out the full documentation:

📖 View Documentation

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Playwright MCP server enables AI-driven Playwright test generation by allowing interaction with web pages and element inspection. Integrated with IDEs like Cursor, it provides real-time context to enhance test accuracy and efficiency.

  1. Introduction
    1. Tools
      1. Browser Toolbox
      2. MCP Commands
    2. Learn More

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        A MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.
        Last updated 2 months ago
        Python
        Apache 2.0
        • Apple
      • -
        security
        A
        license
        -
        quality
        A browser automation server providing Playwright capabilities for controlling web browsers, capturing screenshots, extracting content, and performing complex interactions through an MCP interface.
        Last updated a month ago
        Python
        Apache 2.0
        • Apple
      • -
        security
        F
        license
        -
        quality
        A MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.
        Last updated a month ago
        5
        TypeScript
      • -
        security
        F
        license
        -
        quality
        A service that provides Playwright browser automation functionality through Model Context Protocol (MCP), allowing clients to use Playwright features via SSE connections.
        Last updated 22 days ago
        2

      View all related MCP servers

      ID: nhpi6f4asd