Get the FREE Ultimate OpenClaw Setup Guide →

MCP -Playwright

MCP server for browser automation using Playwright

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio vikashloomba-mcp-server-playwright npx -y @automatalabs/mcp-server-playwright

How to use

MCP Server Playwright exposes browser automation capabilities via the Model Context Protocol, enabling LLMs to drive a real browser session. It supports navigating to web pages, taking full or partial screenshots, interacting with page elements (clicks, hovers, form fills, and selections), extracting text, and running JavaScript within the browser context. Tools such as browser_navigate, browser_screenshot, browser_click, browser_fill, and browser_evaluate give you a robust set of primitives for web automation, while console logs and screenshot resources provide visibility into runtime behavior. This makes it suitable for tasks like web data extraction, automated testing, or guided interactions with dynamic web content directly from a language model.

How to install

Prerequisites:

  • Node.js and npm installed and available in PATH
  • Basic familiarity with running terminal/command prompts

Installation steps:

  1. Install via npx (recommended for quick setup):
npx -y @automatalabs/mcp-server-playwright
  1. If you want to install and run as part of Claude/Cursor setup (as shown in the README), you can add the MCP server to your Claude configuration automatically using Smithery or similar tooling as described in the project documentation. The following example demonstrates a typical local setup with npx:
npx @automatalabs/mcp-server-playwright install
  1. Verify installation by starting the MCP server (the exact start command may vary depending on your environment). The server exposes a set of tools under the mcpServers.playwright namespace when integrated with your MCP client.

Note: The project README demonstrates configuring the server in Claude’s config as:

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

Additional notes

Tips:

  • Ensure Node.js and npm/npx are accessible in your shell PATH to allow npx-based startup.
  • The provided Tools (browser_navigate, browser_screenshot, browser_click, browser_hover, browser_fill, browser_select, browser_evaluate) cover typical end-to-end interactions with a web page and can be combined for complex automation tasks.
  • For Cursor integration, you may need to install Playwright browsers with: npx playwright install
  • If you plan to run multiple automation tasks, consider configuring resource limits and timeouts in your hosting environment to prevent runaway sessions.

Environment variables and config options:

  • There are no required environment variables shown in the README beyond Node.js tooling; advanced users may add environment-specific overrides in their orchestration layer if needed. Ensure your tooling can access the Playwright runtime and any required browser binaries.

Related MCP Servers

Sponsor this space

Reach thousands of developers