To set up browser access through the documented Playwright MCP server, install Node.js 20 or newer, use an MCP-compatible client, and add a server entry that runs npx @playwright/mcp@latest. Start with the default headed browser and add flags only when you need headless execution, another browser engine, a separate profile, an existing Chrome session, or an HTTP endpoint.
What you are setting up
Playwright MCP is an MCP server that gives an AI client browser-automation capabilities. It exposes pages through structured accessibility snapshots, so the model can identify controls and act on referenced elements instead of relying only on screenshots or brittle coordinates.
This guide covers the Playwright implementation specifically. Other MCP browser servers may use different packages, flags, transports, or security behavior.
Prerequisites
- Node.js 20 or newer. Check your installed version with
node --version. Upgrade Node before troubleshooting MCP if the command reports an older major version. - An MCP-compatible host. The official setup documentation includes VS Code, Cursor, Claude Code, Claude Desktop, and other clients. Each host decides where its MCP configuration lives and how servers are enabled.
- A browser installation. The server can launch a supported browser or connect to one you start separately, depending on the mode you choose.
Because client configuration locations change, use your host’s current MCP setup instructions for the exact file path or settings screen. The server entry itself is the same JSON in the standard case.
Recommended Free Tools
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Configure the standard Playwright MCP server
- Open your MCP client’s server configuration UI or file.
- Add this entry under the client’s MCP-server collection:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}
- Save the configuration and restart or reload the MCP host if it does not detect the server immediately.
- Ask the assistant to perform a harmless first task, such as opening the Playwright TodoMVC demo and adding a couple of items. Confirm that it can navigate, inspect the accessibility snapshot, and interact with the referenced controls.
The default launch is headed, meaning a visible browser window opens. That is useful while validating navigation and consent dialogs because you can see what the automation is doing.
Choose the browser process and engine
Headless execution
Add --headless to the arguments when a visible window is undesirable, such as in a CI worker or a display-less server:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--headless"]
}
}
}
This changes whether a browser window is shown; it does not change the MCP protocol or turn the server into an HTTP service.
Selecting a browser
Use --browser=firefox (or the corresponding documented value) when you need a particular engine:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--browser=firefox"]
}
}
}
The documented choices include Chrome, Firefox, WebKit, and Microsoft Edge. Choose based on the site or compatibility target you need to exercise; no single engine is universally correct.
Decide how browser state is stored
Persistent profile
A persistent profile keeps browser state such as cookies and login sessions between runs. It is convenient for workflows that repeatedly access the same account, but it also means later tasks can inherit whatever that profile contains. Keep a dedicated automation profile separate from your personal browser when possible.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Isolated sessions
Use the documented --isolated option for a fresh session that does not reuse the normal persistent profile. Isolation is a better default for tests, demonstrations, and tasks that should not see existing credentials or history.
Extension mode and an existing browser
Extension mode attaches to the user’s existing browser context. It can reuse open tabs, authenticated sessions, cookies, and installed extensions, which is useful for SSO or two-factor workflows that are difficult to reproduce in a new profile. It also gives the MCP workflow access to a much more sensitive session. Close unrelated tabs, use a dedicated browser profile, and do not enable this mode for an untrusted agent.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →For a browser already running outside the MCP process, the documentation describes connecting through a browser channel or a Chrome DevTools Protocol (CDP) endpoint. Remote debugging must be enabled for the documented channel flow. This is different from the MCP HTTP endpoint: CDP connects the server to a browser, while HTTP connects an MCP client to the server.
Run Playwright MCP as a separate HTTP server
Some IDE workers, remote clients, and display-less arrangements work better when the MCP server runs independently. Start it on a local port:
npx @playwright/mcp@latest --port 8931
Then configure the client to use this MCP URL:
http://localhost:8931/mcp
Keep the distinction clear: --port 8931 exposes MCP over HTTP, whereas a CDP or WebSocket endpoint identifies a browser connection. If the client is on another machine, check the hostname, firewall, proxy, and heartbeat settings documented by your host and deployment. Binding a service beyond localhost increases the importance of network access controls.
Useful configuration patterns
| Goal | Configuration approach | What changes |
|---|---|---|
| Start a new browser under MCP control | Standard npx entry |
Uses the documented headed default. |
| Run without a window | Add --headless |
Browser display is suppressed; MCP behavior remains the same. |
| Test another engine | Add --browser=firefox or another documented engine |
Playwright launches the selected browser. |
| Prevent reuse of prior state | Add --isolated |
Starts an isolated session rather than reusing the persistent profile. |
| Reuse tabs, login, and extensions | Enable --extension |
Attaches to the existing browser context; treat the session as sensitive. |
| Connect to a separately running browser | Use the documented browser channel or CDP endpoint | Requires the browser’s remote-debugging connection. |
| Let a client connect over HTTP | Run with --port 8931, then use http://localhost:8931/mcp |
Separates server startup from the MCP host process. |
Security boundaries you should understand
Origin lists and the file-access guardrail are convenience defenses intended to catch accidental access. They are not security boundaries, do not control redirects, and can be deliberately worked around. Do not treat them as a sandbox for an untrusted model.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
The documented secrets feature is also described as a convenience, not a security boundary. Use normal secret-management practices: limit credentials, isolate profiles, restrict network access, avoid placing production tokens in prompts, and run the browser with the least privilege the task requires.
Extension mode deserves extra caution because it can expose authenticated pages and extensions from the connected profile. Prefer a throwaway account or dedicated profile when testing an agent’s behavior.
Troubleshooting
node or npx is not found
Cause: Node.js is missing or its executable directory is not on the host’s PATH.
Fix: Install Node.js 20 or newer, open a new terminal or restart the client, and verify both node --version and npx --version.
The client shows no Playwright tools
Cause: The JSON is in the wrong client-specific location, is invalid, or the host has not reloaded its configuration.
Fix: Validate commas and quotes, confirm the key is inside mcpServers, follow the host’s current MCP setup page, then restart or reload the host. Check its MCP logs for the exact startup error.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
The browser never launches
Cause: The selected browser is unavailable, a display is required for headed mode, or a previous process has left a locked profile.
Fix: Try the default browser first, switch temporarily to --headless on a display-less machine, use --isolated to avoid profile locks, and inspect the host’s process and server logs.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →An existing Chrome session cannot be reached
Cause: The browser was not started with the required remote-debugging channel or CDP endpoint, or the endpoint belongs to a different browser process.
Fix: Start a dedicated browser with remote debugging enabled, copy the exact endpoint or channel value into the documented Playwright option, and confirm that local firewall or proxy rules are not blocking it. Use extension mode only when you intentionally want the current profile.
The HTTP client times out
Cause: The client is using the wrong URL, the server is not listening on the expected interface, or a proxy is dropping heartbeat traffic.
Fix: Confirm that the server command is still running, use the exact /mcp path, check the port and hostname, and adjust heartbeat or proxy settings according to the client and deployment documentation.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Interactions target the wrong element
Cause: The page changed after the accessibility snapshot, or duplicate labels make a reference ambiguous.
Fix: Ask the assistant to inspect a fresh snapshot, narrow the task to the visible region or exact label, and wait for the relevant page state before clicking. Avoid coordinate-based assumptions.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Operational guidance for reliable browser access
- Begin headed and isolated while developing; move to headless only after the workflow is observable and stable.
- Use a dedicated profile for persistent login state and rotate or revoke credentials when an agent no longer needs them.
- Keep browser, Node.js, the MCP host, and the
@playwright/mcppackage current, but pin a tested package version in controlled deployments instead of silently accepting every future change from@latest. - Design tasks around accessibility names and roles, then refresh snapshots after navigation, modal dialogs, or major DOM updates.
- For remote HTTP deployments, restrict listener exposure, authenticate at the network layer where appropriate, and account for proxy heartbeat behavior.
Or skip the browser setup: ScreenshotNeo
If your goal is a rendered screenshot or PDF rather than interactive browser control, ScreenshotNeo provides a website screenshot API and MCP server. A single request returns a PNG, JPEG, WebP, or PDF, without managing Playwright, browser profiles, or a display.
Use the documented API options to load lazy images, capture an element by CSS selector, choose dark mode or a device preset, set a viewport and retina scale, run custom CSS or JavaScript, click before capture, wait for a selector, delay, or network idle, hide selectors, block ads or selected resource types, provide cookies and headers, set timezone or geolocation, use a transparent background, resize output, cache with a chosen TTL, create signed image links, submit asynchronous jobs with signed webhooks, capture up to 100 URLs per bulk call, and read usage through the API. Its parameter names also accept the names used by other screenshot APIs, which can simplify migration.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteBefore capture, ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing result. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for the complete option list. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
FAQ
Does Playwright MCP require a paid browser or server?
No separate browser-server hardware or paid browser is specified by the setup. The documented prerequisites are Node.js 20 or newer, an MCP-compatible client, and browser software.
Is HTTP transport required for normal desktop clients?
No. The standard configuration starts the server through npx as a client-managed process. HTTP is an optional independently running arrangement.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchCan I use my personal logged-in browser?
Extension mode can attach to an existing browser context, but doing so may expose its tabs, cookies, authenticated sessions, and extensions. Use a dedicated profile unless that access is intentional.
Are the origin and file guards a full sandbox?
No. The documentation characterizes them, and secret handling, as convenience defenses rather than security boundaries.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

