# @eurafaeldecarvalho/browser-scraper [Health: Active]

**Category:** 📂 Browser Automation  
**Repository:** https://github.com/eurafaeldecarvalho/browser-scraper  
**GitHub Stars:** 12  
**npm Downloads (last month):** 1038  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/eurafaeldecarvalho-browser-scraper

## Description
Stealth browser for web scraping and AI agents: undetected Chrome over raw CDP, Cloudflare Turnstile, closed Shadow DOM & cross-origin iframes, HTML to Markdown, MCP server, LLM structured extraction (bring your own model). Puppeteer alternative.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "browser-scraper": {
    "command": "npx",
    "args": ["-y","@eurafaeldecarvalho/browser-scraper"]
  }
}
```

## Documentation

## What @eurafaeldecarvalho/browser-scraper does

@eurafaeldecarvalho/browser-scraper gives MCP-compatible agents access to a locally running Chrome instance for web scraping and browser automation. It reads page content through the Chrome DevTools Protocol and can expose the result as clean Markdown, metadata, structured data, links, or an accessibility snapshot with references that an agent can use for interaction.

The browser layer is designed for sites that detect conventional headless automation. It avoids sending `Runtime.enable`, keeps browser identity signals consistent across user agent, Client Hints, WebGL, timezone, and locale, and uses human-like mouse and keyboard input. Cloudflare Turnstile checkbox flows can be handled with `solveTurnstile()`. These measures improve access to protected pages but do not guarantee a bypass; IP reputation and the target's defenses remain relevant.

## How it works

The package can be used as a Node.js library, command-line program, or MCP server. The library is organized around `Browser`, `Tab`, and `Element` objects: create a browser, open a tab, navigate to a URL, find elements, and perform actions before closing the browser.

For simpler extraction, `scrape()` starts with plain HTTP and escalates to browser or stealth browser access only when needed. Its result identifies the least expensive tier that succeeded. Browser-based extraction reads Chrome's DOM tree over CDP without injecting scripts into the page. DOM traversal can include closed Shadow DOM roots and cross-origin iframe documents.

The MCP and CLI interfaces are intended for agent workflows. Secret values can be supplied through `{{SECRET}}` placeholders so credentials are not exposed to the model, an allow-list can restrict permitted domains, and page content is fenced as untrusted data.

## Setup and configuration

Install the package with npm or pnpm:

```bash
npm install @eurafaeldecarvalho/browser-scraper
```

The package requires Node.js 20 or newer and a local Chrome or Chromium installation. Chrome is detected automatically, or a specific executable can be supplied with `chromePath`. A basic MCP registration for Claude Code is:

```bash
claude mcp add browser-scraper -- npx -y @eurafaeldecarvalho/browser-scraper mcp
```

AWS Lambda deployments also use the optional `@sparticuz/chromium` package. Profile history seeding can use Node's built-in `node:sqlite` on Node 22.5 or newer, or the optional `better-sqlite3`; if neither is available, that seeding step is skipped. LLM helpers are available through the `/ai` import and require `ai`, plus `zod` when using Zod schemas.

## Tools and capabilities

- Navigate pages and locate elements with selectors.
- Click, type, and use human-like mouse or keyboard input.
- Capture screenshots.
- Convert main page content to Markdown, with optional query filtering and configurable link output.
- Extract page metadata such as title, description, canonical URL, language, social metadata, and JSON-LD.
- Produce accessibility snapshots with clickable references for agents.
- Traverse closed Shadow DOM and cross-origin iframes.
- Handle Cloudflare Turnstile checkbox flows with `solveTurnstile()`.
- Escalate from HTTP retrieval to browser or stealth browser access through `scrape()`.
- Generate CSS selectors with an LLM once, then extract with `run()` without an LLM; `runOrHeal()` can regenerate selectors when a site changes.
- Control network behavior, use persistent profiles, and warm browser identities.

## Limitations and notes

The package is not a general CAPTCHA solver. It does not solve reCAPTCHA v2, hCaptcha, or Arkose image challenges; those require a separate solver service. It can maintain high reCAPTCHA v3 scores through human-like input and warmed profiles.

Stealth results depend on the production environment. Datacenter IP reputation can prevent access before JavaScript executes, while render-hash checks may require a real GPU and a suitable residential or mobile proxy. GPU-less Lambda environments can expose different browser surfaces from desktop Chrome, so detection results should be tested against the binary and infrastructure being deployed.

The project is licensed under MIT and is designed for local use without a hosted service, API key, or per-page charge. Proxy access and any optional LLM are supplied separately by the user.

_Full upstream README: https://allmcps.com/mcp/eurafaeldecarvalho-browser-scraper/readme_

