mcp-scraper 0.3.2 → 0.3.4

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 (34) hide show
  1. package/README.md +11 -7
  2. package/dist/bin/api-server.cjs +13 -6
  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 +21 -18
  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 +24 -19
  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 +4 -2
  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-BLB4CEFA.js +7 -0
  21. package/dist/chunk-BLB4CEFA.js.map +1 -0
  22. package/dist/{chunk-HRTCMLZB.js → chunk-IZ3YH6HC.js} +22 -19
  23. package/dist/chunk-IZ3YH6HC.js.map +1 -0
  24. package/dist/{chunk-KO223PSJ.js → chunk-YFR36CPB.js} +5 -3
  25. package/dist/chunk-YFR36CPB.js.map +1 -0
  26. package/dist/{server-N5LM3PEO.js → server-DU3W7QTG.js} +12 -7
  27. package/dist/{server-N5LM3PEO.js.map → server-DU3W7QTG.js.map} +1 -1
  28. package/docs/mcp-tool-craft-lint.generated.md +1 -1
  29. package/docs/mcp-tool-manifest.generated.json +10 -10
  30. package/package.json +1 -1
  31. package/dist/chunk-HRTCMLZB.js.map +0 -1
  32. package/dist/chunk-KO223PSJ.js.map +0 -1
  33. package/dist/chunk-VB65G7PS.js +0 -7
  34. package/dist/chunk-VB65G7PS.js.map +0 -1
@@ -15,7 +15,7 @@ import {
15
15
  } from "../chunk-DUEW4EOO.js";
16
16
  import {
17
17
  PACKAGE_VERSION
18
- } from "../chunk-VB65G7PS.js";
18
+ } from "../chunk-BLB4CEFA.js";
19
19
 
20
20
  // src/cli/human-cli.ts
21
21
  import { Command } from "commander";
@@ -1679,7 +1679,7 @@ var LocalBrowserAgentService = class {
1679
1679
  };
1680
1680
 
1681
1681
  // src/version.ts
1682
- var PACKAGE_VERSION = "0.3.2";
1682
+ var PACKAGE_VERSION = "0.3.4";
1683
1683
 
1684
1684
  // src/mcp/browser-agent-tool-schemas.ts
1685
1685
  var import_zod = require("zod");
@@ -1698,21 +1698,21 @@ var BrowserReplayBaseOutput = {
1698
1698
  var BrowserOpenInputSchema = {
1699
1699
  label: import_zod.z.string().optional().describe("Optional human label for this session, shown in the watch console."),
1700
1700
  url: import_zod.z.string().url().optional().describe("Optional URL to navigate to immediately after opening."),
1701
- profile: import_zod.z.string().optional().describe("Optional saved profile name to load a logged-in session for a site."),
1701
+ profile: import_zod.z.string().optional().describe("Optional saved hosted profile name to load a logged-in session for a site."),
1702
1702
  save_profile_changes: import_zod.z.boolean().optional().describe("Persist cookies and local storage back to the named profile when the session is closed. Use this for profile setup or intentional auth refreshes; avoid parallel sessions writing to the same profile."),
1703
- timeout_seconds: import_zod.z.number().int().min(60).max(259200).optional().describe("How long the session may live before auto-termination. Defaults to 600. The browser idles into a zero-cost standby between actions, so a longer timeout is cheap.")
1703
+ timeout_seconds: import_zod.z.number().int().min(60).max(259200).optional().describe("How long the direct no-proxy browser session may live before auto-termination. Defaults to 600. The browser idles into a zero-cost standby between actions, so a longer timeout is cheap.")
1704
1704
  };
1705
1705
  var BrowserProfileListInputSchema = {
1706
1706
  email: import_zod.z.string().optional().describe("Optional Chrome account email or displayed profile name to filter for, for example seo@example.com."),
1707
1707
  user_data_dir: import_zod.z.string().optional().describe("Optional Chrome user data directory. Defaults to the current OS Chrome profile root.")
1708
1708
  };
1709
1709
  var BrowserProfileOnboardInputSchema = {
1710
- email: import_zod.z.string().optional().describe("Optional local Chrome account email to find and convert into a suggested Kernel profile name."),
1711
- profile: import_zod.z.string().optional().describe("Optional Kernel browser profile name to create/load. If omitted, email is used to derive one."),
1712
- user_data_dir: import_zod.z.string().optional().describe("Optional Chrome user data directory for email lookup. Defaults to the current OS Chrome profile root."),
1713
- url: import_zod.z.string().url().optional().describe("Setup URL to open after creating the browser. Defaults to https://accounts.google.com/."),
1710
+ email: import_zod.z.string().optional().describe("Optional account email used to derive a stable MCP Scraper profile name. This does not import cookies or browser state."),
1711
+ profile: import_zod.z.string().optional().describe("Optional saved MCP Scraper hosted browser profile name to create or load. If omitted, email is used to derive one."),
1712
+ user_data_dir: import_zod.z.string().optional().describe("Optional Chrome metadata directory for deriving a profile name only. This is not a local browser setup path."),
1713
+ url: import_zod.z.string().url().optional().describe("Setup URL to open after creating the direct no-proxy browser. Defaults to https://google.com/ so the user can click Sign in."),
1714
1714
  label: import_zod.z.string().optional().describe("Optional human label for this setup session."),
1715
- timeout_seconds: import_zod.z.number().int().min(60).max(259200).optional().describe("How long the setup session may live before auto-termination. Defaults to 600.")
1715
+ timeout_seconds: import_zod.z.number().int().min(60).max(259200).optional().describe("How long the direct no-proxy setup session may live before auto-termination. Defaults to 600.")
1716
1716
  };
1717
1717
  var BrowserProfileImportInputSchema = {
1718
1718
  email: import_zod.z.string().optional().describe("Optional Chrome account email or displayed profile name to select from Chrome Local State."),
@@ -1823,7 +1823,7 @@ var BrowserListInputSchema = {
1823
1823
  include_closed: import_zod.z.boolean().default(false).describe("Include closed sessions in the list.")
1824
1824
  };
1825
1825
  var BrowserCaptureFanoutInputSchema = {
1826
- session_id: import_zod.z.string().describe("The session id returned by browser_open or browser_list_sessions. The session must be a local-mode session on chatgpt.com or claude.ai that is logged in. Use only a returned session_id; do not construct one yourself."),
1826
+ session_id: import_zod.z.string().describe("The session id returned by browser_open or browser_list_sessions. The session must be on chatgpt.com or claude.ai and logged in through a saved hosted profile. Use only a returned session_id; do not construct one yourself."),
1827
1827
  prompt: import_zod.z.string().optional().describe("Optional prompt to type into the chat composer and submit before capturing. Omit to passively capture the fan-out of a prompt the user just ran in the visible browser. The prompt must trigger web search for there to be a fan-out."),
1828
1828
  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."),
1829
1829
  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."),
@@ -2449,7 +2449,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
2449
2449
  session_id: null,
2450
2450
  profiles,
2451
2451
  count: profiles.length,
2452
- hint: "Use browser_profile_import to clone one profile for local mode. Use browser_profile_onboard only for hosted Kernel profile setup."
2452
+ hint: "For customer auth setup, use browser_profile_onboard so the user signs in through the hosted watch_url. Local import is only for developer/local-machine mode."
2453
2453
  });
2454
2454
  } catch (err) {
2455
2455
  return errorResult("browser_profile_list", { error: err instanceof Error ? err.message : String(err) });
@@ -2526,11 +2526,11 @@ function registerBrowserAgentMcpTools(server2, opts) {
2526
2526
  server2.registerTool(
2527
2527
  "browser_profile_onboard",
2528
2528
  {
2529
- title: "Onboard Hosted Browser Profile",
2530
- description: "Create or load a saved hosted Kernel browser profile and open a live setup browser with profile saving enabled. Use this only for hosted browser mode. If email is provided, the tool reads local Chrome profile metadata only to suggest the Kernel profile name; it does not import local cookies. For local browser mode with real Chrome state, use browser_profile_import instead.",
2529
+ title: "Connect Hosted Browser Profile",
2530
+ description: "Create or load a saved MCP Scraper hosted browser profile and open a direct no-proxy setup browser with profile saving enabled. This is the customer auth setup and reconnect flow: open Google, give the user the watch_url, have them click Sign in and complete login, then call browser_close to save cookies and local storage. If a saved profile later shows login controls, run this same setup flow again. Do not use local Chrome import for this customer setup.",
2531
2531
  inputSchema: BrowserProfileOnboardInputSchema,
2532
2532
  outputSchema: BrowserProfileOnboardOutputSchema,
2533
- annotations: annotations("Onboard Hosted Browser Profile")
2533
+ annotations: annotations("Connect Hosted Browser Profile")
2534
2534
  },
2535
2535
  async (input) => {
2536
2536
  let chromeProfile = null;
@@ -2547,11 +2547,12 @@ function registerBrowserAgentMcpTools(server2, opts) {
2547
2547
  error: "profile is required when no email match or BROWSER_AGENT_PROFILE_NAME is available"
2548
2548
  });
2549
2549
  }
2550
- const setupUrl = input.url ?? "https://accounts.google.com/";
2550
+ const setupUrl = input.url ?? "https://google.com/";
2551
2551
  const open = await req("POST", "/agent/sessions", {
2552
2552
  label: input.label ?? `Profile setup: ${profile}`,
2553
2553
  profile,
2554
2554
  save_profile_changes: true,
2555
+ disable_default_proxy: true,
2555
2556
  timeout_seconds: input.timeout_seconds
2556
2557
  });
2557
2558
  if (!open.ok) return errorResult("browser_profile_onboard", open.data);
@@ -2568,8 +2569,9 @@ function registerBrowserAgentMcpTools(server2, opts) {
2568
2569
  setup_url: setupUrl,
2569
2570
  chrome_profile: chromeProfile,
2570
2571
  next_steps: [
2571
- "Open the watch_url and complete the login manually.",
2572
- "After login is complete, call browser_close with this session_id to persist cookies and local storage to the Kernel profile.",
2572
+ "Open the watch_url and let the user click Sign in on Google.",
2573
+ "After the user confirms login is complete, call browser_close with this session_id to persist cookies and local storage to the saved profile.",
2574
+ "If the saved profile later shows login controls or disconnects, repeat browser_profile_onboard and close the setup session again.",
2573
2575
  "Use BROWSER_AGENT_PROFILE_NAME or browser_open.profile with this profile name for future authenticated sessions."
2574
2576
  ],
2575
2577
  raw: session
@@ -2580,7 +2582,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
2580
2582
  "browser_open",
2581
2583
  {
2582
2584
  title: "Open Browser Session",
2583
- description: "Open a browser you can drive. By default this creates a hosted cloud browser with a watch_url; when MCP_SCRAPER_BROWSER_MODE=local it opens a local Google Chrome window against an imported MCP Scraper Chrome profile. Returns a session_id used by all other browser_* tools. In hosted mode, anti-bot stealth and automatic CAPTCHA/Cloudflare solving are on by default. Call browser_close when done.",
2585
+ description: "Open a direct no-proxy hosted browser session you can drive. Pass a saved profile name to load an authenticated session for a site. For customer login setup or reconnects, use browser_profile_onboard first so the user signs in through a watch_url, then call browser_close to save the profile. Returns a session_id used by all other browser_* tools.",
2584
2586
  inputSchema: BrowserOpenInputSchema,
2585
2587
  outputSchema: BrowserOpenOutputSchema,
2586
2588
  annotations: annotations("Open Browser Session")
@@ -2609,6 +2611,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
2609
2611
  label: input.label,
2610
2612
  ...profile ? { profile } : {},
2611
2613
  ...profile && typeof saveProfileChanges === "boolean" ? { save_profile_changes: saveProfileChanges } : {},
2614
+ disable_default_proxy: true,
2612
2615
  timeout_seconds: input.timeout_seconds
2613
2616
  });
2614
2617
  if (!open.ok) return errorResult("browser_open", open.data);
@@ -3146,7 +3149,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
3146
3149
  "browser_capture_fanout",
3147
3150
  {
3148
3151
  title: "Capture AI Search Fan-Out",
3149
- 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 done: import a logged-in session with browser_profile_import (local Chrome) or browser_profile_onboard (hosted Kernel), then browser_open and browser_goto 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.`,
3152
+ 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 click Sign in on Google, then call browser_close after they confirm login. 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.`,
3150
3153
  inputSchema: BrowserCaptureFanoutInputSchema,
3151
3154
  outputSchema: BrowserCaptureFanoutOutputSchema,
3152
3155
  annotations: annotations("Capture AI Search Fan-Out")
@@ -3677,7 +3680,9 @@ ${headingSection}${kpoSection}${brandingSection}${bodySection}${screenshotSectio
3677
3680
  entityTypes: kpo?.type ?? [],
3678
3681
  napScore: kpo?.napScore ?? null,
3679
3682
  missingSchemaFields: kpo?.missingFields ?? [],
3680
- screenshotSaved: screenshotPath ?? null
3683
+ screenshotSaved: screenshotPath ?? null,
3684
+ branding: branding ?? null,
3685
+ mediaAssets: media?.assets ?? null
3681
3686
  };
3682
3687
  if (screenshotMeta?.base64) {
3683
3688
  return {