Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To let a VS Code agent open a website and capture a screenshot, install the Playwright MCP server, approve it as trusted, then ask the agent to visit the page and take a screenshot. You need Node.js 20 or newer. If you only need browser interaction inside VS Code, its built-in browser tools may be enough; they do not require an MCP server.

Before you start

  • Install Node.js 20 or newer.
  • Use a VS Code version with Chat and MCP server support.
  • Review the server publisher and configuration before trusting it. A local MCP server can run code on your machine, so start only servers you trust.

For the documented setup and current VS Code controls, see Microsoft’s Add and manage MCP servers in VS Code guide.

Install Playwright MCP in VS Code

Install it from the Extensions view

  1. Open VS Code’s Extensions view.
  2. Search for @mcp playwright.
  3. Install the Playwright MCP server.
  4. When VS Code asks whether to trust the server, review the details and approve it only if you trust it.
  5. Open Chat and ask the agent to visit a URL and take a screenshot.

For example: Go to code.visualstudio.com, decline the cookie banner, and give me a screenshot of the homepage. VS Code’s agent can call Playwright tools to navigate and capture the page. Depending on your VS Code settings, you may be asked to confirm individual tool invocations.

Alternative: add the server with the VS Code CLI

With Node.js 20 or newer installed, run this command to add the server configuration:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'

The corresponding server entry uses npx to run @playwright/mcp@latest. The package and configuration options are documented in the Playwright MCP guide.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.

Choose where the configuration applies

VS Code supports user-level configuration as well as project configuration. Use a user profile when the server is for your own work across projects. Use workspace configuration when it belongs with a particular project or should be shared with that workspace. VS Code documents workspace .vscode/mcp.json, portable workspace .mcp.json, and user-level options in its MCP configuration guide.

Ask the agent for a visual screenshot

Once Playwright MCP is available in Chat, give the agent a clear destination and request the visual result. For example:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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.
Open https://example.com and take a screenshot of the page.

You can also ask it to capture a specific element, or to interact with the page first. Playwright MCP provides tools for navigating pages and interacting with elements as well as capturing the current page or selected elements. If a banner or dialog changes what you need captured, state how the agent should handle it in the prompt.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Screenshot or accessibility snapshot?

Use a screenshot when you need visual evidence: the rendered layout, colors, images, or how a page appears. Use an accessibility snapshot when the agent needs structured information about page content and controls to decide what to interact with. Playwright MCP exposes browser_take_screenshot for visual capture and browser_snapshot for an accessibility snapshot. Its guidance is to base actions on snapshots rather than screenshots; a screenshot is not a substitute for structured page information.

Choose headed or headless mode

Playwright MCP runs headed by default, so the browser is visible while it works. This is useful when you want to watch navigation or troubleshoot what the page is doing. To run it without displaying a browser window, add --headless to the server arguments:

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.
{
  "name": "playwright",
  "command": "npx",
  "args": ["@playwright/mcp@latest", "--headless"]
}

The Playwright guide documents Chrome, Firefox, WebKit, and Microsoft Edge as browser choices. Consult its current configuration options if you need to select a browser or adjust other launch settings: Playwright MCP setup.

Use VS Code’s built-in browser tools when an MCP server is unnecessary

If your goal is browser interaction rather than adding an external MCP tool provider, check VS Code’s built-in browser tools first. Microsoft says those tools do not require an MCP server. Choose Playwright MCP when you specifically need its external browser tools or want to configure that server as an MCP provider.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security: trust the server and its capabilities

VS Code warns that local MCP servers can run arbitrary code on your machine. Check the publisher and the configuration before approving a server, particularly when a project supplies workspace-level MCP configuration.

Playwright MCP also warns that it is not a security boundary. Its browser_run_code_unsafe facility executes arbitrary JavaScript in the server process and is equivalent to remote code execution. Do not enable it for an untrusted client or workflow. See the Playwright MCP repository for the project’s security guidance.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.

Troubleshoot common setup problems

The server does not start

  • Check Node.js: confirm that Node.js 20 or newer is installed and available to VS Code’s process.
  • Check the command and arguments: the documented setup runs npx with @playwright/mcp@latest. Correct spelling and valid JSON matter when adding a configuration manually.
  • Check server trust and approval: complete VS Code’s trust prompt and any required tool confirmations.

The agent does not take a screenshot

  • Make the request explicit: include the URL and say that you want a screenshot, not just a summary of the page.
  • If VS Code asks to confirm a tool call, approve it if expected and trusted.
  • Ask for a screenshot of the current page or a named element, depending on what you need.

The browser is not visible

Headless mode suppresses the visible browser window. Remove --headless from the server arguments if you want to watch the browser; headed mode is the default.

The result is structured text rather than an image

You may be seeing an accessibility snapshot, which describes page structure for navigation and interaction. Ask for a screenshot explicitly when you need visual evidence.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. Its screenshot API can return an image or PDF without you configuring a local browser. See the ScreenshotNeo documentation for request options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server includes take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for the free plan.

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.