Labsco
MCP SERVER

Patchright Lite MCP Server

by dylangroos

Four browser tools — browse, interact, extract, close — driven by Patchright, an undetected Playwright build, for pages that block ordinary automation.

Browser Automation, Control & Screenshots
Summary
Four tools is the feature, not a limitation.

Large browser tool sets give a model a lot of ways to pick wrong. Browse, interact, extract, close covers a login-and-read flow end to end, and the ids returned from the first call keep the session coherent through the rest. The stealth patching is what gets you onto pages that reject plain Playwright — with the usual caveat the README states, that terms of service still apply.

What it is

A deliberately small browser-automation server on top of the Patchright Node.js SDK. Patchright is a drop-in Playwright replacement that patches the signals anti-bot systems look for, and the tool surface is kept to four so a smaller model can use it reliably.

What you get
  • browse takes a url, an optional headless flag and a waitFor delay; it returns the page title, a visible-text preview, a browser id, a page id and a screenshot path
  • interact performs one action on a page — click, fill or select — against a selector, and returns the result, the current URL and a screenshot path
  • extract returns the current page as text, html or a screenshot
  • close releases a browser by its id
  • Browser and page ids thread through the calls, so a login flow is a sequence rather than one call per page load
  • Patchright patches the Runtime.enable and Console.enable leaks, command-flag leaks and closed shadow-root interactions
Requirements

Node.js 18 or newer. Build from a checkout with `npm install` and `npm run build`, then install the browser with `npx patchright install chromium` — the automation cannot run without it. Started with `npm start` over stdio; a container image at dylangroos/patchright-mcp is also published.

Setup effort

One command — docker run -it --rm dylangroos/patchright-mcp