mcp-scraper 0.3.7 → 0.3.9
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 +3 -3
- package/dist/bin/api-server.cjs +9 -4
- 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 +9 -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 +3 -3
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +3 -3
- package/dist/bin/mcp-scraper-cli.js.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs +10 -13
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.js +3 -3
- package/dist/bin/mcp-scraper-install.cjs +1 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.cjs +2 -2
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/chunk-7VNTN4Q7.js +7 -0
- package/dist/chunk-7VNTN4Q7.js.map +1 -0
- package/dist/{chunk-IWNLHCKA.js → chunk-BRUVQRJK.js} +10 -13
- package/dist/chunk-BRUVQRJK.js.map +1 -0
- package/dist/{chunk-2O7RAK6E.js → chunk-KDKQ5Y7V.js} +3 -3
- package/dist/{chunk-2O7RAK6E.js.map → chunk-KDKQ5Y7V.js.map} +1 -1
- package/dist/{server-HRVD52CX.js → server-ZSHE4R5Z.js} +10 -5
- package/dist/{server-HRVD52CX.js.map → server-ZSHE4R5Z.js.map} +1 -1
- package/docs/mcp-tool-craft-lint.generated.md +1 -1
- package/docs/mcp-tool-manifest.generated.json +10 -10
- package/package.json +1 -1
- package/dist/chunk-2NEVRPK3.js +0 -7
- package/dist/chunk-2NEVRPK3.js.map +0 -1
- package/dist/chunk-IWNLHCKA.js.map +0 -1
package/README.md
CHANGED
|
@@ -214,9 +214,9 @@ env = { MCP_SCRAPER_API_KEY = "sk_live_your_key" }
|
|
|
214
214
|
- `browser_replay_start` — start an MP4 replay. Returns `replay_id`, `view_url`, and `download_url` when available.
|
|
215
215
|
- `browser_replay_stop` — stop a replay. Returns the final `view_url` and `download_url`.
|
|
216
216
|
- `browser_list_replays` — list replay videos for a session.
|
|
217
|
-
- `browser_replay_download` — download and save the replay MP4
|
|
217
|
+
- `browser_replay_download` — download and save the replay MP4 under `MCP_SCRAPER_OUTPUT_DIR/browser-replays`.
|
|
218
218
|
- `browser_replay_mark` — while recording, locate a DOM target and return a replay-timed annotation object.
|
|
219
|
-
- `browser_replay_annotate` — download a replay MP4, render timed boxes, circles, underlines, arrows, and labels using annotation objects from `browser_replay_mark` or exact bounds from `browser_locate`, and save a new annotated MP4
|
|
219
|
+
- `browser_replay_annotate` — download a replay MP4, render timed boxes, circles, underlines, arrows, and labels using annotation objects from `browser_replay_mark` or exact bounds from `browser_locate`, and save a new annotated MP4 under `MCP_SCRAPER_OUTPUT_DIR/browser-replays`.
|
|
220
220
|
- `browser_close`
|
|
221
221
|
- `browser_list_sessions`
|
|
222
222
|
|
|
@@ -246,7 +246,7 @@ The `mcp-scraper` and `mcp-scraper-combined` NPX stdio servers also expose saved
|
|
|
246
246
|
- `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`.
|
|
247
247
|
- `BROWSER_AGENT_PROFILE_SAVE_CHANGES=true` is optional hosted setup behavior. It persists cookies and 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`.
|
|
248
248
|
|
|
249
|
-
Every web intelligence tool call made through `mcp-scraper` or `mcp-scraper-combined` saves a full Markdown report
|
|
249
|
+
Every web intelligence tool call made through `mcp-scraper` or `mcp-scraper-combined` saves a full Markdown report to disk 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`.
|
|
250
250
|
|
|
251
251
|
## Updating Existing Installs
|
|
252
252
|
|
package/dist/bin/api-server.cjs
CHANGED
|
@@ -21921,7 +21921,7 @@ var PACKAGE_VERSION;
|
|
|
21921
21921
|
var init_version = __esm({
|
|
21922
21922
|
"src/version.ts"() {
|
|
21923
21923
|
"use strict";
|
|
21924
|
-
PACKAGE_VERSION = "0.3.
|
|
21924
|
+
PACKAGE_VERSION = "0.3.9";
|
|
21925
21925
|
}
|
|
21926
21926
|
});
|
|
21927
21927
|
|
|
@@ -23073,7 +23073,7 @@ function buildPaaExtractorMcpServer(executor, options = {}) {
|
|
|
23073
23073
|
}
|
|
23074
23074
|
function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
23075
23075
|
const savesReports = options.savesReportsLocally !== false;
|
|
23076
|
-
const reportNote = savesReports ? " Saves a full Markdown report
|
|
23076
|
+
const reportNote = savesReports ? " Saves a full Markdown report to disk." : " Reports are returned inline; no files are saved on this hosted endpoint.";
|
|
23077
23077
|
const withReportNote = (description) => `${description}${reportNote}`;
|
|
23078
23078
|
if (savesReports) registerSavedReportResources(server);
|
|
23079
23079
|
server.registerTool("harvest_paa", {
|
|
@@ -24649,12 +24649,14 @@ async function createSession(opts = {}) {
|
|
|
24649
24649
|
const resolvedProfileName = opts.profileName ?? browserServiceProfileName();
|
|
24650
24650
|
const resolvedSaveProfileChanges = opts.saveProfileChanges ?? browserServiceProfileSaveChanges();
|
|
24651
24651
|
const disableDefaultProxy = opts.disableDefaultProxy ?? !resolvedProxyId;
|
|
24652
|
+
const startUrl = opts.startUrl?.trim();
|
|
24652
24653
|
if (resolvedProfileName && resolvedSaveProfileChanges === true) {
|
|
24653
24654
|
await ensureProfile(k, resolvedProfileName);
|
|
24654
24655
|
}
|
|
24655
|
-
const
|
|
24656
|
+
const createPayload = {
|
|
24656
24657
|
stealth: opts.stealth ?? true,
|
|
24657
24658
|
timeout_seconds: opts.timeoutSeconds ?? DEFAULT_TIMEOUT_SECONDS,
|
|
24659
|
+
...startUrl ? { start_url: startUrl } : {},
|
|
24658
24660
|
...resolvedProxyId ? { proxy_id: resolvedProxyId } : {},
|
|
24659
24661
|
...resolvedProfileName ? {
|
|
24660
24662
|
profile: {
|
|
@@ -24662,7 +24664,8 @@ async function createSession(opts = {}) {
|
|
|
24662
24664
|
...typeof resolvedSaveProfileChanges === "boolean" ? { save_changes: resolvedSaveProfileChanges } : {}
|
|
24663
24665
|
}
|
|
24664
24666
|
} : {}
|
|
24665
|
-
}
|
|
24667
|
+
};
|
|
24668
|
+
const browser = await k.browsers.create(createPayload);
|
|
24666
24669
|
const runtimeSessionId = browser.session_id;
|
|
24667
24670
|
if (disableDefaultProxy) {
|
|
24668
24671
|
try {
|
|
@@ -25049,6 +25052,7 @@ function buildBrowserAgentRoutes() {
|
|
|
25049
25052
|
}
|
|
25050
25053
|
const body = await c.req.json().catch(() => ({}));
|
|
25051
25054
|
const timeoutSeconds = typeof body.timeout_seconds === "number" ? body.timeout_seconds : void 0;
|
|
25055
|
+
const startUrl = typeof body.url === "string" ? body.url : void 0;
|
|
25052
25056
|
const gate = await acquireConcurrencyGate(user, "browser_agent_session", {
|
|
25053
25057
|
ttlSeconds: browserSessionLockTtlSeconds(timeoutSeconds),
|
|
25054
25058
|
metadata: { label: typeof body.label === "string" ? body.label : null }
|
|
@@ -25061,6 +25065,7 @@ function buildBrowserAgentRoutes() {
|
|
|
25061
25065
|
proxyId: typeof body.proxy_id === "string" ? body.proxy_id : void 0,
|
|
25062
25066
|
profileName: typeof body.profile === "string" ? body.profile : void 0,
|
|
25063
25067
|
saveProfileChanges: typeof body.save_profile_changes === "boolean" ? body.save_profile_changes : void 0,
|
|
25068
|
+
startUrl,
|
|
25064
25069
|
disableDefaultProxy: typeof body.disable_default_proxy === "boolean" ? body.disable_default_proxy : void 0,
|
|
25065
25070
|
viewport: body.viewport && typeof body.viewport === "object" ? body.viewport : void 0
|
|
25066
25071
|
});
|