Playwright Wsl
FreeNot checkedDrop-in WSL-safe wrapper for @playwright/mcp that prevents Chromium GPU crashes on Windows Subsystem for Linux.
About
Drop-in WSL-safe wrapper for @playwright/mcp that prevents Chromium GPU crashes on Windows Subsystem for Linux.
README
Drop-in WSL-safe wrapper for @playwright/mcp. Prevents Chromium GPU crashes on Windows Subsystem for Linux.
The Problem
Running Claude Code (or any Playwright-based browser automation) on WSL2 with parallel browser sessions causes cascading crashes:
- Chromium tries to allocate GPU memory through WSL's
dxgbridge - Multiple browser instances exhaust GPU memory allocations
- Chrome processes SEGFAULT (signal 11)
- Crash cascade takes down the entire WSL instance
This is invisible to users — WSL just "crashes" or "freezes" with no clear error.
The Fix
This package wraps @playwright/mcp and automatically injects GPU-safe flags when running on WSL:
--disable-gpu
--disable-software-rasterizer
--disable-dev-shm-usage
On non-WSL systems, it passes through to @playwright/mcp unchanged. No performance impact — GPU acceleration is meaningless for headless browser automation.
Installation
Claude Code (recommended)
Add to your Claude Code settings (.claude/settings.json or global settings):
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["playwright-mcp-wsl@latest"]
}
}
}
This replaces the default @playwright/mcp entry.
Manual / Other MCP Hosts
npx playwright-mcp-wsl@latest
All @playwright/mcp CLI flags are supported:
npx playwright-mcp-wsl@latest --headless --viewport-size 1440x900
Programmatic
const { createConnection } = require('playwright-mcp-wsl');
// Same API as @playwright/mcp, with WSL-safe defaults
How It Works
- Detects WSL by reading
/proc/versionfor Microsoft/WSL kernel strings - If WSL: sets
PLAYWRIGHT_MCP_CONFIGto a bundled config that adds--disable-gpuand related flags to Chromium launch args - If not WSL: passes through to
@playwright/mcpwith zero modifications - If user has custom config: merges WSL-safe args into existing config (no overwrite)
What It Disables
| Flag | Why |
|---|---|
--disable-gpu |
Prevents GPU memory allocation through the dxg bridge |
--disable-software-rasterizer |
Prevents fallback software GPU that still uses dxg |
--disable-dev-shm-usage |
Uses /tmp instead of /dev/shm (often undersized on WSL) |
What It Doesn't Affect
- Page rendering quality (identical for headless automation)
- JavaScript execution
- Network requests
- Screenshot quality
- DOM interaction
- Any Playwright MCP functionality
Compatibility
- WSL1 and WSL2
- Windows 10 and Windows 11
- Node.js 18+
- All
@playwright/mcpversions >= 0.0.60 - Claude Code, Cursor, Windsurf, or any MCP-compatible host
Verifying It Works
When running on WSL, you'll see in stderr:
[playwright-mcp-wsl] Detected WSL2 + dxg bridge. Injecting GPU-safe config.
When running on non-WSL:
[playwright-mcp-wsl] Not running in WSL. Passing through to @playwright/mcp.
Background
This package was created after diagnosing cascading WSL crashes during parallel browser automation with Claude Code's PAI system. The root cause was Chromium's GPU memory allocation through WSL2's dxg (DirectX Graphics) bridge — a kernel-level GPU passthrough layer not designed for concurrent headless browser load.
Crash signature in dmesg:
misc dxg: dxgk: dxgvmb_send_create_allocation: send_create_allocation failed ffffffb5
misc dxg: dxgk: dxgkio_create_allocation: Ioctl failed: -75
chrome: potentially unexpected fatal signal 11
WSL (CaptureCrash): Capturing crash for pid: ..., executable: chrome, signal: 11
License
Apache-2.0 — same as Playwright.
Installing Playwright Wsl
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/NorthwoodsSentinel/playwright-mcp-wslFAQ
Is Playwright Wsl MCP free?
Yes, Playwright Wsl MCP is free — one-click install via Unyly at no cost.
Does Playwright Wsl need an API key?
No, Playwright Wsl runs without API keys or environment variables.
Is Playwright Wsl hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Playwright Wsl in Claude Desktop, Claude Code or Cursor?
Open Playwright Wsl on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Playwright
Browser automation, scraping, screenshots
by MicrosoftPuppeteer
Browser automation and web scraping.
by modelcontextprotocolopentabs-dev/opentabs
Plugin-based MCP server + Chrome extension that gives AI agents access to web applications through the user's authenticated browser session. 100+ plugins with a
by opentabs-devrobhunter/agentdeals
1,500+ developer infrastructure deals, free tiers, and startup programs across 54 categories. Search deals, compare vendors, plan stacks, and track pricing chan
by robhunterhlydecker/ucsc-genome-mcp
MCP server to interact with the UCSC Genome Browser API, letting you find genomes, chromosomes, and more.
by hlydecker34892002/bilibili-mcp-js
A MCP server that supports searching for Bilibili content. Provides LangChain integration examples and test scripts.
by 34892002achiya-automation/safari-mcp
Native Safari browser automation for AI agents with 80+ tools. No Chrome dependency, optimized for Apple Silicon with 60% less CPU overhead.
by achiya-automationagent-infra/mcp-server-browser
Browser automation capabilities using Puppeteer, both support local and remote browser connection.
by bytedanceaparajithn/agent-scraper-mcp
Web scraping MCP server for AI agents. 6 tools: clean content extraction, structured scraping with CSS selectors, full-page screenshots via Playwright, link ext
by aparajithnapireno/DOMShell
Browse the web using filesystem commands (ls, cd, grep, click). 38 MCP tools map Chrome's Accessibility Tree to a virtual filesystem via a Chrome Extension.
by apirenoCompare Playwright Wsl with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All browse MCPs
