mcp-scraper 0.3.3 → 0.3.5

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 (37) hide show
  1. package/README.md +17 -29
  2. package/dist/bin/api-server.cjs +10 -5
  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 +32 -29
  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 +10 -11
  9. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  10. package/dist/bin/mcp-scraper-cli.js +10 -11
  11. package/dist/bin/mcp-scraper-cli.js.map +1 -1
  12. package/dist/bin/mcp-scraper-combined-stdio-server.cjs +39 -36
  13. package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
  14. package/dist/bin/mcp-scraper-combined-stdio-server.js +4 -4
  15. package/dist/bin/mcp-scraper-install.cjs +8 -8
  16. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  17. package/dist/bin/mcp-scraper-install.js +2 -2
  18. package/dist/bin/mcp-stdio-server.cjs +1 -1
  19. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  20. package/dist/bin/mcp-stdio-server.js +2 -2
  21. package/dist/{chunk-RLBJ3QNC.js → chunk-CMK5MMEE.js} +33 -30
  22. package/dist/chunk-CMK5MMEE.js.map +1 -0
  23. package/dist/chunk-GHBU5SGQ.js +7 -0
  24. package/dist/chunk-GHBU5SGQ.js.map +1 -0
  25. package/dist/{chunk-C3FGVJWH.js → chunk-RVYHP7QN.js} +8 -8
  26. package/dist/chunk-RVYHP7QN.js.map +1 -0
  27. package/dist/{chunk-MGWGZBL5.js → chunk-WZT3XKES.js} +2 -2
  28. package/dist/{server-D3XHIEQN.js → server-BC4Z2L4P.js} +12 -7
  29. package/dist/{server-D3XHIEQN.js.map → server-BC4Z2L4P.js.map} +1 -1
  30. package/docs/mcp-tool-craft-lint.generated.md +1 -1
  31. package/docs/mcp-tool-manifest.generated.json +21 -24
  32. package/package.json +1 -1
  33. package/dist/chunk-C3FGVJWH.js.map +0 -1
  34. package/dist/chunk-PVXDEREW.js +0 -7
  35. package/dist/chunk-PVXDEREW.js.map +0 -1
  36. package/dist/chunk-RLBJ3QNC.js.map +0 -1
  37. /package/dist/{chunk-MGWGZBL5.js.map → chunk-WZT3XKES.js.map} +0 -0
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.
@@ -36,11 +36,8 @@ Run setup checks and generate agent wiring:
36
36
 
37
37
  ```bash
38
38
  npx -y -p mcp-scraper@latest mcp-scraper-cli doctor
39
- npx -y -p mcp-scraper@latest mcp-scraper-cli browser profiles --email seo@example.com
40
- npx -y -p mcp-scraper@latest mcp-scraper-cli browser import-chrome --email seo@example.com --name seo-example-com
41
39
  MCP_SCRAPER_API_KEY=sk_live_your_key npx -y -p mcp-scraper@latest mcp-scraper-cli agent install claude --apply
42
40
  npx -y -p mcp-scraper@latest mcp-scraper-cli agent install codex
43
- npx -y -p mcp-scraper@latest mcp-scraper-cli agent install claude-desktop --browser-mode local --browser-profile seo-example-com
44
41
  npx -y -p mcp-scraper@latest mcp-scraper-cli agent prompt agent-packet
45
42
  ```
46
43
 
@@ -109,9 +106,7 @@ Claude Desktop:
109
106
  "args": ["-y", "-p", "mcp-scraper@latest", "mcp-scraper-combined"],
110
107
  "env": {
111
108
  "MCP_SCRAPER_API_KEY": "sk_live_your_key",
112
- "MCP_SCRAPER_BROWSER_MODE": "local",
113
- "MCP_SCRAPER_BROWSER_PROFILE": "work-accounts",
114
- "MCP_SCRAPER_BROWSER_EXECUTABLE": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
109
+ "BROWSER_AGENT_PROFILE_NAME": "work-accounts"
115
110
  }
116
111
  }
117
112
  }
@@ -120,20 +115,13 @@ Claude Desktop:
120
115
 
121
116
  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
117
 
123
- For local Chrome state, first clone a Chrome profile into MCP Scraper managed storage:
118
+ 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
119
 
125
- ```bash
126
- mcp-scraper-cli browser import-chrome --email you@example.com --name work-accounts
127
- MCP_SCRAPER_API_KEY=sk_live_your_key mcp-scraper-cli agent install claude --apply --browser-mode local --browser-profile work-accounts
128
- ```
129
-
130
- `browser import-chrome` copies the selected local Chrome profile into `~/.mcp-scraper/browser-profiles/<name>/user-data`, skipping cache and lock files. The managed clone can include cookies, local storage, history, session storage, and Chrome password database files. It does not upload the profile. Re-run `mcp-scraper-cli browser sync-profile <name>` after logging into new sites in normal Chrome.
131
-
132
- 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.
120
+ 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.
133
121
 
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.
122
+ `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
123
 
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.
124
+ Inside MCP clients, use `browser_profile_onboard` for customer setup and reconnects. The customer path does not import the user's local Chrome profile: it uses the hosted `watch_url` so the user controls the login session directly.
137
125
 
138
126
  Claude Code one-command setup:
139
127
 
@@ -213,11 +201,11 @@ env = { MCP_SCRAPER_API_KEY = "sk_live_your_key" }
213
201
 
214
202
  ### Browser-agent tools
215
203
 
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.
217
- - `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
- - `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
- - `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.
204
+ - `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`.
205
+ - `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.
206
+ - `browser_profile_list` — developer-only local Chrome profile metadata helper. Do not use for customer auth setup.
207
+ - `browser_profile_import` — developer-only local profile clone helper. Do not use for customer auth setup.
208
+ - `browser_profile_sync` — developer-only local profile refresh helper. Do not use for customer auth setup.
221
209
  - `browser_screenshot` — capture a screenshot plus visible text and clickable element center coordinates and DOM bounds.
222
210
  - `browser_read` — read the current page text and elements with center coordinates and DOM bounds, without an image.
223
211
  - `browser_locate` — locate exact visible DOM elements or text ranges and return screenshot-pixel bounds.
@@ -258,12 +246,12 @@ The `mcp-scraper` and `mcp-scraper-combined` NPX stdio servers also expose saved
258
246
  - `MCP_SCRAPER_OUTPUT_DIR` is optional and defaults to `~/Downloads/mcp-scraper`.
259
247
  - `MCP_SCRAPER_SAVE_REPORTS=false` disables automatic Markdown report files.
260
248
  - `MCP_SCRAPER_KEY_PATH` is optional. When no API key env var is set, the server also reads `~/.mcp-scraper-key` for compatibility with older installs.
261
- - `MCP_SCRAPER_BROWSER_MODE=local` makes `browser_open` use local Google Chrome instead of the hosted browser service.
262
- - `MCP_SCRAPER_BROWSER_PROFILE` sets the default managed local browser profile name created by `mcp-scraper-cli browser import-chrome`.
263
- - `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
- - `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
- - 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`.
249
+ - `MCP_SCRAPER_BROWSER_MODE=local` is a developer-only override that makes `browser_open` use local Google Chrome instead of the hosted browser service. Do not set this for customer AI visibility setup.
250
+ - `MCP_SCRAPER_BROWSER_PROFILE` is a developer-only local browser profile override. Hosted customer setup uses `BROWSER_AGENT_PROFILE_NAME` and `browser_profile_onboard`.
251
+ - `MCP_SCRAPER_BROWSER_EXECUTABLE` optionally points developer-only local browser mode at a Chrome executable.
252
+ - `MCP_SCRAPER_BROWSER_PROFILE_DIR` optionally points developer-only local browser mode at a direct Chrome-compatible user data directory.
253
+ - Instagram tools accept `browserMode` (`auto`, `hosted`, `local`) and `browserProfile`; local mode is developer-only.
254
+ - `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
255
  - `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
256
 
269
257
  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`.
@@ -22080,7 +22080,7 @@ var PACKAGE_VERSION;
22080
22080
  var init_version = __esm({
22081
22081
  "src/version.ts"() {
22082
22082
  "use strict";
22083
- PACKAGE_VERSION = "0.3.3";
22083
+ PACKAGE_VERSION = "0.3.5";
22084
22084
  }
22085
22085
  });
22086
22086
 
@@ -24800,11 +24800,16 @@ async function ensureProfile(k, name) {
24800
24800
  if (!isProfileConflict(err)) throw err;
24801
24801
  }
24802
24802
  }
24803
+ function explicitProxyId(value) {
24804
+ const trimmed = value?.trim();
24805
+ return trimmed || void 0;
24806
+ }
24803
24807
  async function createSession(opts = {}) {
24804
24808
  const k = client();
24805
- const resolvedProxyId = opts.proxyId ?? browserServiceProxyId();
24809
+ const resolvedProxyId = explicitProxyId(opts.proxyId);
24806
24810
  const resolvedProfileName = opts.profileName ?? browserServiceProfileName();
24807
24811
  const resolvedSaveProfileChanges = opts.saveProfileChanges ?? browserServiceProfileSaveChanges();
24812
+ const disableDefaultProxy = opts.disableDefaultProxy ?? !resolvedProxyId;
24808
24813
  if (resolvedProfileName && resolvedSaveProfileChanges === true) {
24809
24814
  await ensureProfile(k, resolvedProfileName);
24810
24815
  }
@@ -24820,7 +24825,7 @@ async function createSession(opts = {}) {
24820
24825
  } : {}
24821
24826
  });
24822
24827
  const runtimeSessionId = browser.session_id;
24823
- if (opts.disableDefaultProxy) {
24828
+ if (disableDefaultProxy) {
24824
24829
  try {
24825
24830
  await k.browsers.update(runtimeSessionId, { disable_default_proxy: true });
24826
24831
  } catch {
@@ -25221,7 +25226,7 @@ function buildBrowserAgentRoutes() {
25221
25226
  proxyId: typeof body.proxy_id === "string" ? body.proxy_id : void 0,
25222
25227
  profileName: typeof body.profile === "string" ? body.profile : void 0,
25223
25228
  saveProfileChanges: typeof body.save_profile_changes === "boolean" ? body.save_profile_changes : void 0,
25224
- disableDefaultProxy: body.disable_default_proxy === true,
25229
+ disableDefaultProxy: typeof body.disable_default_proxy === "boolean" ? body.disable_default_proxy : void 0,
25225
25230
  viewport: body.viewport && typeof body.viewport === "object" ? body.viewport : void 0
25226
25231
  });
25227
25232
  runtimeSessionId = created.runtimeSessionId;
@@ -25653,7 +25658,7 @@ async function selectSession(id) {
25653
25658
  }
25654
25659
 
25655
25660
  async function openSession() {
25656
- const r = await api('POST', '/sessions', { label: 'console' });
25661
+ const r = await api('POST', '/sessions', { label: 'console', disable_default_proxy: true });
25657
25662
  if (r.ok) { await refreshSessions(); selectSession(r.data.session_id); }
25658
25663
  else alert('Open failed: ' + JSON.stringify(r.data));
25659
25664
  }