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
package/README.md CHANGED
@@ -9,7 +9,7 @@ Use the MCPB Desktop Extension for the branded Claude Desktop install, or use th
9
9
  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
- - `browser-agent` — agent-controlled browser tools for hosted cloud sessions or local Chrome profile mode, with screenshots, clicks, typing, scrolling, watch URLs, replay links, MP4 replay download, and local profile import/sync helpers.
12
+ - `browser-agent` — agent-controlled direct/no-proxy hosted browser sessions with screenshots, clicks, typing, scrolling, watch URLs, replay links, MP4 replay download, and saved profile setup for authenticated AI visibility workflows.
13
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
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.
@@ -120,7 +120,11 @@ Claude Desktop:
120
120
 
121
121
  Existing MCP configs that use only `npx -y mcp-scraper` still work for the web intelligence server, but they do not automatically add browser tools. Switch to `mcp-scraper-combined` or add the second `browser-agent` config entry if you want browser tools. Use `mcp-scraper@latest` to force npm to resolve the newest published package whenever the MCP client starts a fresh `npx` process.
122
122
 
123
- For local Chrome state, first clone a Chrome profile into MCP Scraper managed storage:
123
+ For customer AI visibility setup, use the hosted profile connection flow. Open the setup browser at Google, give the user the returned `watch_url`, have them click Sign in and complete login, then call `browser_close` to save cookies and local storage into the saved MCP Scraper profile. If the profile later disconnects or shows login controls, run the same setup flow again.
124
+
125
+ Browser-agent hosted sessions are direct/no-proxy by default. They do not inherit the configured SERP/Maps proxy. Use proxies for SERP/Maps tools when those tools need location or anti-bot handling, not for the interactive login browser.
126
+
127
+ Advanced local/developer mode can clone a Chrome profile into MCP Scraper managed storage:
124
128
 
125
129
  ```bash
126
130
  mcp-scraper-cli browser import-chrome --email you@example.com --name work-accounts
@@ -131,9 +135,9 @@ MCP_SCRAPER_API_KEY=sk_live_your_key mcp-scraper-cli agent install claude --appl
131
135
 
132
136
  Set `MCP_SCRAPER_BROWSER_MODE=local` and `MCP_SCRAPER_BROWSER_PROFILE=<name>` when you want `browser_open` to launch local Google Chrome against that managed clone. A `profile` argument passed directly to `browser_open` overrides the default for that one session. Instagram tools can use the same managed profile by passing `browserProfile=<name>` or by running the API with local browser mode configured.
133
137
 
134
- Hosted browser profiles are still available. `BROWSER_AGENT_PROFILE_NAME` sets the default saved Kernel browser profile for hosted sessions. For first-time hosted setup, set `BROWSER_AGENT_PROFILE_SAVE_CHANGES=true`, open a browser with the profile, complete login through the watch URL, then call `browser_close` to persist cookies/local storage into the hosted Kernel profile.
138
+ `BROWSER_AGENT_PROFILE_NAME` sets the default saved hosted browser profile for future sessions. For first-time setup, use `browser_profile_onboard`, open the returned `watch_url`, complete login in the hosted browser, then call `browser_close` to persist cookies/local storage into the saved profile.
135
139
 
136
- Inside MCP clients, use `browser_profile_list` to inspect local Chrome account/profile metadata, `browser_profile_import` to clone a profile for local browser mode, `browser_profile_sync` to refresh an existing clone, and `browser_profile_onboard` only for hosted Kernel setup.
140
+ Inside MCP clients, use `browser_profile_onboard` for customer setup and reconnects. `browser_profile_list`, `browser_profile_import`, and `browser_profile_sync` are local/developer helpers, not the normal customer auth path.
137
141
 
138
142
  Claude Code one-command setup:
139
143
 
@@ -213,11 +217,11 @@ env = { MCP_SCRAPER_API_KEY = "sk_live_your_key" }
213
217
 
214
218
  ### Browser-agent tools
215
219
 
216
- - `browser_open` — open a browser session. Hosted mode returns a human `watch_url`; local mode opens Google Chrome on this machine against an imported managed profile.
220
+ - `browser_open` — open a direct/no-proxy hosted browser session. Pass a saved profile name to load an authenticated session. Hosted mode returns a human `watch_url`.
217
221
  - `browser_profile_list` — list local Chrome account/profile metadata and suggested managed profile names. This does not read cookies, passwords, browsing history, or copy local Chrome state.
218
222
  - `browser_profile_import` — clone a local Chrome profile into `~/.mcp-scraper/browser-profiles` for local browser mode. This copies browser state files but skips cache and locks.
219
223
  - `browser_profile_sync` — refresh an existing managed local profile clone from its recorded source Chrome profile.
220
- - `browser_profile_onboard` — create or load a hosted Kernel browser profile and open a setup browser with profile saving enabled. The user logs in through the `watch_url`, then `browser_close` persists cookies/local storage into the hosted Kernel profile.
224
+ - `browser_profile_onboard` — create or load a saved hosted browser profile and open a direct/no-proxy setup browser at Google with profile saving enabled. The user clicks Sign in through the `watch_url`, then `browser_close` persists cookies/local storage into the saved profile. Use this again whenever the profile disconnects.
221
225
  - `browser_screenshot` — capture a screenshot plus visible text and clickable element center coordinates and DOM bounds.
222
226
  - `browser_read` — read the current page text and elements with center coordinates and DOM bounds, without an image.
223
227
  - `browser_locate` — locate exact visible DOM elements or text ranges and return screenshot-pixel bounds.
@@ -263,7 +267,7 @@ The `mcp-scraper` and `mcp-scraper-combined` NPX stdio servers also expose saved
263
267
  - `MCP_SCRAPER_BROWSER_EXECUTABLE` optionally points local browser mode at a Chrome executable. On macOS, Google Chrome is recommended so Keychain-backed Chrome state works.
264
268
  - `MCP_SCRAPER_BROWSER_PROFILE_DIR` optionally points local browser mode at a direct Chrome-compatible user data directory instead of a managed profile manifest.
265
269
  - Instagram tools accept `browserMode` (`auto`, `hosted`, `local`) and `browserProfile`; `browserProfile` uses the same managed local profiles created by `browser_profile_import/sync`.
266
- - `BROWSER_AGENT_PROFILE_NAME` is optional and sets the default saved Kernel browser profile for hosted-mode `browser-agent` and `mcp-scraper-combined` stdio sessions. Aliases: `BROWSER_SERVICE_PROFILE_NAME`, `KERNEL_BROWSER_PROFILE_NAME`, `KERNEL_PROFILE_NAME`.
270
+ - `BROWSER_AGENT_PROFILE_NAME` is optional and sets the default saved hosted browser profile for `browser-agent` and `mcp-scraper-combined` stdio sessions. Aliases: `BROWSER_SERVICE_PROFILE_NAME`, `KERNEL_BROWSER_PROFILE_NAME`, `KERNEL_PROFILE_NAME`.
267
271
  - `BROWSER_AGENT_PROFILE_SAVE_CHANGES=true` is optional hosted setup mode. It persists cookies and local storage back to the named profile when `browser_close` deletes the hosted browser session. Aliases: `BROWSER_SERVICE_PROFILE_SAVE_CHANGES`, `KERNEL_BROWSER_PROFILE_SAVE_CHANGES`, `KERNEL_PROFILE_SAVE_CHANGES`.
268
272
 
269
273
  Every web intelligence tool call made through `mcp-scraper` or `mcp-scraper-combined` saves a full Markdown report locally by default and returns the file path in the MCP response. The hosted `/mcp` endpoint returns reports inline only and never writes files. Browser replay downloads are saved by `browser_replay_download` under `MCP_SCRAPER_OUTPUT_DIR/browser-replays`.
@@ -15265,7 +15265,9 @@ ${headingSection}${kpoSection}${brandingSection}${bodySection}${screenshotSectio
15265
15265
  entityTypes: kpo?.type ?? [],
15266
15266
  napScore: kpo?.napScore ?? null,
15267
15267
  missingSchemaFields: kpo?.missingFields ?? [],
15268
- screenshotSaved: screenshotPath ?? null
15268
+ screenshotSaved: screenshotPath ?? null,
15269
+ branding: branding ?? null,
15270
+ mediaAssets: media?.assets ?? null
15269
15271
  };
15270
15272
  if (screenshotMeta?.base64) {
15271
15273
  return {
@@ -22078,7 +22080,7 @@ var PACKAGE_VERSION;
22078
22080
  var init_version = __esm({
22079
22081
  "src/version.ts"() {
22080
22082
  "use strict";
22081
- PACKAGE_VERSION = "0.3.2";
22083
+ PACKAGE_VERSION = "0.3.4";
22082
22084
  }
22083
22085
  });
22084
22086
 
@@ -24798,11 +24800,16 @@ async function ensureProfile(k, name) {
24798
24800
  if (!isProfileConflict(err)) throw err;
24799
24801
  }
24800
24802
  }
24803
+ function explicitProxyId(value) {
24804
+ const trimmed = value?.trim();
24805
+ return trimmed || void 0;
24806
+ }
24801
24807
  async function createSession(opts = {}) {
24802
24808
  const k = client();
24803
- const resolvedProxyId = opts.proxyId ?? browserServiceProxyId();
24809
+ const resolvedProxyId = explicitProxyId(opts.proxyId);
24804
24810
  const resolvedProfileName = opts.profileName ?? browserServiceProfileName();
24805
24811
  const resolvedSaveProfileChanges = opts.saveProfileChanges ?? browserServiceProfileSaveChanges();
24812
+ const disableDefaultProxy = opts.disableDefaultProxy ?? !resolvedProxyId;
24806
24813
  if (resolvedProfileName && resolvedSaveProfileChanges === true) {
24807
24814
  await ensureProfile(k, resolvedProfileName);
24808
24815
  }
@@ -24818,7 +24825,7 @@ async function createSession(opts = {}) {
24818
24825
  } : {}
24819
24826
  });
24820
24827
  const runtimeSessionId = browser.session_id;
24821
- if (opts.disableDefaultProxy) {
24828
+ if (disableDefaultProxy) {
24822
24829
  try {
24823
24830
  await k.browsers.update(runtimeSessionId, { disable_default_proxy: true });
24824
24831
  } catch {
@@ -25219,7 +25226,7 @@ function buildBrowserAgentRoutes() {
25219
25226
  proxyId: typeof body.proxy_id === "string" ? body.proxy_id : void 0,
25220
25227
  profileName: typeof body.profile === "string" ? body.profile : void 0,
25221
25228
  saveProfileChanges: typeof body.save_profile_changes === "boolean" ? body.save_profile_changes : void 0,
25222
- disableDefaultProxy: body.disable_default_proxy === true,
25229
+ disableDefaultProxy: typeof body.disable_default_proxy === "boolean" ? body.disable_default_proxy : void 0,
25223
25230
  viewport: body.viewport && typeof body.viewport === "object" ? body.viewport : void 0
25224
25231
  });
25225
25232
  runtimeSessionId = created.runtimeSessionId;
@@ -25651,7 +25658,7 @@ async function selectSession(id) {
25651
25658
  }
25652
25659
 
25653
25660
  async function openSession() {
25654
- const r = await api('POST', '/sessions', { label: 'console' });
25661
+ const r = await api('POST', '/sessions', { label: 'console', disable_default_proxy: true });
25655
25662
  if (r.ok) { await refreshSessions(); selectSession(r.data.session_id); }
25656
25663
  else alert('Open failed: ' + JSON.stringify(r.data));
25657
25664
  }