Feedback

Playwright Recorder MCP Server

@ashish-bansal Claim

Basic information

Runtime
TypeScript
Version
1.0.0
License
Not specified
Transports
stdio
Author
ashish-bansal
Submitted by
Community
Quality
35
Stars
29

About Playwright Recorder MCP Server

Streamline browser automation with Playwright MCP. Capture interactions, screenshots, and generate test scripts for efficient Playwright testing.

Playwright Recorder is a MCP server in the Browser Automation category listed in the AddMCP.net directory, published by ashish-bansal. It exposes 5 tools, including init-browser, get-full-dom, get-screenshot, execute-code and more. Supported transport: stdio. Runtime: TypeScript. The repository has 29 GitHub stars. Source code is hosted on github.com. Related topics: browser-automation, community, developer-tools.

Setup

{
    "mcpServers": {
        "playwright-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "playwright-mcp"
            ]
        }
    }
}

Playwright Recorder MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "playwright-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "playwright-mcp"
            ]
        }
    }
}

Playwright Recorder MCP Server tools

  • init-browser — Initialize a browser with a URL
  • get-full-dom — Get the full DOM of the current page. (Deprecated, use get-context instead)
  • get-screenshot — Get a screenshot of the current page
  • execute-code — Execute custom Playwright JS code against the current page
  • get-context — Get the website context which would be used to write the testcase

Overview

What is Playwright Recorder?

This project contains UI and API tests for the Zeigo Network Dashboard using Playwright for end-to-end testing. It provides a structured test suite with Page Object Model files, environment-specific configurations, and both CLI and VS Code integration for running tests.

How to use Playwright Recorder?

Install Node.js v20 or higher, create a .env file with API_BASE_URL and UI_BASE_URL, then run npm install, npx playwright install, and npm install dotenv. Run tests via VS Code Test Explorer or command line using npx playwright test with various options (headed mode, specific browser, debug, environment-specific). Use the Playwright MCP Server by running npx playwright-mcp in a separate terminal.

Key features of Playwright Recorder

  • Cross-browser and cross-platform testing support
  • Multi-language support (TypeScript, JavaScript, Python, .NET, Java)
  • Parallel test execution and built-in debugging tools
  • Page Object Model (POM) structure for maintainable tests
  • Environment-specific test execution (test, preprod)
  • Integration with VS Code Test Explorer and Playwright MCP Server

Use cases of Playwright Recorder

  • Automating UI and API tests for the Zeigo Network Dashboard
  • Running regression tests across multiple browsers (Chrome, Safari)
  • Executing tests in CI/CD pipelines with environment variables
  • Debugging tests with headed mode, debug mode, and Codegen
  • Using MCP Servers to enhance testing with up-to-date documentation

Frequently asked questions

1 What are the prerequisites for running tests?

Node.js v20 or higher and a .env file with API_BASE_URL and UI_BASE_URL.

2 Can the Playwright MCP Server run simultaneously with another MCP server?

No, only one MCP Server can run per terminal session. Run them in separate terminals.

3 What test execution options are available?

Tests can be run via VS Code Test Explorer or command line with options for headed mode, specific browser, debug mode, environment-specific (test/preprod), and test name/filtering.

4 What is the purpose of the Playwright MCP Server?

It enhances Playwright capabilities for UI testing. Run it with npx playwright-mcp.

5 Where are test files located?

UI tests in ui-tests/specs/, API tests in api-tests/specs/, with Page Object Model files in pages/ and utilities in utils/.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬