October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Capture Website Screenshots from VS Code with Playwright MCP

Set up Playwright MCP in VS Code so an AI agent can navigate to a website and capture a screenshot, with guidance on configuration, browser modes, and security.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To capture a website screenshot from VS Code, install the Playwright MCP server, approve its configuration, then ask the VS Code agent to open the page and take a screenshot. You need Node.js 20 or newer. If you only need browser interaction—not an external MCP tool provider—VS Code also has built-in browser tools that require no MCP server. Microsoft’s VS Code guide covers both options.

Install Playwright MCP in VS Code

Playwright MCP gives an AI agent browser tools to navigate a page, interact with it, and capture a screenshot. The documented setup runs the Playwright MCP package through npx; it requires Node.js 20 or newer and an MCP client such as VS Code. See the Playwright MCP guide for current setup details.

As an Amazon Associate I earn from qualifying purchases.

  1. In VS Code, open the Extensions view and search for @mcp playwright.
  2. Install the Playwright MCP server. Review its publisher and configuration before proceeding.
  3. When VS Code asks whether you trust the server, approve it only if you trust the software and configuration.
  4. Open Chat and ask the agent to visit a URL and take a screenshot. VS Code may ask you to confirm individual tool calls.

VS Code’s CLI can also register the server. Run this command in a terminal where the code command is available:

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.
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'

The equivalent server entry uses command npx and argument @playwright/mcp@latest. Installing through the Extensions view or adding the entry through the CLI are two routes to configure the server; you do not need to use both.

#1 Best Overall
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Ask the agent to capture a page

Once the server is available in Chat, give the agent a specific URL and state that you want a visual capture. For example:

Go to https://code.visualstudio.com, decline the cookie banner, and give me a screenshot of the homepage.

Or use the shorter Playwright quick-reference prompt: Take a screenshot of the page. The agent can navigate to the requested page and use Playwright’s screenshot tool. Depending on the task and VS Code’s confirmation settings, you may need to approve tool invocations.

Rank #2
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
  • DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
  • CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
  • PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
  • BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.

Screenshot or accessibility snapshot?

A screenshot is a visual record of the rendered page. An accessibility snapshot is structured information about the page that helps the agent identify content and interact with elements. Playwright MCP documents browser_snapshot as an accessibility snapshot and browser_take_screenshot as the screenshot tool. Ask for a screenshot when you need visual evidence; the agent should use page structure to guide interactions rather than relying on an image alone. See the Playwright MCP repository for the tool descriptions.

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

Choose where the MCP configuration lives

VS Code supports user-level and workspace-level MCP configuration. Use a user profile when the server is for your own general use; choose workspace configuration when the setup belongs with a project. VS Code documents workspace configuration in .vscode/mcp.json and portable workspace configuration in .mcp.json, alongside user-level options. Pick one scope that suits the project rather than scattering duplicate entries across scopes. Refer to VS Code’s MCP server documentation for the current configuration options.

Rank #3
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Choose headed or headless browsing

Playwright MCP runs headed by default, so a browser window is visible. Add --headless to the server arguments if you want the browser to run without a visible window. The documented browser choices include Chrome, Firefox, WebKit, and Microsoft Edge. Use the default headed mode when you want to watch what the agent is doing; use headless mode when visibility is not needed. Exact command-line options and browser selection are described in the Playwright MCP guide.

Built-in browser tools or Playwright MCP?

Choose based on whether you need an MCP server, not on screenshot quality: VS Code says its built-in browser tools can handle browser interaction without an MCP server. Playwright MCP is the documented option when you want to add Playwright’s browser tools as an MCP provider for the agent. As VS Code puts it, “If your goal is browser interaction rather than learning MCP setup, check the built-in browser tools first.”

Rank #4
Sale
Samsung Galaxy S26 Ultra, Unlocked Android Smartphone, 512GB, Black
  • PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
  • TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist² with Galaxy AI.³ Add objects, restore details, or apply new styles by simply typing or tapping
  • NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
  • MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
  • HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Security and practical troubleshooting

VS Code asks whether you trust the server

This is a trust decision, not a prompt to approve automatically. VS Code warns that local MCP servers can run arbitrary code on your machine. Review the publisher and the server configuration; start it only if you trust them. See the security guidance in the VS Code documentation.

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

The server does not start

  • Check Node.js: the Playwright MCP setup requires Node.js 20 or newer. Confirm the version available to the environment launching VS Code and npx.
  • Check the server entry: confirm the command is npx and the argument is @playwright/mcp@latest, with valid JSON if you entered the configuration manually.
  • Check configuration scope: make sure you added the server to the user profile or workspace you are actually using.

The agent does not capture the screenshot

  • Confirm the Playwright server is installed and available to the active VS Code Chat session.
  • Ask for a concrete action, such as “Open https://example.com and take a screenshot.” Approve any tool confirmation VS Code presents if you intend to allow that action.
  • If the browser is running headless, no visible window will appear; that does not by itself mean the capture failed.

Do not enable unsafe code execution casually

The Playwright MCP guide warns that browser_run_code_unsafe executes arbitrary JavaScript in the server process and is equivalent to remote code execution. Enable it only for MCP clients you trust. The Playwright MCP project also states that the server is not a security boundary. Treat the browser and pages it visits as potentially untrusted, and do not use the server as a substitute for isolating risky activity. See the guide and project repository.

Best Value
Tracfone Moto g Play 2024 Prepaid Phone with a 1-Yr Plan Included
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
  • ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
  • CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
  • PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
  • 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US

Or skip the browser setup

If you just need a screenshot returned from an API, ScreenshotNeo can capture a URL with one GET request. Its cookie/consent handling removes known consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers say which page verdict applied and whether the shot was billed. ScreenshotNeo also offers an MCP server for AI agents, including Claude, Cursor, and other MCP clients.

cURL example (replace the URL with the page you want):

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

For the available request options and response details, see the ScreenshotNeo API documentation. ScreenshotNeo’s free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

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

Frequently Asked Questions

Can I use Playwright MCP with a browser other than Chrome?

Yes. The documented browser choices include Chrome, Firefox, WebKit, and Microsoft Edge.

Does taking a screenshot replace the accessibility snapshot?

No. The screenshot is visual output; an accessibility snapshot is structured page information used to understand and interact with page elements.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.