DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk4 min

How to Screenshot a Website with Playwright MCP at a Custom Viewport Size

Configure Playwright MCP with a custom viewport, then capture a website’s viewport, full page, or selected element with the format and scale you need.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set the Playwright MCP server’s --viewport-size=WIDTHxHEIGHT option, then use browser_take_screenshot to capture the current viewport, a full page, or a targeted element. For example, --viewport-size=1280x720 sets the browser’s visible page area to 1280 by 720 CSS pixels; it does not set the height of a full-page screenshot.

Set a custom viewport in Playwright MCP

Pass the viewport dimensions to the MCP server with --viewport-size. Replace the example dimensions with the width and height you need:

As an Amazon Associate I earn from qualifying purchases.

--viewport-size=1280x720

The equivalent environment variable is PLAYWRIGHT_MCP_VIEWPORT_SIZE. The viewport controls the browser’s visible page area. If you need a screenshot that includes content below the fold, choose full-page capture separately.

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

Choose where to configure it

  • Server argument: Add --viewport-size=1280x720 to the arguments used to start Playwright MCP.
  • Environment: Set PLAYWRIGHT_MCP_VIEWPORT_SIZE to the desired dimensions.
  • Configuration options: See Playwright MCP configuration options for the documented setting and related options.

If the option is set in more than one place, the precedence is configuration file first, then environment variables, then command-line arguments. The command-line value wins when all three are present.

#1 Best Overall
Sale
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • 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.

Connect the MCP client and open the page

Playwright MCP can be launched by your MCP client using its server configuration, or run separately with HTTP transport so the client connects to its MCP endpoint. Use the arrangement supported by your client; the official Playwright MCP getting-started guide documents both approaches.

  1. Configure the Playwright MCP server with your chosen viewport setting.
  2. Connect your MCP client to the server.
  3. Navigate to the URL you want to inspect using the browser navigation capability.
  4. Call browser_take_screenshot after the page is ready to capture.

Playwright MCP runs headed by default. Add --headless if you want to disable headed mode. Documented browser choices include Chrome (the default), Firefox, WebKit, and Microsoft Edge. A custom viewport by itself does not configure a complete device profile; device emulation is a separate option.

Choose what the screenshot includes

The screenshot tool supports three useful capture scopes. The exact selection depends on whether you are reviewing the visible layout, documenting an entire page, or isolating one component.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to | Prepaid Smartphone- 6.6" 120Hz Display, 5G , 50MP Quad Pixel Camera, Long-Lasting Battery
  • 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.
Scope Use it for How to select it
Current viewport Reviewing what is visible at the configured browser dimensions. Call browser_take_screenshot without full-page or element-target options.
Full page Capturing scrollable content below the fold. Set fullPage: true.
Element Capturing a specific component, such as a login form. Set target to an element reference or a unique selector.

Full-page capture and an element target cannot be combined in the same screenshot call. For tool parameters and examples, see Playwright MCP screenshots.

Choose image format and pixel scale

Format

PNG, JPEG, and WebP are supported. The tool infers the format from the output filename extension. If neither an explicit type nor a filename extension determines the format, PNG is used.

Scale

Use scale: "css" for CSS-pixel sizing; this is the default. Use scale: "device" to produce an image at the device-pixel ratio. These options affect output pixel scaling, not whether the capture includes the whole page. The screenshot documentation lists the available format and scale options.

Rank #3
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • 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.

Use screenshots for visual checks, not page structure

A screenshot is useful for checking visual layout or documenting a visual bug. If you need to read page structure or text, use the accessibility snapshot instead. It is also the better route for finding element references to use in interactions and targeted captures.

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

Troubleshooting

The screenshot has the wrong dimensions

Check that the dimensions are in WIDTHxHEIGHT form and that you changed the setting actually used to launch the server. If several locations define the viewport, remember that command-line arguments override environment variables, which override configuration-file values.

The screenshot stops at the bottom of the visible area

A custom viewport sets the visible browser area, not full-page capture. Call browser_take_screenshot with fullPage: true when you need scrollable content below the fold.

Rank #4
Sale
Samsung Galaxy S26 Ultra, Unlocked Android Smartphone, 512GB, Black | Privacy Display, Galaxy AI, AI Camera, Super Fast Charging 3.0, Durable Battery, 2026, US 1 Year Warranty
  • 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

The tool will not capture a full page and a component together

Those scopes cannot be combined in one call. Choose full-page capture or set target to the element reference or unique selector you want.

The output format is unexpected

Check the output filename extension or set the type explicitly. When neither determines the format, the documented default is PNG.

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

The screenshot is hard to inspect for text or controls

Use an accessibility snapshot to read structure and text or to locate element references. Return to a screenshot for visual review.

Best Value
Tracfone Moto g Play 2024 Prepaid Phone with a 1-Yr Plan Included | Prepaid Smartphone with Full YR Plan Included bundled with 1500 Min/Text/Data for365 days of service - Locked to Tracfone
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use arbitrary Playwright code only with trusted clients

The Playwright MCP getting-started documentation warns: “This tool runs arbitrary JavaScript in the Playwright server process and is RCE-equivalent — only enable for trusted MCP clients.” Apply that warning when considering the optional ability to run Playwright code through the server.

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server. Its single GET endpoint can return an image or PDF; here is a cURL example saving a WebP screenshot:

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 API documentation for request options. ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and other MCP clients.

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

The Free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo to start with 1,000 free screenshots a month, no card required.

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.