Playwright MCP Quickstart
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Playwright MCP QuickstartGo to saucedemo.com and add the backpack to cart."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Playwright MCP Quickstart Template ๐ค๐ญ
Welcome to the Quickstart Template for running Playwright with the Model Context Protocol (MCP). This repo contains everything you need to let AI agents (like Claude Desktop or Cursor) control a local browser using Playwright's accessibility tree.
As seen on JKC Tutorials.
๐ Prerequisites
Node.js 20 or newer installed on your machine.
An MCP client installed (e.g., Claude Desktop or Cursor).
Related MCP server: Playwright MCP
โ๏ธ Installation
Clone this repository.
Install the dependencies:
npm installInstall the required Playwright browsers:
npm run setup
๐ Connecting to Claude Desktop
To give Claude Desktop control over Playwright, you must update Claude's configuration file.
Open the Claude Desktop configuration file:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Copy the contents of the
claude_desktop_config.jsonfile provided in this repository and paste it into Claude's config file.Restart Claude Desktop.
Note: You do not need to run npm run start-mcp manually if you configure Claude Desktop this way; Claude will spin up the server automatically when needed.
๐งช Running Your First AI Test
Once Claude Desktop is restarted, open a new chat in Claude and copy/paste this exact prompt:
"Use Playwright MCP to navigate to https://www.saucedemo.com/. Log in using the username 'standard_user' and password 'secret_sauce'. Add the backpack to the cart, navigate to the cart, and verify that the backpack is present."
Watch as Claude opens a headed browser, reads the accessibility tree, and executes the entire flow without a single line of traditional test code!
Want more tutorials on AI and Test Automation? Subscribe to JKC Tutorials on YouTube.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to iโฆ
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables browser automation and web page interaction through Playwright's accessibility tree, allowing LLMs to navigate, fill forms, click elements, and extract content without requiring vision models or screenshots.4,633,135 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables browser automation and web page interaction using Playwright's accessibility tree for fast, deterministic actions without screenshots or vision models.4,633,135 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables browser automation and web page interaction using Playwright's accessibility tree for fast, structured automation without requiring vision models or screenshots.4,633,135 npmApache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to control a web browser using Playwright, supporting navigation, interaction, and data extraction through natural language.MIT