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.
- package/README.md +17 -29
- package/dist/bin/api-server.cjs +10 -5
- 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 +32 -29
- 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 +39 -36
- 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-RLBJ3QNC.js → chunk-CMK5MMEE.js} +33 -30
- package/dist/chunk-CMK5MMEE.js.map +1 -0
- package/dist/chunk-GHBU5SGQ.js +7 -0
- package/dist/chunk-GHBU5SGQ.js.map +1 -0
- package/dist/{chunk-C3FGVJWH.js → chunk-RVYHP7QN.js} +8 -8
- package/dist/chunk-RVYHP7QN.js.map +1 -0
- package/dist/{chunk-MGWGZBL5.js → chunk-WZT3XKES.js} +2 -2
- package/dist/{server-D3XHIEQN.js → server-BC4Z2L4P.js} +12 -7
- package/dist/{server-D3XHIEQN.js.map → server-BC4Z2L4P.js.map} +1 -1
- package/docs/mcp-tool-craft-lint.generated.md +1 -1
- package/docs/mcp-tool-manifest.generated.json +21 -24
- package/package.json +1 -1
- package/dist/chunk-C3FGVJWH.js.map +0 -1
- package/dist/chunk-PVXDEREW.js +0 -7
- package/dist/chunk-PVXDEREW.js.map +0 -1
- package/dist/chunk-RLBJ3QNC.js.map +0 -1
- /package/dist/{chunk-MGWGZBL5.js.map → chunk-WZT3XKES.js.map} +0 -0
package/dist/bin/api-server.js
CHANGED
|
@@ -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-
|
|
20
|
+
import("../server-BC4Z2L4P.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.
|
|
1439
|
+
var PACKAGE_VERSION = "0.3.5";
|
|
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
|
|
1468
|
-
profile: import_zod.z.string().optional().describe("Optional
|
|
1469
|
-
user_data_dir: import_zod.z.string().optional().describe("Optional Chrome
|
|
1470
|
-
url: import_zod.z.string().url().optional().describe("Setup URL to open after creating the browser. Defaults to https://
|
|
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
|
|
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."),
|
|
@@ -2196,11 +2196,11 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
2196
2196
|
server2.registerTool(
|
|
2197
2197
|
"browser_profile_list",
|
|
2198
2198
|
{
|
|
2199
|
-
title: "List Local Chrome Profiles",
|
|
2200
|
-
description: "List local Chrome profile metadata visible to this MCP server: account email, Chrome profile directory, local path, and a suggested managed browser profile name. This reads Chrome Local State only; it does not read cookies, passwords, browsing history, or copy local browser state.
|
|
2199
|
+
title: "Developer: List Local Chrome Profiles",
|
|
2200
|
+
description: "Developer/local-machine helper only. List local Chrome profile metadata visible to this MCP server: account email, Chrome profile directory, local path, and a suggested managed browser profile name. This reads Chrome Local State only; it does not read cookies, passwords, browsing history, or copy local browser state. Do not use this for customer AI visibility setup or reconnects; use browser_profile_onboard at Google and provide the hosted watch_url instead.",
|
|
2201
2201
|
inputSchema: BrowserProfileListInputSchema,
|
|
2202
2202
|
outputSchema: BrowserProfileListOutputSchema,
|
|
2203
|
-
annotations: annotations("List Local Chrome Profiles", true)
|
|
2203
|
+
annotations: annotations("Developer: List Local Chrome Profiles", true)
|
|
2204
2204
|
},
|
|
2205
2205
|
async (input) => {
|
|
2206
2206
|
try {
|
|
@@ -2211,7 +2211,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
2211
2211
|
session_id: null,
|
|
2212
2212
|
profiles,
|
|
2213
2213
|
count: profiles.length,
|
|
2214
|
-
hint: "
|
|
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) });
|
|
@@ -2221,11 +2221,11 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
2221
2221
|
server2.registerTool(
|
|
2222
2222
|
"browser_profile_import",
|
|
2223
2223
|
{
|
|
2224
|
-
title: "Import Local Chrome Profile",
|
|
2225
|
-
description: "Clone one local Chrome profile into MCP Scraper managed storage for local browser mode. This copies browser state files such as cookies, history, local storage, session storage, and password database metadata into ~/.mcp-scraper/browser-profiles by default; it skips cache and lock files and never prints cookie or password values.
|
|
2224
|
+
title: "Developer: Import Local Chrome Profile",
|
|
2225
|
+
description: "Developer/local-machine helper only. Clone one local Chrome profile into MCP Scraper managed storage for local browser mode. This copies browser state files such as cookies, history, local storage, session storage, and password database metadata into ~/.mcp-scraper/browser-profiles by default; it skips cache and lock files and never prints cookie or password values. Do not use this for customer AI visibility setup or reconnects; use browser_profile_onboard at Google and provide the hosted watch_url instead.",
|
|
2226
2226
|
inputSchema: BrowserProfileImportInputSchema,
|
|
2227
2227
|
outputSchema: BrowserProfileImportOutputSchema,
|
|
2228
|
-
annotations: { title: "Import Local Chrome Profile", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }
|
|
2228
|
+
annotations: { title: "Developer: Import Local Chrome Profile", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }
|
|
2229
2229
|
},
|
|
2230
2230
|
async (input) => {
|
|
2231
2231
|
try {
|
|
@@ -2250,7 +2250,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
2250
2250
|
"Restart the MCP client so it starts the local browser mode process.",
|
|
2251
2251
|
"Call browser_open with the same MCP server; it will open a local Chrome window using the cloned profile."
|
|
2252
2252
|
],
|
|
2253
|
-
hint: "
|
|
2253
|
+
hint: "Developer-only local clone. For customer auth setup, use browser_profile_onboard at Google, provide the hosted watch_url, then browser_close to save the hosted profile."
|
|
2254
2254
|
});
|
|
2255
2255
|
} catch (err) {
|
|
2256
2256
|
return errorResult("browser_profile_import", { error: err instanceof Error ? err.message : String(err) });
|
|
@@ -2260,11 +2260,11 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
2260
2260
|
server2.registerTool(
|
|
2261
2261
|
"browser_profile_sync",
|
|
2262
2262
|
{
|
|
2263
|
-
title: "Sync Local Chrome Profile",
|
|
2264
|
-
description: "Refresh an existing MCP Scraper managed local browser profile from the source Chrome profile recorded in its manifest. This overwrites the managed clone, copies browser state files again, skips cache and lock files, and never prints cookie or password values.",
|
|
2263
|
+
title: "Developer: Sync Local Chrome Profile",
|
|
2264
|
+
description: "Developer/local-machine helper only. Refresh an existing MCP Scraper managed local browser profile from the source Chrome profile recorded in its manifest. This overwrites the managed clone, copies browser state files again, skips cache and lock files, and never prints cookie or password values. Do not use this for customer AI visibility setup or reconnects; use browser_profile_onboard at Google and provide the hosted watch_url instead.",
|
|
2265
2265
|
inputSchema: BrowserProfileSyncInputSchema,
|
|
2266
2266
|
outputSchema: BrowserProfileSyncOutputSchema,
|
|
2267
|
-
annotations: { title: "Sync Local Chrome Profile", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }
|
|
2267
|
+
annotations: { title: "Developer: Sync Local Chrome Profile", readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false }
|
|
2268
2268
|
},
|
|
2269
2269
|
async (input) => {
|
|
2270
2270
|
try {
|
|
@@ -2278,7 +2278,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
2278
2278
|
session_id: null,
|
|
2279
2279
|
profile: result.profile,
|
|
2280
2280
|
source_profile: result.sourceProfile,
|
|
2281
|
-
hint: `
|
|
2281
|
+
hint: `Developer-only local clone refreshed for ${result.profile.name}. Customer reconnects should use browser_profile_onboard with the same hosted profile name.`
|
|
2282
2282
|
});
|
|
2283
2283
|
} catch (err) {
|
|
2284
2284
|
return errorResult("browser_profile_sync", { 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: "
|
|
2292
|
-
description: "Create or load a saved hosted
|
|
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("
|
|
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://
|
|
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
|
|
2334
|
-
"After login is complete, call browser_close with this session_id to persist cookies and local storage to the
|
|
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.
|
|
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
|
|
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")
|