Autosearch fetch-playwright
Interactive browser automation (click, type, wait, screenshot, navigate) for dynamic pages that need user-like actions — pagination, login, form submission, infinite scroll. Uses Microsoft's official @playwright/mcp server; no autosearch-side Python. Use when fetch-jina and fetch-crawl4ai still cannot get the content.
install
source · Clone the upstream repo
git clone https://github.com/0xmariowu/Autosearch
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/0xmariowu/Autosearch "$T" && mkdir -p ~/.claude/skills && cp -r "$T/autosearch/skills/tools/fetch-playwright" ~/.claude/skills/0xmariowu-autosearch-fetch-playwright && rm -rf "$T"
manifest:
autosearch/skills/tools/fetch-playwright/SKILL.mdsource content
Drive a real Chromium browser from the runtime AI via Microsoft's official
@playwright/mcp server. Use this when fetch-jina (cheapest) and fetch-crawl4ai (depth + basic JS) still cannot reach the content — typically because the page requires clicking, typing, scrolling, waiting for an event, or capturing a screenshot.
Architecture (why there is no Python file in this skill)
This skill is documentation-only. The runtime AI calls
playwright-mcp tools directly through its MCP client — autosearch does not wrap them. The skill exists so the runtime AI knows:
- When to reach for Playwright (vs. fetch-jina / fetch-crawl4ai).
- How to install
.@playwright/mcp - Which MCP tools to call for common web-research patterns.
Install
Register with your MCP client. For Claude Code, prefer
claude mcp add (writes to ~/.claude.json); for project-scoped config use <project>/.mcp.json. Cursor reads ~/.cursor/mcp.json; Zed reads <project>/.zed/mcp.json. Schema for any of them:
{ "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] } } }
On first run,
npx will download @playwright/mcp and Playwright will install a Chromium bundle. No API keys. Works offline for local pages.
Common Tool Calls (as used by the runtime AI)
Tool names below come from
@playwright/mcp. Exact schemas are served by the MCP server itself; the runtime AI enumerates them via the MCP client.
— go to a URL.browser_navigate(url)
— accessibility tree of the current page (cheap text form, no screenshot).browser_snapshot()
/browser_click(ref)
/browser_type(ref, text)
— interact with elements from the snapshot.browser_press_key(key)
— wait for an event or selector.browser_wait_for(text | time | element)
— capture the current page as an image.browser_take_screenshot()
— run custom JS (use sparingly).browser_evaluate(script)
/browser_network_requests()
— inspection.browser_console_messages()
— open, list, select, close tabs.browser_tabs(...)
— release the browser.browser_close()
When to Use
- Page requires clicking a "Show more" / "Accept cookies" before content renders.
- Login-gated content where the user has supplied a session (via storage state).
- Infinite-scroll feed where lazy-load fires on scroll.
- Verifying a production flow where screenshots are the deliverable.
- Debugging network / console errors on a third-party page.
When NOT to Use
- Static article, documentation, blog post →
is cheaper.fetch-jina - Lightly JS-rendered page that works with plain crawl →
.fetch-crawl4ai - Paid, hardened anti-bot site →
(paid) may still succeed where an ordinary Chromium cannot.fetch-firecrawl
Limits
requires Node.js >= 18 and writes a Playwright browser bundle to the user's cache on first run (~200 MB).@playwright/mcp- Long sessions consume memory; the runtime AI should call
when a task ends.browser_close() - Headful mode requires a desktop; CI / headless servers must use the default headless mode.
- Cookie / profile / storage state setup is the caller's responsibility (see
docs for@playwright/mcp
).storageState
Downgrade / Upgrade Chain
- Below:
(Playwright, same browser engine but no interactive control) →fetch-crawl4ai
(HTTP Markdown only).fetch-jina - Above:
(paid, stronger anti-bot and managed infra).fetch-firecrawl
This tool does not produce a summary. The runtime AI processes the tool outputs directly; autosearch provides only the routing guidance in this SKILL.md.
Quality Bar
- Evidence items have non-empty title and url.
- No crash on empty or malformed API response.
- Source channel field matches the channel name.