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
@@ -17,7 +17,7 @@ loadDotEnv();
17
17
  async function main() {
18
18
  const [{ serve }, { app }, { startWorker }, { migrate }] = await Promise.all([
19
19
  import("@hono/node-server"),
20
- import("../server-N5LM3PEO.js"),
20
+ import("../server-DU3W7QTG.js"),
21
21
  import("../worker-56IXWOQU.js"),
22
22
  import("../db-BE4JVB3V.js")
23
23
  ]);
@@ -1436,7 +1436,7 @@ var LocalBrowserAgentService = class {
1436
1436
  };
1437
1437
 
1438
1438
  // src/version.ts
1439
- var PACKAGE_VERSION = "0.3.2";
1439
+ var PACKAGE_VERSION = "0.3.4";
1440
1440
 
1441
1441
  // src/mcp/browser-agent-tool-schemas.ts
1442
1442
  var import_zod = require("zod");
@@ -1455,21 +1455,21 @@ var BrowserReplayBaseOutput = {
1455
1455
  var BrowserOpenInputSchema = {
1456
1456
  label: import_zod.z.string().optional().describe("Optional human label for this session, shown in the watch console."),
1457
1457
  url: import_zod.z.string().url().optional().describe("Optional URL to navigate to immediately after opening."),
1458
- profile: import_zod.z.string().optional().describe("Optional saved profile name to load a logged-in session for a site."),
1458
+ profile: import_zod.z.string().optional().describe("Optional saved hosted profile name to load a logged-in session for a site."),
1459
1459
  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."),
1460
- 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.")
1460
+ 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.")
1461
1461
  };
1462
1462
  var BrowserProfileListInputSchema = {
1463
1463
  email: import_zod.z.string().optional().describe("Optional Chrome account email or displayed profile name to filter for, for example seo@example.com."),
1464
1464
  user_data_dir: import_zod.z.string().optional().describe("Optional Chrome user data directory. Defaults to the current OS Chrome profile root.")
1465
1465
  };
1466
1466
  var BrowserProfileOnboardInputSchema = {
1467
- email: import_zod.z.string().optional().describe("Optional local Chrome account email to find and convert into a suggested Kernel profile name."),
1468
- profile: import_zod.z.string().optional().describe("Optional Kernel browser profile name to create/load. If omitted, email is used to derive one."),
1469
- 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."),
1470
- url: import_zod.z.string().url().optional().describe("Setup URL to open after creating the browser. Defaults to https://accounts.google.com/."),
1467
+ 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."),
1468
+ 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."),
1469
+ 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."),
1470
+ 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."),
1471
1471
  label: import_zod.z.string().optional().describe("Optional human label for this setup session."),
1472
- 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.")
1472
+ 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.")
1473
1473
  };
1474
1474
  var BrowserProfileImportInputSchema = {
1475
1475
  email: import_zod.z.string().optional().describe("Optional Chrome account email or displayed profile name to select from Chrome Local State."),
@@ -1580,7 +1580,7 @@ var BrowserListInputSchema = {
1580
1580
  include_closed: import_zod.z.boolean().default(false).describe("Include closed sessions in the list.")
1581
1581
  };
1582
1582
  var BrowserCaptureFanoutInputSchema = {
1583
- 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."),
1583
+ 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."),
1584
1584
  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."),
1585
1585
  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."),
1586
1586
  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."),
@@ -2211,7 +2211,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
2211
2211
  session_id: null,
2212
2212
  profiles,
2213
2213
  count: profiles.length,
2214
- hint: "Use browser_profile_import to clone one profile for local mode. Use browser_profile_onboard only for hosted Kernel profile setup."
2214
+ 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."
2215
2215
  });
2216
2216
  } catch (err) {
2217
2217
  return errorResult("browser_profile_list", { error: err instanceof Error ? err.message : String(err) });
@@ -2288,11 +2288,11 @@ function registerBrowserAgentMcpTools(server2, opts) {
2288
2288
  server2.registerTool(
2289
2289
  "browser_profile_onboard",
2290
2290
  {
2291
- title: "Onboard Hosted Browser Profile",
2292
- 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.",
2291
+ title: "Connect Hosted Browser Profile",
2292
+ 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.",
2293
2293
  inputSchema: BrowserProfileOnboardInputSchema,
2294
2294
  outputSchema: BrowserProfileOnboardOutputSchema,
2295
- annotations: annotations("Onboard Hosted Browser Profile")
2295
+ annotations: annotations("Connect Hosted Browser Profile")
2296
2296
  },
2297
2297
  async (input) => {
2298
2298
  let chromeProfile = null;
@@ -2309,11 +2309,12 @@ function registerBrowserAgentMcpTools(server2, opts) {
2309
2309
  error: "profile is required when no email match or BROWSER_AGENT_PROFILE_NAME is available"
2310
2310
  });
2311
2311
  }
2312
- const setupUrl = input.url ?? "https://accounts.google.com/";
2312
+ const setupUrl = input.url ?? "https://google.com/";
2313
2313
  const open = await req("POST", "/agent/sessions", {
2314
2314
  label: input.label ?? `Profile setup: ${profile}`,
2315
2315
  profile,
2316
2316
  save_profile_changes: true,
2317
+ disable_default_proxy: true,
2317
2318
  timeout_seconds: input.timeout_seconds
2318
2319
  });
2319
2320
  if (!open.ok) return errorResult("browser_profile_onboard", open.data);
@@ -2330,8 +2331,9 @@ function registerBrowserAgentMcpTools(server2, opts) {
2330
2331
  setup_url: setupUrl,
2331
2332
  chrome_profile: chromeProfile,
2332
2333
  next_steps: [
2333
- "Open the watch_url and complete the login manually.",
2334
- "After login is complete, call browser_close with this session_id to persist cookies and local storage to the Kernel profile.",
2334
+ "Open the watch_url and let the user click Sign in on Google.",
2335
+ "After the user confirms login is complete, call browser_close with this session_id to persist cookies and local storage to the saved profile.",
2336
+ "If the saved profile later shows login controls or disconnects, repeat browser_profile_onboard and close the setup session again.",
2335
2337
  "Use BROWSER_AGENT_PROFILE_NAME or browser_open.profile with this profile name for future authenticated sessions."
2336
2338
  ],
2337
2339
  raw: session
@@ -2342,7 +2344,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
2342
2344
  "browser_open",
2343
2345
  {
2344
2346
  title: "Open Browser Session",
2345
- 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.",
2347
+ 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.",
2346
2348
  inputSchema: BrowserOpenInputSchema,
2347
2349
  outputSchema: BrowserOpenOutputSchema,
2348
2350
  annotations: annotations("Open Browser Session")
@@ -2371,6 +2373,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
2371
2373
  label: input.label,
2372
2374
  ...profile ? { profile } : {},
2373
2375
  ...profile && typeof saveProfileChanges === "boolean" ? { save_profile_changes: saveProfileChanges } : {},
2376
+ disable_default_proxy: true,
2374
2377
  timeout_seconds: input.timeout_seconds
2375
2378
  });
2376
2379
  if (!open.ok) return errorResult("browser_open", open.data);
@@ -2908,7 +2911,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
2908
2911
  "browser_capture_fanout",
2909
2912
  {
2910
2913
  title: "Capture AI Search Fan-Out",
2911
- 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.`,
2914
+ 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.`,
2912
2915
  inputSchema: BrowserCaptureFanoutInputSchema,
2913
2916
  outputSchema: BrowserCaptureFanoutOutputSchema,
2914
2917
  annotations: annotations("Capture AI Search Fan-Out")