How to Set Up a Website Screenshot MCP Server on an Indian VPS
Run Playwright MCP on an Indian VPS in headless mode, connect an MCP client over HTTP, and secure the browser endpoint before exposing it.
To host a website screenshot MCP server on an Indian VPS, run the official Playwright MCP package in headless mode, expose its HTTP transport only to the MCP client that needs it, and configure the client to connect to the server’s /mcp endpoint. You need Node.js 20 or newer for the package workflow. An Indian VPS is simply the location of the Linux machine; Playwright does not require a special India setting. The server can take screenshots of pages and elements, while its usual interaction flow also uses structured accessibility snapshots. Playwright’s getting-started guide documents the prerequisites and package setup.
1. Choose an Indian VPS
Select a Linux VPS region based on where your MCP client and target websites are, then compare vCPU, memory, disk, network transfer, public IP support, firewall controls, and current price. Browser workloads vary with page weight, browser choice, screenshot size, and concurrency; the reviewed documentation does not establish a minimum VPS size. Start with a modest workload, measure memory and CPU under your own sites, and resize if needed.
Amazon Lightsail is one documented example with a Mumbai region. Its Mumbai plans have half the transfer allowance shown for many other regions, so inspect the live plan and regional terms before choosing. Plan prices and allowances can change. See Lightsail bundles and its data transfer guidance.
2. Install Node.js and start Playwright MCP
Connect to the server over SSH using your VPS provider’s instructions. Install Node.js 20 or newer using the method supported by your Linux distribution or Node.js installation tool, then confirm the runtime:
node --version
npm --version
The package can download its browser automatically on first use. Start the standalone HTTP server on loopback first:
npx @playwright/mcp@latest --headless --port 8931
Leaving the bind address at its default keeps the listener on localhost. This is appropriate when the MCP client runs on the same machine or reaches the VPS through an SSH tunnel. The documented standalone example uses port 8931 and the /mcp path. See Playwright MCP configuration options.
3. Connect an MCP client
For a client running on the VPS, configure its MCP server entry with the local HTTP URL. Exact configuration file location varies by client:
{
"mcpServers": {
"playwright": {
"url": "http://127.0.0.1:8931/mcp"
}
}
}
If the client runs on your workstation, create an SSH tunnel from that workstation and keep the server bound to loopback on the VPS:
ssh -N -L 8931:127.0.0.1:8931 user@YOUR_VPS_IP
Then set the client URL to http://127.0.0.1:8931/mcp on your workstation. Keep the SSH session or an equivalent tunnel active while using the server. This avoids opening the MCP port to the public internet.
4. Optional: allow a remote network connection
If the client cannot use an SSH tunnel, configure the server to bind to a reachable interface, for example:
npx @playwright/mcp@latest --headless --port 8931 --host 0.0.0.0 --allowed-hosts YOUR_MCP_HOSTNAME
Binding to 0.0.0.0 makes the listener reachable on the server’s interfaces. Do this only when your network design requires it. Add a firewall rule for the required port and restrict its source addresses where possible. Prefer a TLS-terminating reverse proxy with authentication for remote access; do not assume the MCP endpoint authenticates callers. Playwright documents host binding and allowed-host configuration, and explicitly warns that Playwright MCP is not a security boundary. Its secrets redaction feature is described as a convenience, not a replacement for access controls. See the project security note and the Lightsail firewall explanation.
5. Verify screenshot capture
- Confirm the server process is running and the MCP client connects to the configured URL.
- Ask the client to navigate to a public page, then request a screenshot of the page.
- For a smaller capture, ask for a screenshot of a specific element, if that tool action is available in your client.
- Check the client’s tool output and server logs for connection, browser launch, or navigation errors.
The model does not have to use screenshots for every interaction: Playwright MCP commonly exposes structured accessibility snapshots for navigating and interacting with pages. Screenshots are useful when the visual result itself matters. The supported actions and client instructions are covered in the official guide.
Configuration options that matter
| Need | Option or approach | Practical note |
|---|---|---|
| Unattended VPS | --headless |
Headless mode is the relevant choice when there is no desktop display. |
| HTTP transport | --port 8931 |
Connect clients at http://HOST:8931/mcp. |
| Network binding | --host |
Defaults to localhost; broad binding increases exposure. |
| Host validation | --allowed-hosts |
Set expected hosts deliberately; avoid disabling checks with a wildcard without a specific reason. |
| Browser engine | --browser=chromium, firefox, or webkit |
Choose an engine only when the task needs it; installed browser support and resources vary. |
| Viewport | --viewport-size=1280x720 |
Set a consistent viewport when comparing captures. |
| Client heartbeat | PLAYWRIGHT_MCP_PING_TIMEOUT_MS |
HTTP sessions use a heartbeat; increase the timeout if a proxy or client does not answer server pings. |
| Advanced settings | --config path/to/config.json |
Configuration can cover browser and context options, network rules, timeouts, and server settings. |
Configuration can be provided through a file, environment variables, and command-line arguments, with command-line arguments taking precedence. Consult the current options reference for the complete option list and supported values.
Deployment alternatives
Client-launched local process
If the MCP client itself runs on the VPS, it can launch the package using a command entry instead of connecting to a separately managed HTTP service:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--headless"]
}
}
}
This is simpler for a client on the same host, but it does not make a shared remote service. Follow the MCP client’s own configuration documentation.
Docker
The project documents a Docker image and a long-running HTTP server example. The documented Docker implementation supports headless Chromium. Treat published image tags and the repository instructions as changeable; review the current Playwright MCP repository before deployment. A container does not by itself provide endpoint authentication or make an exposed browser safe.
Security checklist
- Keep port 8931 private unless remote access is necessary.
- Use an SSH tunnel or authenticated TLS proxy for remote clients.
- Limit firewall ingress to the required source addresses and ports. Provider firewall defaults differ; AWS’s documentation is an example, not a universal default.
- Keep the operating system, Node.js, package, and browser image maintained.
- Consider what sites the browser can reach from the VPS. Do not send untrusted users to a browser endpoint with access to private network services.
- Do not treat Playwright’s secrets redaction as authorization or isolation.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Package refuses to start due to Node version | Node.js is older than the documented 20+ prerequisite. | Install a supported Node.js version and rerun node --version. |
| Client cannot connect | Wrong URL path, server stopped, tunnel missing, or firewall blocks the port. | Use the /mcp suffix, check the process, verify the tunnel, and inspect ingress rules. |
| Connection works locally but not remotely | Server listens only on loopback. | Keep loopback and use an SSH tunnel, or intentionally bind a reachable interface and secure it behind network controls. |
| Host validation rejects a request | The request host does not match the configured allowed host list. | Set the expected hostname in --allowed-hosts and ensure the client uses that hostname. |
| Browser launch fails | Browser download incomplete, missing runtime dependencies, or insufficient available resources. | Review startup output, allow the first-use browser download to finish, and follow the current installation guidance for the Linux environment. |
| Session drops behind a proxy | The proxy or client does not respond to the server heartbeat within its timeout. | Adjust PLAYWRIGHT_MCP_PING_TIMEOUT_MS as documented and verify proxy support for the transport. |
| Pages time out or captures are incomplete | Slow site, heavy assets, blocked outbound traffic, or page-specific loading behavior. | Check VPS outbound networking and logs, retry the target, and evaluate workload/resource use. Avoid assuming a fixed timeout or VPS size fits every site. |
Performance, reliability, and cost
Each screenshot launches or uses a browser context and loads the target site, so the cost drivers include VPS compute, memory, storage, and outbound transfer. Page weight, browser engine, viewport, concurrency, and target-site response time all affect resource use. The source documentation does not provide a minimum resource size or workload benchmark; measure representative pages at the concurrency you expect before committing to a VPS size.
For reliability, keep the process under a service manager or container runtime suitable for your deployment, monitor process health and disk space, and plan how package and browser updates are applied. These are operational recommendations, not a claim that any particular setup has been tested. If using Lightsail in Mumbai, verify current transfer terms: the provider documents a reduced regional allowance for Mumbai plans.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server for developers. A single request can return a PNG, JPEG, WebP, or PDF; its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI clients. Cookie banners, popups, and chat widgets are removed before the shot. Bot checks, blank pages, and failed loads are never billed. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Every feature is on every plan. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Create a free ScreenshotNeo account for 1,000 screenshots a month with no card.
FAQ
Does the MCP server have to run in Mumbai?
No. Choose an Indian VPS region based on network proximity and operational requirements. The Playwright setup itself is region-agnostic.
Does Playwright MCP use screenshots for every browser action?
No. Its interaction model also uses structured accessibility snapshots; request screenshots when visual inspection is useful.
Can I use a different MCP client?
Yes. The HTTP transport is intended for MCP clients that support the endpoint configuration. Client configuration syntax and file location vary.
What VPS size should I buy?
There is no documented universal minimum for this workload. Base the choice on measured target pages, browser settings, and concurrency.


