How to Use Playwright MCP to Screenshot a Webpage on a Low-Cost VPS in India
Run Playwright MCP on a low-cost Linux VPS in India, connect an MCP client, install headless Chromium, and capture full-page or element screenshots.
To use Playwright MCP to screenshot a webpage on a low-cost VPS in India, install Node.js 20 or newer, install the Playwright MCP server and its Chromium dependencies, run it in headless mode, and connect an MCP client. The browser runs on the VPS; your MCP client asks it to open a URL and capture the page. If your client cannot start a process on the VPS, run Playwright MCP with HTTP transport and connect to its /mcp endpoint.
This guide covers the server setup, client configuration, screenshot requests, resource choices, and common failures. It does not recommend a specific VPS provider or minimum server size: those depend on the workload and provider, and the available documentation does not establish a universal price, RAM requirement, or performance figure.
1. Understand what runs where
Playwright MCP is the bridge between an MCP client and browser automation. The MCP client sends a request; Playwright MCP controls Chromium, navigates to the page, and returns a screenshot tool result. In a remote setup, Chromium and the MCP server run on the VPS while the MCP client can run on your workstation or another host.
The Playwright documentation describes the server as providing browser automation to language models through the Model Context Protocol. The practical requirement for a screenshot-only workload is a supported Linux environment, Node.js, an MCP client, and the browser binary plus required system libraries.
2. Check the prerequisites
- Node.js 20 or newer. Playwright MCP lists this as a prerequisite.
- An MCP client. Use a client that supports MCP server configuration. Its configuration file and restart procedure vary; consult that client’s MCP setup instructions.
- A Linux VPS. Confirm that your chosen distribution is supported by the Playwright version you install.
- Disk space and network access for browser installation. Browser downloads can consume hundreds of megabytes. The exact amount varies by version and platform.
Check Node.js on the VPS with:
node --version
If the command is missing or reports a version below 20, install a supported Node.js release using your distribution’s or Node.js provider’s current instructions before proceeding.
3. Install Chromium and its Linux dependencies
Playwright browser binaries are tied to Playwright versions. Install the browser through Playwright’s CLI rather than copying an arbitrary Chromium binary onto the server. For a screenshot workload that only needs Chromium, installing just that browser avoids downloading unused engines.
npx playwright install --with-deps chromium
This command downloads Chromium and installs its Linux dependencies where supported. If your environment does not permit the dependency-install step or uses a distribution outside the supported set, install the required OS packages using the official Playwright guidance for that distribution, then install the browser binary:
npx playwright install chromium
The MCP package itself can be launched with npx; the standard client configuration below uses @playwright/mcp@latest. Browser versions should match the Playwright tooling in use. If you update the package and browser launch starts failing, reinstall Chromium with the updated Playwright tooling.
4. Run Playwright MCP headlessly
A VPS normally has no graphical desktop. Playwright MCP’s default mode is headed, so pass --headless for a displayless server.
Option A: The MCP client can launch the server process
Use this when the MCP client and server process run on the same machine. Add a server entry to the client’s MCP configuration, adapting the file location to that client:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--headless"]
}
}
}
For a local client on your workstation, this configuration starts Playwright MCP on your workstation, not on the VPS. To use the VPS browser, the process must be launched on the VPS and reachable through a supported remote transport, as in Option B.
Option B: Run the MCP server on the VPS over HTTP
When the client is elsewhere and cannot start a process on the VPS, start the server there with HTTP transport:
npx @playwright/mcp@latest --headless --port 8931
Then configure the MCP client to connect to:
http://<server-address>:8931/mcp
The documented transport can bind broadly with --host 0.0.0.0 when required by the network layout. Binding a service to a public interface makes it reachable according to the VPS network and firewall configuration. Restrict access using network controls appropriate to your provider and deployment; the Playwright transport documentation does not define an India-provider-specific security recipe.
Use a private network or otherwise restrict which clients can reach the MCP endpoint. Do not assume that changing the port makes an exposed service private. Confirm the endpoint path, address, and network route from the MCP client’s host.
5. Ask the MCP client to capture a webpage
Once the client has connected to the server, ask it to navigate to a page and take a screenshot. For example:
Go to https://example.com and take a screenshot of the full page.
The screenshot tool can capture a page or a selected element, choose PNG, JPEG, or WebP, set an output filename, and capture the full scrollable page. If no filename is specified, it uses a timestamped filename in the output directory. Relative filenames resolve against the workspace root.
For repeatable output, give the client an explicit filename and specify whether you need the full page or a particular element. A page screenshot captures the visible page by default; a full-page request includes the scrollable content. An element capture is useful when only one component matters, but it depends on the target selector being present and uniquely identifying the intended element.
6. Keep the VPS setup small and predictable
- Install only Chromium if Chromium is sufficient; unused browsers add download time and disk usage.
- Start with headless mode and one browser process at a time. Playwright’s CI guidance recommends one worker when stability and reproducibility matter; treat that as a conservative starting point, not a minimum-spec claim.
- Capture only the page or element you need. Full-page captures can involve more rendering and image data than viewport captures.
- Keep the Playwright package and browser binaries in sync, and avoid updating one without reinstalling the matching browser.
- Measure resource use with your actual target pages and concurrency. A page with large images, scripts, or complex rendering can behave differently from a simple page.
When comparing VPS plans, check India-region availability and latency to both your MCP client and target websites, monthly price and billing terms, disk and memory headroom for the selected browser version, Linux distribution support, bandwidth or egress terms, and safe network reachability. No provider winner or current VPS price is established here.
7. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Server exits with a Node.js version or syntax error | The VPS is running an unsupported Node.js version. | Check node --version and install Node.js 20 or newer. |
| Chromium fails to launch because a shared library is missing | Linux browser dependencies were not installed, or the OS is not supported by the installed Playwright version. | Run npx playwright install --with-deps chromium on a supported distribution, or install the documented OS dependencies and run npx playwright install chromium. |
| Browser executable is missing | The browser binary has not been installed for the Playwright version being used. | Run the Playwright browser installation command for Chromium. Repeat after changing Playwright versions if needed. |
| Client cannot connect to the MCP server | The server is not running, the client has the wrong address or path, or network controls block the connection. | Confirm the server process is running, use the exact /mcp endpoint, and check routing and firewall rules from the client host. |
| Headed browser reports that no display is available | The server was started without headless mode on a displayless VPS. | Add --headless to the MCP server arguments. |
| Screenshot is blank or incomplete | The page may not have finished rendering, may require interaction, or the requested full-page or element target was not specified as intended. | Ask for the full page when needed, wait for the relevant content or selector, and capture the correct page or element. Check whether the target site requires authentication or blocks automated browsing. |
| Output file is not where expected | The default output directory or workspace-relative path differs from the assumed location. | Set an explicit filename and check the MCP client’s workspace root and output directory. |
8. Performance, reliability, and cost
There is no single VPS size or screenshot duration that can be recommended from the documented facts. Browser startup, page complexity, image loading, network distance, and concurrency all affect resource use and latency. Start with one headless Chromium instance and one capture at a time, then observe the workload before raising concurrency.
For reliability, keep the browser binary aligned with the Playwright version, verify that the endpoint is reachable from the client, and make sure the server stays running for the duration of remote use. If a target page times out or renders incompletely, distinguish a site or network problem from a browser installation problem by trying a simpler public page and inspecting the MCP server’s error output.
VPS cost depends on the provider, region, selected plan, bandwidth, and billing terms. Browser binaries use hundreds of megabytes, but that fact does not determine a universal disk or RAM minimum. Compare current provider terms directly before choosing a plan.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. One GET request can return a PNG, JPEG, WebP, or PDF. Its capture flow accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; those steps can be turned off.
For a direct API call, use cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
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}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', new Uint8Array(await res.arrayBuffer()));
See the ScreenshotNeo API documentation for request options. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 shots.
Sign up for 1,000 free screenshots a month, with no card required.
FAQ
Can the MCP client run on my laptop while Chromium runs in India?
Yes. Run Playwright MCP on the VPS with HTTP transport and configure the client to connect to the VPS server’s /mcp endpoint. Ensure the route is restricted and reachable.
Does this setup require a desktop environment?
No. Use the server’s headless mode for a displayless VPS.
Can I save only one part of a page?
Yes. The screenshot tool supports element-targeted capture as well as page and full-page screenshots.
Is there a guaranteed low-cost VPS size for this?
No universal minimum is established. Browser version, operating system, target pages, and concurrency affect what resources your workload needs.


