playwright-stealth

v0.2.3
com.pulsemcp/playwright-stealth Checked 4 days ago Published 5 months ago

Browser automation using Playwright with optional stealth mode to bypass anti-bot protection.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

browser_execute

Execute Playwright code in the browser. This tool runs JavaScript code with access to a Playwright `page` object. The browser session persists across calls, so you can navigate, interact with elements, and extract data across multiple tool invocations. **Available in scope:** - `page` - The Playwright Page object with full API access **Example usage:** Navigate to a page: ```javascript await page.goto('https://example.com'); return await page.title(); ``` Click an element and wait: ```javascript await page.click('button.submit'); await page.waitForSelector('.success-message'); ``` Extrac…

ParameterTypeDescription
code *stringPlaywright code to execute. The `page` object is available in scope.
timeoutnumberExecution timeout in milliseconds. Default: 30000

browser_screenshot

Take a screenshot of the current page, a specific element, or a page region. Captures the visible viewport, full page, a specific element, or a rectangular region as a PNG image. Screenshots are saved to filesystem storage and can be accessed later via MCP resources. **Parameters:** - `fullPage`: Whether to capture the full scrollable page (default: false) - `selector`: CSS selector of a specific element to screenshot (e.g., '#main-content', '.hero-banner', 'table.results') - `clip`: Region of the page to screenshot as {x, y, width, height} in pixels - `resultHandling`: How to handle the res…

ParameterTypeDescription
clipobjectRegion of the page to screenshot. Mutually exclusive with fullPage and selector.
fullPagebooleanCapture the full scrollable page. Default: false
resultHandlingstringHow to handle the screenshot result. 'saveAndReturn' (default) saves to storage and returns inline base64, 'saveOnly' saves to storage and returns only the resource URI
selectorstringCSS selector of a specific element to screenshot. Mutually exclusive with fullPage and clip.

browser_get_state

Get the current browser state. Returns information about the current browser session including the URL, page title, and whether a browser is open. **Returns:** - `currentUrl`: Current page URL - `title`: Current page title - `isOpen`: Whether a browser session is active - `stealthMode`: Whether stealth mode is enabled - `headless`: Whether running in headless mode - `proxyEnabled`: Whether a proxy is configured - `ignoreHttpsErrors`: Whether HTTPS certificate errors are being ignored

browser_close

Close the browser session. Shuts down the browser and clears all state. A new browser will be launched on the next execute call.

browser_start_recording

Start recording the browser session as a video. This tool begins capturing all browser interactions as a WebM video file. It works by recycling the browser context with video recording enabled. **Session state preservation:** Cookies and localStorage are automatically saved and restored when the context is recycled. sessionStorage for the current origin is also preserved on a best-effort basis. In rare cases involving multiple origins, some state may not be restored — if you experience authentication issues, log in again. **Behavior when already recording:** If recording is already active…

browser_stop_recording

Stop recording the browser session and save the video. This tool stops the active video recording, saves the video file, and returns a resource URI for the recorded video. **Session state preservation:** Cookies and localStorage are automatically saved and restored when the context is recycled. sessionStorage for the current origin is also preserved on a best-effort basis. The browser automatically navigates back to the URL it was on before the recording stopped. **Error:** Returns an error if no recording is currently active. Use `browser_start_recording` first. **Returns:** - A resource…