mcp-scraper 0.3.4 → 0.3.6
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.
- package/README.md +10 -26
- package/dist/bin/api-server.cjs +7 -9
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/browser-agent-stdio-server.cjs +12 -12
- package/dist/bin/browser-agent-stdio-server.cjs.map +1 -1
- package/dist/bin/browser-agent-stdio-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +10 -11
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +10 -11
- package/dist/bin/mcp-scraper-cli.js.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs +19 -19
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.js +4 -4
- package/dist/bin/mcp-scraper-install.cjs +8 -8
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +2 -2
- package/dist/bin/mcp-stdio-server.cjs +1 -1
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/chunk-IHXHQL53.js +7 -0
- package/dist/chunk-IHXHQL53.js.map +1 -0
- package/dist/{chunk-YFR36CPB.js → chunk-ROZEDHAA.js} +2 -2
- package/dist/{chunk-C3FGVJWH.js → chunk-RVYHP7QN.js} +8 -8
- package/dist/chunk-RVYHP7QN.js.map +1 -0
- package/dist/{chunk-IZ3YH6HC.js → chunk-TK4D2BZ5.js} +13 -13
- package/dist/chunk-TK4D2BZ5.js.map +1 -0
- package/dist/{server-DU3W7QTG.js → server-YSKBD2VX.js} +9 -11
- package/dist/{server-DU3W7QTG.js.map → server-YSKBD2VX.js.map} +1 -1
- package/docs/mcp-tool-craft-lint.generated.md +1 -1
- package/docs/mcp-tool-manifest.generated.json +12 -15
- package/package.json +1 -1
- package/dist/chunk-BLB4CEFA.js +0 -7
- package/dist/chunk-BLB4CEFA.js.map +0 -1
- package/dist/chunk-C3FGVJWH.js.map +0 -1
- package/dist/chunk-IZ3YH6HC.js.map +0 -1
- /package/dist/{chunk-YFR36CPB.js.map → chunk-ROZEDHAA.js.map} +0 -0
package/README.md
CHANGED
|
@@ -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
|
-
"
|
|
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
|
}
|
|
@@ -124,20 +119,9 @@ For customer AI visibility setup, use the hosted profile connection flow. Open t
|
|
|
124
119
|
|
|
125
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.
|
|
126
121
|
|
|
127
|
-
Advanced local/developer mode can clone a Chrome profile into MCP Scraper managed storage:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
mcp-scraper-cli browser import-chrome --email you@example.com --name work-accounts
|
|
131
|
-
MCP_SCRAPER_API_KEY=sk_live_your_key mcp-scraper-cli agent install claude --apply --browser-mode local --browser-profile work-accounts
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
`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.
|
|
135
|
-
|
|
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.
|
|
137
|
-
|
|
138
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.
|
|
139
123
|
|
|
140
|
-
Inside MCP clients, use `browser_profile_onboard` for customer setup and reconnects.
|
|
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.
|
|
141
125
|
|
|
142
126
|
Claude Code one-command setup:
|
|
143
127
|
|
|
@@ -218,10 +202,10 @@ env = { MCP_SCRAPER_API_KEY = "sk_live_your_key" }
|
|
|
218
202
|
### Browser-agent tools
|
|
219
203
|
|
|
220
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`.
|
|
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.
|
|
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.
|
|
223
|
-
- `browser_profile_sync` — refresh an existing managed local profile clone from its recorded source Chrome profile.
|
|
224
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.
|
|
225
209
|
- `browser_screenshot` — capture a screenshot plus visible text and clickable element center coordinates and DOM bounds.
|
|
226
210
|
- `browser_read` — read the current page text and elements with center coordinates and DOM bounds, without an image.
|
|
227
211
|
- `browser_locate` — locate exact visible DOM elements or text ranges and return screenshot-pixel bounds.
|
|
@@ -262,11 +246,11 @@ The `mcp-scraper` and `mcp-scraper-combined` NPX stdio servers also expose saved
|
|
|
262
246
|
- `MCP_SCRAPER_OUTPUT_DIR` is optional and defaults to `~/Downloads/mcp-scraper`.
|
|
263
247
|
- `MCP_SCRAPER_SAVE_REPORTS=false` disables automatic Markdown report files.
|
|
264
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.
|
|
265
|
-
- `MCP_SCRAPER_BROWSER_MODE=local` makes `browser_open` use local Google Chrome instead of the hosted browser service.
|
|
266
|
-
- `MCP_SCRAPER_BROWSER_PROFILE`
|
|
267
|
-
- `MCP_SCRAPER_BROWSER_EXECUTABLE` optionally points local browser mode at a Chrome executable.
|
|
268
|
-
- `MCP_SCRAPER_BROWSER_PROFILE_DIR` optionally points local browser mode at a direct Chrome-compatible user data directory
|
|
269
|
-
- Instagram tools accept `browserMode` (`auto`, `hosted`, `local`) and `browserProfile`;
|
|
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.
|
|
270
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`.
|
|
271
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`.
|
|
272
256
|
|
package/dist/bin/api-server.cjs
CHANGED
|
@@ -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.
|
|
22083
|
+
PACKAGE_VERSION = "0.3.6";
|
|
22084
22084
|
}
|
|
22085
22085
|
});
|
|
22086
22086
|
|
|
@@ -24784,6 +24784,8 @@ var init_run_capture = __esm({
|
|
|
24784
24784
|
});
|
|
24785
24785
|
|
|
24786
24786
|
// src/services/browser-agent/browser-agent-service.ts
|
|
24787
|
+
function keepHostedBrowserAlive(_browser) {
|
|
24788
|
+
}
|
|
24787
24789
|
function client() {
|
|
24788
24790
|
const apiKey = browserServiceApiKey();
|
|
24789
24791
|
if (!apiKey) throw new Error("Browser backend API key is required");
|
|
@@ -24885,8 +24887,7 @@ async function goto(cdpWsUrl, url) {
|
|
|
24885
24887
|
await page.goto(url, { waitUntil: "domcontentloaded", timeout: 45e3 });
|
|
24886
24888
|
return { url: page.url(), title: await page.title() };
|
|
24887
24889
|
} finally {
|
|
24888
|
-
|
|
24889
|
-
});
|
|
24890
|
+
keepHostedBrowserAlive(browser);
|
|
24890
24891
|
}
|
|
24891
24892
|
}
|
|
24892
24893
|
async function captureFanout(cdpWsUrl, input) {
|
|
@@ -24896,8 +24897,7 @@ async function captureFanout(cdpWsUrl, input) {
|
|
|
24896
24897
|
const page = context.pages()[0] ?? await context.newPage();
|
|
24897
24898
|
return await runFanoutCapture(page, input);
|
|
24898
24899
|
} finally {
|
|
24899
|
-
|
|
24900
|
-
});
|
|
24900
|
+
keepHostedBrowserAlive(browser);
|
|
24901
24901
|
}
|
|
24902
24902
|
}
|
|
24903
24903
|
async function readPage(cdpWsUrl) {
|
|
@@ -24952,8 +24952,7 @@ async function readPage(cdpWsUrl) {
|
|
|
24952
24952
|
}))
|
|
24953
24953
|
};
|
|
24954
24954
|
} finally {
|
|
24955
|
-
|
|
24956
|
-
});
|
|
24955
|
+
keepHostedBrowserAlive(browser);
|
|
24957
24956
|
}
|
|
24958
24957
|
}
|
|
24959
24958
|
async function locatePageTargets(cdpWsUrl, targets) {
|
|
@@ -25095,8 +25094,7 @@ async function locatePageTargets(cdpWsUrl, targets) {
|
|
|
25095
25094
|
}, targets);
|
|
25096
25095
|
return { url, title, viewport: data.viewport, targets: data.targets };
|
|
25097
25096
|
} finally {
|
|
25098
|
-
|
|
25099
|
-
});
|
|
25097
|
+
keepHostedBrowserAlive(browser);
|
|
25100
25098
|
}
|
|
25101
25099
|
}
|
|
25102
25100
|
async function replayStart(runtimeSessionId) {
|