Playwright MCP
CommunityRegionGlobal
/About Playwright MCP
Playwright MCP is a Model Context Protocol server from Microsoft that provides browser automation capabilities using Playwright. It enables LLMs to interact with web pages through structured accessibility snapshots, without needing screenshots or vision models, making interactions fast, lightweight and deterministic.
AI-generated listing based on the project's public information. It may contain errors: check the original source.
/How to use Playwright MCP
Navigate to a URL and take an accessibility snapshot of the page
Fill out and submit a login form on a website
Capture a full-page screenshot of a web page
List network requests made by a page and inspect one request in detail
Set a cookie or localStorage item in the browser before testing
/Playwright MCP tools
What your assistant can call once connected.
| Tool | What it does |
|---|---|
| browser click | Perform click on a web page |
| browser close | Close the page |
| browser console messages | Returns all console messages |
| browser drag | Perform drag and drop between two elements |
| browser drop | Drop files or MIME-typed data onto an element, as if dragged from outside the page |
| browser emulate media | Emulate CSS media features for the page, e.g. switch between light and dark color scheme |
| browser evaluate | Evaluate JavaScript expression on page or element |
| browser file upload | Upload one or multiple files |
| browser fill form | Fill multiple form fields |
| browser find | Search the accessibility snapshot of the current page for text or a regular expression |
| browser handle dialog | Handle a dialog |
| browser hover | Hover over element on page |
| browser navigate | Navigate to a URL |
| browser navigate back | Go back to the previous page in the history |
| browser network request | Returns full details (headers and body) of a single network request |
| browser network requests | Returns a numbered list of network requests since loading the page |
| browser press key | Press a key on the keyboard |
| browser resize | Resize the browser window |
| browser run code unsafe | Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript and is RCE-equivalent |
| browser select option | Select an option in a dropdown |
| browser snapshot | Capture accessibility snapshot of the current page, better than screenshot |
| browser take screenshot | Take a screenshot of the current page |
| browser type | Type text into editable element |
| browser wait for | Wait for text to appear or disappear or a specified time to pass |
| browser tabs | List, create, close, or select a browser tab |
| browser get config | Get the final resolved config after merging CLI options, environment variables and config file |
| browser network state set | Set the browser network state to online or offline |
| browser route | Set up a route to mock network requests matching a URL pattern |
| browser route list | List all active network routes |
| browser unroute | Remove network routes matching a pattern (or all routes) |
| browser cookie clear | Clear all cookies |
| browser cookie delete | Delete a specific cookie (optionally only on a given domain/path) |
| browser cookie get | Get a specific cookie by name |
| browser cookie list | List all cookies (optionally filtered by domain/path) |
| browser cookie set | Set a cookie with optional flags (domain, path, expires, httpOnly, secure, sameSite) |
| browser localstorage clear | Clear all localStorage |
| browser localstorage delete | Delete a localStorage item |
| browser localstorage get | Get a localStorage item by key |
| browser localstorage list | List all localStorage key-value pairs |
| browser localstorage set | Set a localStorage item |
| browser sessionstorage clear | Clear all sessionStorage |
| browser sessionstorage delete | Delete a sessionStorage item |
| browser sessionstorage get | Get a sessionStorage item by key |
| browser sessionstorage list | List all sessionStorage key-value pairs |
| browser sessionstorage set | Set a sessionStorage item |
| browser set storage state | Restore storage state (cookies, local storage) from a file |
| browser storage state | Save storage state (cookies, local storage) to a file for later reuse |
| browser annotate | Open the Playwright Dashboard in annotation mode and wait for the user to draw annotations |
| browser hide highlight | Remove a highlight overlay previously added for the element |
/Before you connect Playwright MCP
Do I need a key or an account?
No. It connects without a key.
Which countries does it work in?
Any country.
