mcp-scraper 0.3.10 → 0.3.11

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 (33) hide show
  1. package/README.md +2 -1
  2. package/dist/bin/api-server.cjs +30 -19
  3. package/dist/bin/api-server.cjs.map +1 -1
  4. package/dist/bin/api-server.js +1 -1
  5. package/dist/bin/browser-agent-stdio-server.cjs +9 -5
  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 +1 -1
  9. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  10. package/dist/bin/mcp-scraper-cli.js +1 -1
  11. package/dist/bin/mcp-scraper-combined-stdio-server.cjs +9 -5
  12. package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
  13. package/dist/bin/mcp-scraper-combined-stdio-server.js +3 -3
  14. package/dist/bin/mcp-scraper-install.cjs +1 -1
  15. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  16. package/dist/bin/mcp-scraper-install.js +1 -1
  17. package/dist/bin/mcp-stdio-server.cjs +1 -1
  18. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  19. package/dist/bin/mcp-stdio-server.js +2 -2
  20. package/dist/{chunk-QPFF3V2R.js → chunk-L27GJQV7.js} +10 -6
  21. package/dist/chunk-L27GJQV7.js.map +1 -0
  22. package/dist/chunk-RRE7WVHQ.js +7 -0
  23. package/dist/chunk-RRE7WVHQ.js.map +1 -0
  24. package/dist/{chunk-CED7X4WB.js → chunk-VMH7SRWY.js} +2 -2
  25. package/dist/{server-QTV2EUKA.js → server-3SA5Q4OF.js} +32 -21
  26. package/dist/{server-QTV2EUKA.js.map → server-3SA5Q4OF.js.map} +1 -1
  27. package/docs/mcp-tool-craft-lint.generated.md +1 -1
  28. package/docs/mcp-tool-manifest.generated.json +3 -3
  29. package/package.json +1 -1
  30. package/dist/chunk-NEGW2ZEJ.js +0 -7
  31. package/dist/chunk-NEGW2ZEJ.js.map +0 -1
  32. package/dist/chunk-QPFF3V2R.js.map +0 -1
  33. /package/dist/{chunk-CED7X4WB.js.map → chunk-VMH7SRWY.js.map} +0 -0
@@ -10,7 +10,7 @@ import {
10
10
  import "../chunk-LFATOGDF.js";
11
11
  import {
12
12
  PACKAGE_VERSION
13
- } from "../chunk-NEGW2ZEJ.js";
13
+ } from "../chunk-RRE7WVHQ.js";
14
14
 
15
15
  // src/cli/human-cli.ts
16
16
  import { Command } from "commander";
@@ -270,7 +270,7 @@ function browserServiceProfileSaveChanges() {
270
270
  }
271
271
 
272
272
  // src/version.ts
273
- var PACKAGE_VERSION = "0.3.10";
273
+ var PACKAGE_VERSION = "0.3.11";
274
274
 
275
275
  // src/mcp/browser-agent-tool-schemas.ts
276
276
  var import_zod = require("zod");
@@ -407,7 +407,7 @@ var BrowserCaptureFanoutInputSchema = {
407
407
  wait_ms: import_zod.z.number().int().min(0).max(18e4).optional().describe("How long to wait for the answer stream to finish before parsing. Defaults to 90000 when a prompt is sent, 8000 for passive capture. Capture ends as soon as the answer stream finishes."),
408
408
  first_party_domain: import_zod.z.string().optional().describe("The brand/site being researched, for example example.com. Sources on this domain are tagged First-party/vendor. Set this when the prompt is about a specific business."),
409
409
  reset: import_zod.z.boolean().default(false).describe("Clear any previously buffered stream for this page before capturing. Use when re-running to avoid mixing turns."),
410
- export: import_zod.z.boolean().default(false).describe("When true, write JSON, CSV, TSV exports (queries, citations, sources, domains) and a self-contained HTML report to MCP_SCRAPER_OUTPUT_DIR/fanout and return their paths.")
410
+ export: import_zod.z.boolean().default(false).describe("When true, write JSON, CSV, TSV exports (queries, citations, all sources, browsed-only sources, snippets, domains) and a self-contained HTML report to MCP_SCRAPER_OUTPUT_DIR/fanout, returning paths relative to MCP_SCRAPER_OUTPUT_DIR.")
411
411
  };
412
412
  var FanoutSourceOutput = import_zod.z.object({
413
413
  url: import_zod.z.string(),
@@ -449,15 +449,18 @@ var BrowserCaptureFanoutOutputSchema = {
449
449
  }).describe("Objective aggregates: top sourced sites by frequency, citation order, and URL-category counts."),
450
450
  first_party_domain: import_zod.z.string().nullable(),
451
451
  exports: import_zod.z.object({
452
+ relativeTo: import_zod.z.string(),
452
453
  dir: import_zod.z.string(),
453
454
  json: import_zod.z.string(),
454
455
  queriesCsv: import_zod.z.string(),
455
456
  queriesTsv: import_zod.z.string(),
456
457
  citationsCsv: import_zod.z.string(),
457
458
  sourcesCsv: import_zod.z.string(),
459
+ browsedOnlyCsv: import_zod.z.string(),
460
+ snippetsCsv: import_zod.z.string(),
458
461
  domainsCsv: import_zod.z.string(),
459
462
  report: import_zod.z.string()
460
- }).nullable().describe("Local file paths when export=true, otherwise null."),
463
+ }).nullable().describe("Relative export paths when export=true, otherwise null. Paths are relative to MCP_SCRAPER_OUTPUT_DIR, or ~/Downloads/mcp-scraper when that env var is not set."),
461
464
  debug: import_zod.z.object({
462
465
  interceptorReady: import_zod.z.boolean(),
463
466
  rawBytes: import_zod.z.number().int().min(0),
@@ -1515,7 +1518,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
1515
1518
  "browser_capture_fanout",
1516
1519
  {
1517
1520
  title: "Capture AI Search Fan-Out",
1518
- description: `Capture the query fan-out behind a ChatGPT or Claude web-search answer for Answer Engine Optimization (AEO): the exact sub-queries the model issued, every researched URL split into cited vs browsed-only (with citation frequency and snippet), each source tagged by category (First-party/vendor, News/media, Reddit, Social/video, Encyclopedia, Review site, Docs, Blog), plus top sourced sites and citation order. This returns the raw structured data; YOU analyze it \u2014 classify each sub-query by funnel stage (Problem-aware, Solution-aware, Decision-aware, Retention) and type (BoFu, Branded, Comparison, How-to, Search operator), name the brands the model researched, and give AEO insights. Sample asks: "capture the fan-out for this ChatGPT answer", "what did Claude search and cite for best CRM", "show the sub-queries and sources behind this AI answer". WRITE NOTE: passing prompt submits a real message in the user's logged-in account (a new conversation turn) \u2014 only send when the user wants that; omit prompt to capture a prompt the user just ran. Setup, if not already connected or if the profile disconnected: call browser_profile_onboard, give the user the watch_url, let them complete login, then call browser_profile_status until status is AUTHENTICATED. After that, browser_open the saved direct no-proxy profile and go to chatgpt.com or claude.ai. Fan-out is captured only as it streams, so the session must be open when the prompt runs. NOT for Google AI Overview citations \u2014 use harvest_paa for those; this tool is ChatGPT and Claude only.`,
1521
+ description: `Capture the query fan-out behind a ChatGPT or Claude web-search answer for Answer Engine Optimization (AEO): the exact sub-queries the model issued, every researched URL split into cited vs browsed-only (with citation frequency and snippet), each source tagged by category (First-party/vendor, News/media, Reddit, Social/video, Encyclopedia, Review site, Docs, Blog), plus top sourced sites and citation order. Set export=true for durable JSON, CSV, TSV, and HTML artifacts; export paths are returned relative to MCP_SCRAPER_OUTPUT_DIR. This returns the raw structured data; YOU analyze it \u2014 classify each sub-query by funnel stage (Problem-aware, Solution-aware, Decision-aware, Retention) and type (BoFu, Branded, Comparison, How-to, Search operator), name the brands the model researched, and give AEO insights. Sample asks: "capture the fan-out for this ChatGPT answer", "what did Claude search and cite for best CRM", "show the sub-queries and sources behind this AI answer". WRITE NOTE: passing prompt submits a real message in the user's logged-in account (a new conversation turn) \u2014 only send when the user wants that; omit prompt to capture a prompt the user just ran. Setup, if not already connected or if the profile disconnected: call browser_profile_onboard, give the user the watch_url, let them complete login, then call browser_profile_status until status is AUTHENTICATED. After that, browser_open the saved direct no-proxy profile and go to chatgpt.com or claude.ai. Fan-out is captured only as it streams, so the session must be open when the prompt runs. NOT for Google AI Overview citations \u2014 use harvest_paa for those; this tool is ChatGPT and Claude only.`,
1519
1522
  inputSchema: BrowserCaptureFanoutInputSchema,
1520
1523
  outputSchema: BrowserCaptureFanoutOutputSchema,
1521
1524
  annotations: annotations("Capture AI Search Fan-Out")
@@ -1544,7 +1547,8 @@ function registerBrowserAgentMcpTools(server2, opts) {
1544
1547
  prompt: input.prompt,
1545
1548
  wait_ms: input.wait_ms,
1546
1549
  first_party_domain: input.first_party_domain,
1547
- export: false
1550
+ reset: input.reset,
1551
+ export: input.export
1548
1552
  });
1549
1553
  if (!res.ok) return errorResult("browser_capture_fanout", res.data, input.session_id);
1550
1554
  const hosted = res.data?.result ?? res.data;