Playwright MCP (ExecuteAutomation)

by executeautomation

Community Browser Automation 6k likes

ExecuteAutomation's Playwright MCP server drives a real browser for an agent — navigation, clicking, screenshots, JS execution, and generating Playwright test code.

Add to Claude Desktop

npx -y @executeautomation/playwright-mcp-server

Source: https://github.com/executeautomation/mcp-playwright

About

This server puts a full Playwright-driven browser behind MCP tool calls: an agent can navigate to a URL, click and fill elements by selector, hover, drag, upload files, read visible text or HTML off the page, and capture screenshots or export a page as PDF. Browser installation is handled automatically, and viewport/device emulation covers over 143 device profiles, so the same tool calls work whether you're testing a desktop layout or an iPhone viewport.

It also has a code-generation mode: start_codegen_session begins recording the actions an agent takes in the browser, and end_codegen_session turns that recording into an actual Playwright test file. That makes it useful for more than one-off scraping or automation — an agent can explore a page interactively and hand you back a runnable test suite instead of just a transcript of what it did.

Key features

  • Full browser automation: navigate, click, fill, hover, drag, upload files
  • Automatic browser installation, no separate Playwright setup step
  • 143+ device emulation profiles for responsive/viewport testing
  • Screenshot capture and PDF export of the current page
  • JavaScript execution and console log retrieval from the live page
  • Codegen sessions that convert recorded actions into runnable Playwright test files

Use cases

  • Letting an agent scrape or read data off a page that requires JS rendering
  • Automating repetitive browser workflows, like form fills or multi-step checkouts, from natural language
  • Generating a Playwright test file by describing the flow to an agent instead of writing selectors by hand
  • Cross-device visual QA by driving the same flow across multiple emulated devices

Available tools

Playwright_navigate

Opens a URL with configurable viewport and browser settings.

Playwright_screenshot

Captures the page or a specific element as an image.

Playwright_click

Clicks a page element identified by a CSS selector.

Playwright_fill

Types text into a form field.

Playwright_evaluate

Executes arbitrary JavaScript in the browser and returns the result.

start_codegen_session

Begins recording browser actions so they can be exported as a Playwright test file.

Frequently asked questions

Do I need Playwright already installed to use this?

No — the server handles browser installation automatically, so you don't run a separate playwright install step first.

Can it produce an actual test file, not just perform actions?

Yes — start_codegen_session records the actions taken during a session, and end_codegen_session turns that recording into a runnable Playwright test.