PlaywrightXtrasMcp 0.0.1-preflight.3
{ "inputs": [ { "type": "promptString", "id": "playwright_browser", "description": "Which browser engine to launch: chromium, firefox, or webkit. Defaults to chromium.", "password": false }, { "type": "promptString", "id": "playwright_headed", "description": "Set to 0 for headless, or 1 for a visible browser window. Defaults to headed.", "password": false } ], "servers": { "playwrightxtrasmcp": { "type": "stdio", "command": "dnx", "args": ["playwrightxtrasmcp@0.0.1-preflight.3", "--yes"], "env": { "PLAYWRIGHT_BROWSER": "${input:playwright_browser}", "PLAYWRIGHT_HEADED": "${input:playwright_headed}" } } } }
.vscode/mcp.json settings file.
dotnet tool install --global PlaywrightXtrasMcp --version 0.0.1-preflight.3
dotnet new tool-manifest
dotnet tool install --local PlaywrightXtrasMcp --version 0.0.1-preflight.3
#tool dotnet:?package=PlaywrightXtrasMcp&version=0.0.1-preflight.3&prerelease
nuke :add-package PlaywrightXtrasMcp --version 0.0.1-preflight.3
playwright-xtras-mcp
A Model Context Protocol server that exposes a real browser
(Playwright) as MCP tools — in pure .NET, with no Node project
of your own and no npx.
Tools include: goto, click, type, snapshot (ARIA ref-tree), screenshot, evaluate,
console/network log capture, dialog handling, and a headed/headless toggle.
Microsoft.Playwrightstill spawns its bundled Node driver internally — that's an implementation detail of the package. You install from NuGet and run a .NET tool; there is no npm install, lockfile, ornode_modulesto audit on your side.
Run it
Requires the .NET 10 SDK (which provides the dnx command).
dnx PlaywrightXtrasMcp --yes
The process waits for MCP protocol messages on stdin — your MCP client launches it for you.
MCP client config (VS Code, Visual Studio, Cursor, Claude Code)
{
"servers": {
"playwright-xtras": {
"type": "stdio",
"command": "dnx",
"args": ["PlaywrightXtrasMcp", "--yes"],
"env": {
"PLAYWRIGHT_BROWSER": "chromium",
"PLAYWRIGHT_HEADED": "1"
}
}
}
}
Environment variables
| Variable | Values | Default |
|---|---|---|
PLAYWRIGHT_BROWSER |
chromium | firefox | webkit |
chromium |
PLAYWRIGHT_HEADED |
1 (visible) | 0 (headless) |
headed |
PLAYWRIGHT_XTRAS_ALLOW_UNRESTRICTED_FILE_ACCESS |
1 to lift the file sandbox |
off |
PLAYWRIGHT_XTRAS_ALLOWED_ORIGINS |
;-separated glob allowlist of network origins |
all |
PLAYWRIGHT_XTRAS_BLOCKED_ORIGINS |
;-separated glob blocklist (before the allowlist) |
none |
File access sandbox (default-deny)
Like the official Playwright MCP, this server is
safe by default: goto refuses file:// URLs and screenshot output is confined to the working
directory. This blunts prompt-injection abuse where hostile page content steers the agent into
reading local files or writing outside the project. Set
PLAYWRIGHT_XTRAS_ALLOW_UNRESTRICTED_FILE_ACCESS=1 to lift both. It's a guardrail, not a hard
security boundary (no symlink resolution, no effect on in-page redirects).
Optionally restrict which network origins the browser may request via
PLAYWRIGHT_XTRAS_ALLOWED_ORIGINS / PLAYWRIGHT_XTRAS_BLOCKED_ORIGINS (;-separated globs;
blocklist evaluated first) to curb SSRF toward internal/metadata endpoints.
Secret redaction (output-only)
Drop a redact.json at ./.playwright-xtras-mcp/redact.json (or point
PLAYWRIGHT_XTRAS_REDACT_CONFIG at one) and the server scrubs matching secrets out of the content it
returns to the model — evaluate, html, snapshot, location, goto/reload, and the
console/network logs — and visually masks matching elements in screenshots. The file format matches
the CLI's
redact.example.json
(literals, patterns, placeholder, maskColor). Inputs sent to the page are never touched. It's
a best-effort convenience — substring/regex matching can miss transformed or split values — not a
security guarantee.
One-time browser download
Playwright needs its browser binaries once. The sibling
PlaywrightXtrasCli tool exposes an install
command, or use any standard Playwright install path for your environment.
Links
- Source & docs: https://github.com/AgentiaPT/playwright-dotnet-xtras
- Companion CLI:
PlaywrightXtrasCli
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|