Playwright CLI does not directly connect to or consume an MCP server in the documented setup. To give an MCP client browser automation, configure the Playwright MCP server in that client. To use Playwright CLI, run its shell commands or attach it to an existing browser or Playwright server. These are related but separate workflows.
Choose the connection you actually need
“Connect a browser automation CLI to an MCP server” can mean two different things. Playwright has both a shell-command interface called Playwright CLI and an MCP server package called Playwright MCP. The official documentation describes them as different interaction models: an agent can issue CLI commands through a shell, while an MCP client calls structured tools exposed by an MCP server. It does not document Playwright CLI as an MCP client that directly consumes those tools. See the Playwright CLI introduction.
| Your goal | Use this setup | What connects to what |
|---|---|---|
| Let Claude, an IDE, or another MCP host use Playwright browser tools | Register Playwright MCP in that MCP client | The MCP client launches the server over stdio, or connects to a separately running HTTP server |
| Run browser automation as shell commands | Install and use Playwright CLI | Your coding agent or terminal invokes the CLI |
| Have Playwright CLI use a browser or Playwright server that already exists | Use playwright-cli attach |
The CLI attaches to the selected browser, CDP target, Playwright endpoint, or extension |
If the requirement is specifically “make browser tools available to my MCP-enabled assistant,” follow the MCP setup below. If the requirement is “make the CLI control a browser already running elsewhere,” use the attach section instead. Neither should be described as a direct CLI-to-MCP bridge.
Prerequisites for Playwright MCP
- Install Node.js 20 or newer; that is the minimum listed by the Playwright MCP getting-started documentation.
- Use an MCP client that supports adding a server. Its configuration file, UI, and accepted transport settings depend on the client; do not assume every host uses the same location or format.
- Choose whether the MCP host should launch the server itself or connect to a separately running HTTP server.
The package reference uses @latest, so the installed package can change as maintainers publish releases. For current prerequisites and client-specific instructions, consult the Playwright MCP getting-started guide.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#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 Playwright MCP in an MCP client
The standard configuration registers @playwright/mcp as a server that the MCP client launches with npx. Add this JSON to the MCP server configuration format used by your client:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}
- Open your MCP client’s server configuration. Follow that client’s documented path and schema; the JSON above is the common configuration shape, not a universal settings-file location.
- Add the
playwrightserver entry, preserving any other existing server entries. - Save the configuration and use the client’s reload or restart mechanism if it requires one.
- In the MCP client, select or invoke the Playwright tools. The server provides browser automation through structured accessibility snapshots, rather than exposing the CLI’s shell-command interface.
The Playwright documentation also provides client-specific setup examples: VS Code can be configured with code --add-mcp and a JSON payload, while Claude Code can use claude mcp add playwright npx @playwright/mcp@latest. Use the relevant client’s current instructions rather than copying one host’s configuration into another.
Run the MCP server separately over HTTP
A separately running server can be useful when the browser automation process belongs on another host or worker, or when you want to manage the server independently of the MCP client. The Playwright guide shows starting it on port 8931:
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.
npx @playwright/mcp@latest --port 8931
Then configure the MCP client to connect to its MCP endpoint:
{
"mcpServers": {
"playwright": {
"url": "http://localhost:8931/mcp"
}
}
}
Here, localhost means the same machine or network context visible to the MCP client. If the server runs on another host, the client needs a reachable URL for that host, and the network and any authentication must be handled appropriately. The cited Playwright setup example establishes the local endpoint; it does not specify provider-specific remote authentication.
The getting-started documentation says HTTP sessions use a five-second heartbeat timeout and identifies PLAYWRIGHT_MCP_PING_TIMEOUT_MS as the setting to lengthen or disable it. This is implementation detail that can change with the package; check the current guide if a long-lived HTTP session disconnects.
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.
Use Playwright CLI when shell automation is the goal
Playwright CLI is installed globally with:
npm install -g @playwright/cli@latest
Or add it to a project and invoke it with npx, following the CLI installation guide. This installs the command interface; it does not register an MCP server in an MCP host. CLI-oriented agents issue shell commands, whereas MCP-oriented agents call tools through the MCP client. Select the interface that matches how your agent is integrated instead of trying to treat one as the other.
Attach the CLI to an existing browser or Playwright server
Use playwright-cli attach when the CLI should control a target that is already running. The CLI documentation lists several target types and says to select exactly one. These options are not equivalent to registering Playwright MCP in an MCP client.
Recommended Free Tools
| Target | What it means | Documented example or qualifier |
|---|---|---|
| Bound Playwright browser | Attach by the browser’s bound name | Use the target name appropriate to the existing binding |
| Browser through CDP | Connect to a running browser using a CDP channel name or URL | playwright-cli attach --cdp=http://localhost:9222 |
| Playwright server | Connect to an existing Playwright server endpoint | playwright-cli attach --endpoint=ws://localhost:3000 |
| Browser extension | Attach through the extension target | Follow the CLI documentation for the extension setup |
The exact address, credentials, and access requirements for a remote or cloud browser depend on that provider. The Playwright attach documentation names Browserbase as an example of a cloud browser service reachable through CDP, but does not establish the service’s current endpoint or authentication settings. See Playwright CLI attach documentation.
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
Choose browser, visibility, and session behavior
Playwright MCP configuration includes choices that affect what browser state the agent uses. Set them deliberately; a setup that reuses a logged-in profile has different privacy and reproducibility characteristics from one that starts fresh.
- Headed or headless: Playwright MCP documentation describes headed mode as the default. Use
--headlesswhen you need to run without a visible browser window. - Browser: The documented browser choices include Chrome, Firefox, WebKit, and Microsoft Edge. Confirm the current option names and availability in the configuration options.
- Persistent profile: Retains login state and cookies. Choose it when the automation needs an existing session, while protecting that profile as sensitive data.
- Isolated profile: Starts fresh, which is useful when each run should avoid depending on prior cookies or local state.
- Extension profile: Connects to existing tabs, suited to interacting with a browser session already in use.
These configuration modes serve different session needs; the documentation does not establish one as universally preferable. The relevant choice depends on whether the task needs clean repeatability, retained authentication, or access to open tabs.
Troubleshoot the connection
- The MCP client cannot find the server: Check that the entry is in the format and location expected by that particular MCP client. The common
mcpServersJSON shape is not proof that every client uses the same config file. - The server fails to start: Check the Node.js version against the documented minimum of 20, then verify the command and package string. For client-launched stdio, the client must be able to run
npxin its own environment. - The client connects but HTTP tools stop responding: Confirm that it is using the server’s reachable
/mcpURL and that the process remains running. For heartbeat-related session timeouts, reviewPLAYWRIGHT_MCP_PING_TIMEOUT_MSin the current Playwright guide. - CLI attach fails: Confirm that the target process is running, the endpoint is reachable from the CLI environment, and exactly one attach target was selected. For CDP or Playwright server targets, use the endpoint and access requirements provided by the browser/server operator.
- The browser opens visibly when you expected no window: The MCP guide describes headed operation as the default; configure
--headlessfor a headless run. - The page appears logged out or has unexpected cookies: Check whether the selected profile mode is isolated, persistent, or extension-based. Persistent mode retains cookies and login state; isolated mode starts fresh.
- The CLI is being asked to invoke MCP tools: Change the architecture rather than searching for an undocumented bridge: configure Playwright MCP in the MCP host, or have the agent call the CLI through shell commands.
ScreenshotNeo for screenshot capture, not MCP browser control
If the actual job is to produce website screenshots or PDFs rather than interactively control a browser through Playwright, ScreenshotNeo is a separate website screenshot API and MCP server from Yorker Media. It is not a Playwright CLI-to-MCP adapter and should not be substituted when a workflow needs Playwright’s browser interaction. Its API fits one-shot capture, while Playwright MCP and CLI address browser automation.
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.
Or skip the browser setup
For a direct screenshot request, call the ScreenshotNeo API with a URL. The cURL example below saves a WebP screenshot; see the ScreenshotNeo API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Equivalent Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Equivalent Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
- Cookie and consent banners are accepted like a visitor, then 60+ known consent platforms, newsletter popups, and chat widgets are removed before capture; each step can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Response headers identify the page verdict and billing status.
- An MCP server offers
take_screenshot,get_page_info, andcapture_pdftools for Claude, Cursor, and other MCP clients. - The free plan includes 1,000 screenshots per month without a card. Paid plans start at $5 for 3,000 shots; every feature is on every plan.
Sign up for ScreenshotNeo free: 1,000 screenshots a month, no card required.
Frequently Asked Questions
Does Playwright CLI itself speak MCP?
The reviewed Playwright documentation describes CLI shell commands and MCP tools as separate interfaces; it does not document the CLI as a client that consumes MCP tools.
Can Playwright MCP and Playwright CLI be used in the same project?
They are separate integration paths, so a project can choose either or both where its workflows need each interface.
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.

