mcp-scraper 0.2.18 → 0.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +17 -11
  2. package/dist/bin/api-server.cjs +1020 -348
  3. package/dist/bin/api-server.cjs.map +1 -1
  4. package/dist/bin/api-server.js +3 -3
  5. package/dist/bin/browser-agent-stdio-server.cjs +314 -55
  6. package/dist/bin/browser-agent-stdio-server.cjs.map +1 -1
  7. package/dist/bin/browser-agent-stdio-server.js +2 -2
  8. package/dist/bin/mcp-scraper-cli.cjs +321 -167
  9. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  10. package/dist/bin/mcp-scraper-cli.js +3 -2
  11. package/dist/bin/mcp-scraper-cli.js.map +1 -1
  12. package/dist/bin/mcp-scraper-combined-stdio-server.cjs +1230 -528
  13. package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
  14. package/dist/bin/mcp-scraper-combined-stdio-server.js +19 -3
  15. package/dist/bin/mcp-scraper-combined-stdio-server.js.map +1 -1
  16. package/dist/bin/mcp-scraper-install.cjs +8 -6
  17. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  18. package/dist/bin/mcp-scraper-install.js +5 -92
  19. package/dist/bin/mcp-scraper-install.js.map +1 -1
  20. package/dist/bin/mcp-stdio-server.cjs +726 -387
  21. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  22. package/dist/bin/mcp-stdio-server.js +3 -2
  23. package/dist/bin/mcp-stdio-server.js.map +1 -1
  24. package/dist/bin/paa-harvest.cjs +5 -3
  25. package/dist/bin/paa-harvest.cjs.map +1 -1
  26. package/dist/bin/paa-harvest.js +2 -1
  27. package/dist/bin/paa-harvest.js.map +1 -1
  28. package/dist/{chunk-TL7YTFLH.js → chunk-DBQDG7EH.js} +99 -27
  29. package/dist/chunk-DBQDG7EH.js.map +1 -0
  30. package/dist/{chunk-F44RBOJ5.js → chunk-H2R232HK.js} +216 -108
  31. package/dist/chunk-H2R232HK.js.map +1 -0
  32. package/dist/{chunk-P5PLQU3H.js → chunk-L4OWOUGR.js} +315 -56
  33. package/dist/chunk-L4OWOUGR.js.map +1 -0
  34. package/dist/chunk-LFATOGDF.js +111 -0
  35. package/dist/chunk-LFATOGDF.js.map +1 -0
  36. package/dist/chunk-MLNCKQ2B.js +96 -0
  37. package/dist/chunk-MLNCKQ2B.js.map +1 -0
  38. package/dist/{chunk-RJMCASQH.js → chunk-O5J7E4VX.js} +394 -57
  39. package/dist/chunk-O5J7E4VX.js.map +1 -0
  40. package/dist/{chunk-BSYPATSM.js → chunk-SXTXMFEQ.js} +2 -2
  41. package/dist/{chunk-CQTAKXBN.js → chunk-XGUDTDZ2.js} +7 -104
  42. package/dist/chunk-XGUDTDZ2.js.map +1 -0
  43. package/dist/chunk-XKUDVN2E.js +7 -0
  44. package/dist/chunk-XKUDVN2E.js.map +1 -0
  45. package/dist/{db-P5X6UQ3E.js → db-BE4JVB3V.js} +8 -2
  46. package/dist/index.cjs +5 -3
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.cts +2 -2
  49. package/dist/index.d.ts +2 -2
  50. package/dist/index.js +2 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/{server-VVY5K44O.js → server-7NE45K2A.js} +211 -37
  53. package/dist/server-7NE45K2A.js.map +1 -0
  54. package/dist/{worker-OZSWIS3F.js → worker-MIYG2B2I.js} +5 -4
  55. package/dist/{worker-OZSWIS3F.js.map → worker-MIYG2B2I.js.map} +1 -1
  56. package/docs/adr/0001-in-page-graphql-interception-for-anti-bot-scraping.md +2 -2
  57. package/docs/mcp-tool-craft-lint.generated.md +51 -0
  58. package/docs/mcp-tool-manifest.generated.json +1406 -0
  59. package/docs/specs/local-competitive-audit-spec.md +1 -2
  60. package/docs/specs/mcp-tool-definition-quality-audit-spec.md +1602 -0
  61. package/package.json +4 -1
  62. package/dist/chunk-CQTAKXBN.js.map +0 -1
  63. package/dist/chunk-F44RBOJ5.js.map +0 -1
  64. package/dist/chunk-M5SAUO4K.js +0 -7
  65. package/dist/chunk-M5SAUO4K.js.map +0 -1
  66. package/dist/chunk-P5PLQU3H.js.map +0 -1
  67. package/dist/chunk-RJMCASQH.js.map +0 -1
  68. package/dist/chunk-TL7YTFLH.js.map +0 -1
  69. package/dist/server-VVY5K44O.js.map +0 -1
  70. /package/dist/{chunk-BSYPATSM.js.map → chunk-SXTXMFEQ.js.map} +0 -0
  71. /package/dist/{db-P5X6UQ3E.js.map → db-BE4JVB3V.js.map} +0 -0
package/README.md CHANGED
@@ -10,19 +10,25 @@ MCP Scraper ships three local stdio entrypoints plus human-facing helper CLIs:
10
10
 
11
11
  - `mcp-scraper` — live web intelligence, SERP, PAA, site extraction, YouTube, Facebook ads and organic video transcripts, Maps, directory, rank tracker blueprint, and credit tools.
12
12
  - `browser-agent` — an agent-controlled live cloud browser with screenshots, clicks, typing, scrolling, live watch URLs, replay links, and MP4 replay download.
13
- - `mcp-scraper-combined` — one local MCP server that exposes both tool sets. This is the entrypoint used by the MCPB Desktop Extension.
14
- - `mcp-scraper-install` — a human-facing terminal installer card with the branded ASCII intro and copyable install commands. This command is safe to print because it is not an MCP stdio server.
13
+ - `mcp-scraper-combined` — one context-aware command. In a human terminal it prints the branded ASCII install card; in an MCP client it runs the combined stdio server with both tool sets. This is the entrypoint used by the MCPB Desktop Extension.
14
+ - `mcp-scraper-install` — explicit alias for the human-facing terminal installer card with the branded ASCII intro and copyable install commands.
15
15
  - `mcp-scraper-cli` — a human-facing CLI for setup checks, AI-agent config generation, workflow prompts, local SEO workflow runs, and local HTML reports. This command is safe to print because it is not an MCP stdio server.
16
16
 
17
17
  ### Terminal installer
18
18
 
19
- Run this when you want the designed terminal install experience:
19
+ Run the combined command when you want the designed terminal install experience:
20
20
 
21
21
  ```bash
22
- npx -y -p mcp-scraper@latest mcp-scraper-install
22
+ npx -y -p mcp-scraper@latest mcp-scraper-combined
23
23
  ```
24
24
 
25
- It prints the MCP Scraper banner, loaded tool groups, Desktop Extension download, Claude Code command, and Codex config. This is the command to use when you want the ASCII terminal card. The MCP server commands, including `mcp-scraper-combined`, stay silent so stdout remains valid JSON-RPC for MCP clients.
25
+ In a human terminal, it prints the MCP Scraper banner, loaded tool groups, Desktop Extension download, Claude Code command, and Codex config. When launched by an MCP client, the same command detects non-interactive stdio and writes only valid JSON-RPC to stdout.
26
+
27
+ The explicit installer alias still works:
28
+
29
+ ```bash
30
+ npx -y -p mcp-scraper@latest mcp-scraper-install
31
+ ```
26
32
 
27
33
  ### Human CLI
28
34
 
@@ -81,7 +87,7 @@ Build the branded one-click bundle:
81
87
  npm run build:mcpb
82
88
  ```
83
89
 
84
- The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.2.18`, SHA-256 `3b94a39bf23712005a1a04accdefcf3ee24978995033b92e4488390d47350ea0`). Install it by opening or dragging it into Claude Desktop. Claude displays the `MCP Scraper` install card, icon, and API-key configuration field from the bundle manifest.
90
+ The generated bundle is written to `build/mcpb/mcp-scraper-<version>.mcpb` and copied to `public/downloads/` for the hosted download. The current public bundle is `https://mcpscraper.dev/downloads/mcp-scraper.mcpb` (`0.2.19`, SHA-256 `b324b7bb2a0dca06978d436da0f69a16ad8b40e91cdc76e19547de2b078b66d3`). Install it by opening or dragging it into Claude Desktop. Claude displays the `MCP Scraper` install card, icon, and API-key configuration field from the bundle manifest.
85
91
 
86
92
  The MCPB install exposes the same web-intelligence tools as `mcp-scraper` plus all `browser_*` tools from `browser-agent` through one server.
87
93
 
@@ -189,15 +195,15 @@ env = { MCP_SCRAPER_API_KEY = "sk_live_your_key" }
189
195
 
190
196
  For accurate annotated videos, do not guess annotation times from a script. Start the replay, navigate until each target is visible and stable, call `browser_replay_mark` for each callout, then stop the replay and pass the returned annotations to `browser_replay_annotate` with the returned `source_width` and `source_height`.
191
197
 
192
- For US local SERP tools (`harvest_paa` and `search_serp`), keep `proxyMode` at the default `location` unless you are debugging. Location mode uses fresh residential proxy IDs across retries. When Google shows a CAPTCHA/challenge, browser-service sessions briefly wait for automatic challenge solving first, then rotate to a new proxy/session if the challenge does not clear. Proxy tunnel failure and wrong-location evidence are also retryable before returning.
198
+ For general SERP tools (`harvest_paa`, `search_serp`, and hosted SERP capture), omit `proxyMode` for normal use. The default is `configured`, which uses the configured browser-service proxy without city/ZIP targeting for the highest general success rate. Use `proxyMode: "location"` only when the user explicitly needs city/ZIP-targeted residential proxy evidence. When Google shows a CAPTCHA/challenge, browser-service sessions briefly wait for automatic challenge solving first, then rotate to a new proxy/session if the challenge does not clear. Proxy tunnel failure and wrong-location evidence are also retryable before returning.
193
199
 
194
200
  For Google Maps tools (`maps_search` and `directory_workflow`), keep `proxyMode` at the default `location` for US city/state work. Retryable Maps failures such as CAPTCHA, timeout, proxy tunnel failure, proxy unavailability, or browser-session death rotate to a new residential proxy and a new browser session for up to 5 attempts. Successful structured responses include sanitized attempt telemetry so callers can verify the proxy source, observed city/region, and attempt count without exposing full proxy or browser IDs.
195
201
 
196
202
  The MCPB bundle and `mcp-scraper-combined` expose both sections through one local MCP server. The split `mcp-scraper` entrypoint exposes only the web-intelligence tools, and the split `browser-agent` entrypoint exposes only the browser-agent tools.
197
203
 
198
- Chaining and planning tools (`maps_search`, `directory_workflow`, `workflow_list`, `workflow_suggest`, `workflow_run`, `workflow_status`, `workflow_artifact_read`, `rank_tracker_blueprint`, `map_site_urls`, `youtube_harvest`, `facebook_ad_search`, `facebook_page_intel`, `facebook_video_transcribe`) return `structuredContent` with the IDs, URLs, CSV paths, transcripts, artifacts, recipe fields, or blueprint fields needed by the next step. All tools carry MCP annotations (`readOnlyHint: true`; live-web tools use `openWorldHint: true`, while local planning and credit tools are closed-world/idempotent).
204
+ All local and hosted MCP tools expose output schemas and return `structuredContent` with the IDs, URLs, CSV paths, transcripts, browser session handles, replay paths, artifacts, recipe fields, or blueprint fields needed by the next step. Browser Agent tools keep a JSON text block for older clients, but structured data is the primary contract. All tools carry MCP annotations; file-writing tools such as replay downloads and annotations state their local file side effects.
199
205
 
200
- The hosted MCP endpoint at `https://mcpscraper.dev/mcp` exposes the 21 web-intelligence/workflow tools plus `capture_serp_snapshot` and `capture_serp_page_snapshots` (23 total). Browser-agent tools are local stdio tools backed by the REST API under `https://mcpscraper.dev/agent/*`.
206
+ The canonical tool inventory is generated at `docs/mcp-tool-manifest.generated.json`. The split local `mcp-scraper` stdio server exposes 22 web-intelligence/workflow tools. The split `browser-agent` stdio server exposes 17 browser tools. The combined local stdio server exposes 39 tools. The hosted MCP endpoint at `https://mcpscraper.dev/mcp` exposes the 22 web-intelligence/workflow tools plus `capture_serp_snapshot` and `capture_serp_page_snapshots` (24 total). Across all public local and hosted surfaces there are 41 unique tool names.
201
207
 
202
208
  ## Resources
203
209
 
@@ -223,7 +229,7 @@ Recommended config for update-friendly installs:
223
229
  npx -y -p mcp-scraper@latest mcp-scraper-combined
224
230
  ```
225
231
 
226
- This is an MCP stdio server command, not a human-facing terminal UI. If you run it directly, it appears to hang because it is waiting for JSON-RPC input from the MCP client. Use `npx -y -p mcp-scraper@latest mcp-scraper-install` when you want the visible installer and ASCII card.
232
+ This is context-aware: in a normal terminal it prints the visible installer and ASCII card; in an MCP client it runs as the silent stdio server. Use `--stdio` or `MCP_SCRAPER_FORCE_STDIO=1` if you need to force server mode from a terminal.
227
233
 
228
234
  Split-server config:
229
235
 
@@ -243,7 +249,7 @@ Users who do not update can keep using the tools their local package already adv
243
249
 
244
250
  ## Branded One-Click Installs
245
251
 
246
- Raw `npx` MCP server installs are command/config based. They do not provide a reliable user-facing install card, logo, or setup screen inside MCP clients. Use `mcp-scraper-install` for terminal onboarding text and the ASCII card. Do not print marketing text to stdout from an MCP server; stdout is reserved for JSON-RPC protocol messages.
252
+ Raw `npx` MCP server installs are command/config based. `mcp-scraper-combined` is context-aware: terminal TTY prints onboarding text and the ASCII card; MCP-client stdio pipes stay protocol-clean. Do not print marketing text to stdout from an active MCP stdio session; stdout is reserved for JSON-RPC protocol messages.
247
253
 
248
254
  For a branded Claude Desktop install, package MCP Scraper as an MCPB Desktop Extension. The repository now builds one combined MCPB bundle with a generated icon, `manifest.json`, bundled runtime dependencies, and `user_config` fields for API-key setup, API URL, and output folder.
249
255