browser-img-hunter
v1.0.3
Published
Browser image capture and MCP server for authorized web document workflows
Downloads
364
Maintainers
Readme
Browser Img Hunter
Browser image capture CLI + MCP server for page-by-page document capture and PDF export.
Use this only for content you are authorized to access and save.
Quick Start
1) Install
npm i -g browser-img-hunter
npx playwright install chromium2) CLI capture
browser-img-hunter --url "https://example.com/document" --out captures --channel msedge3) MCP setup in a project (Cursor + Gemini CLI)
cd your-project
browser-img-hunter-init .This creates a project-local .scp workspace and updates:
.cursor/mcp.json.gemini/settings.json
Features
- One image per detected page number (
page-0001.png,page-0002.png, ...) - Virtualized viewer-safe capture with render readiness checks
- Automatic cookie banner, popup, and promo overlay dismissal before capture
- Improved Scribd-style page detection for text markers like
- 1/10 - - Optional headless capture mode for unattended runs
- Missing/duplicate page verification
- PDF build from captured pages
- Project-local
.scpworkspace for reusable agent workflows
Commands
| Command | Description |
|---|---|
| browser-img-hunter | CLI page capture |
| browser-img-hunter-init | Initialize .scp + client MCP config |
| browser-img-hunter-mcp | Start MCP server (stdio transport) |
CLI Usage
browser-img-hunter --helpExample:
browser-img-hunter --url "https://example.com/document" --out captures --wait-ms 10000 --max-scrolls 1200Headless example:
browser-img-hunter --url "https://example.com/document" --out captures --auto-start --headlessCommon options:
--url <url>target URL--out <directory>output folder--profile <directory>browser profile folder--max-pages <number>stop after N pages (0= no limit)--max-scrolls <number>max scroll rounds--wait-ms <number>initial wait after open--delay-ms <number>delay between capture actions--ready-timeout-ms <number>page render wait timeout--headlessrun browser without a visible window--auto-startstart without Enter prompt--appendkeep existingpage-*.pngfiles in output
Viewer handling notes:
- The CLI tries to close or hide cookie banners, popups, ad overlays, and promo interstitials before screenshots.
- This is especially useful on Scribd-like viewers where consent banners or recommended content blocks can overlap the page.
- The capture flow re-checks overlays after initial load and again right before page screenshots.
MCP Tools (English Names)
| Tool | Purpose |
|---|---|
| scp_initialize_project | Create .scp workspace and MCP client config |
| capture_document_pages | Capture pages into .scp/captures/<job_name> |
| verify_capture_directory | Detect missing/duplicate pages and exact duplicate files |
| build_pdf_from_capture | Create PDF from captured page images |
.scp Structure
| Path | Purpose |
|---|---|
| .scp/captures/ | Capture job outputs |
| .scp/profile/ | Reused Playwright browser session |
| .scp/logs/ | Runtime logs |
| .scp/mcp/ | MCP config templates |
Configuration
| Requirement | Value |
|---|---|
| Node.js | >= 18 |
| Browser engine | Playwright Chromium |
| Package name | browser-img-hunter |
Development
npm install
npm run capture:help
npm run mcp:start
npm run scp:init -- .Publishing
npm run pack:check
npm publish --access publicLicense
ISC
