mcp-scraper 0.3.10 → 0.3.11
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 +2 -1
- package/dist/bin/api-server.cjs +30 -19
- 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 -5
- 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 +1 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs +9 -5
- 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 +1 -1
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/{chunk-QPFF3V2R.js → chunk-L27GJQV7.js} +10 -6
- package/dist/chunk-L27GJQV7.js.map +1 -0
- package/dist/chunk-RRE7WVHQ.js +7 -0
- package/dist/chunk-RRE7WVHQ.js.map +1 -0
- package/dist/{chunk-CED7X4WB.js → chunk-VMH7SRWY.js} +2 -2
- package/dist/{server-QTV2EUKA.js → server-3SA5Q4OF.js} +32 -21
- package/dist/{server-QTV2EUKA.js.map → server-3SA5Q4OF.js.map} +1 -1
- package/docs/mcp-tool-craft-lint.generated.md +1 -1
- package/docs/mcp-tool-manifest.generated.json +3 -3
- package/package.json +1 -1
- package/dist/chunk-NEGW2ZEJ.js +0 -7
- package/dist/chunk-NEGW2ZEJ.js.map +0 -1
- package/dist/chunk-QPFF3V2R.js.map +0 -1
- /package/dist/{chunk-CED7X4WB.js.map → chunk-VMH7SRWY.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-3SA5Q4OF.js"),
|
|
21
21
|
import("../worker-56IXWOQU.js"),
|
|
22
22
|
import("../db-BE4JVB3V.js")
|
|
23
23
|
]);
|
|
@@ -27,7 +27,7 @@ function browserServiceProfileSaveChanges() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/version.ts
|
|
30
|
-
var PACKAGE_VERSION = "0.3.
|
|
30
|
+
var PACKAGE_VERSION = "0.3.11";
|
|
31
31
|
|
|
32
32
|
// src/mcp/browser-agent-tool-schemas.ts
|
|
33
33
|
var import_zod = require("zod");
|
|
@@ -164,7 +164,7 @@ var BrowserCaptureFanoutInputSchema = {
|
|
|
164
164
|
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."),
|
|
165
165
|
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."),
|
|
166
166
|
reset: import_zod.z.boolean().default(false).describe("Clear any previously buffered stream for this page before capturing. Use when re-running to avoid mixing turns."),
|
|
167
|
-
export: import_zod.z.boolean().default(false).describe("When true, write JSON, CSV, TSV exports (queries, citations, sources, domains) and a self-contained HTML report to MCP_SCRAPER_OUTPUT_DIR/fanout
|
|
167
|
+
export: import_zod.z.boolean().default(false).describe("When true, write JSON, CSV, TSV exports (queries, citations, all sources, browsed-only sources, snippets, domains) and a self-contained HTML report to MCP_SCRAPER_OUTPUT_DIR/fanout, returning paths relative to MCP_SCRAPER_OUTPUT_DIR.")
|
|
168
168
|
};
|
|
169
169
|
var FanoutSourceOutput = import_zod.z.object({
|
|
170
170
|
url: import_zod.z.string(),
|
|
@@ -206,15 +206,18 @@ var BrowserCaptureFanoutOutputSchema = {
|
|
|
206
206
|
}).describe("Objective aggregates: top sourced sites by frequency, citation order, and URL-category counts."),
|
|
207
207
|
first_party_domain: import_zod.z.string().nullable(),
|
|
208
208
|
exports: import_zod.z.object({
|
|
209
|
+
relativeTo: import_zod.z.string(),
|
|
209
210
|
dir: import_zod.z.string(),
|
|
210
211
|
json: import_zod.z.string(),
|
|
211
212
|
queriesCsv: import_zod.z.string(),
|
|
212
213
|
queriesTsv: import_zod.z.string(),
|
|
213
214
|
citationsCsv: import_zod.z.string(),
|
|
214
215
|
sourcesCsv: import_zod.z.string(),
|
|
216
|
+
browsedOnlyCsv: import_zod.z.string(),
|
|
217
|
+
snippetsCsv: import_zod.z.string(),
|
|
215
218
|
domainsCsv: import_zod.z.string(),
|
|
216
219
|
report: import_zod.z.string()
|
|
217
|
-
}).nullable().describe("
|
|
220
|
+
}).nullable().describe("Relative export paths when export=true, otherwise null. Paths are relative to MCP_SCRAPER_OUTPUT_DIR, or ~/Downloads/mcp-scraper when that env var is not set."),
|
|
218
221
|
debug: import_zod.z.object({
|
|
219
222
|
interceptorReady: import_zod.z.boolean(),
|
|
220
223
|
rawBytes: import_zod.z.number().int().min(0),
|
|
@@ -1277,7 +1280,7 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
1277
1280
|
"browser_capture_fanout",
|
|
1278
1281
|
{
|
|
1279
1282
|
title: "Capture AI Search Fan-Out",
|
|
1280
|
-
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 complete login, then call browser_profile_status until status is AUTHENTICATED. 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.`,
|
|
1283
|
+
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. Set export=true for durable JSON, CSV, TSV, and HTML artifacts; export paths are returned relative to MCP_SCRAPER_OUTPUT_DIR. 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 complete login, then call browser_profile_status until status is AUTHENTICATED. 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.`,
|
|
1281
1284
|
inputSchema: BrowserCaptureFanoutInputSchema,
|
|
1282
1285
|
outputSchema: BrowserCaptureFanoutOutputSchema,
|
|
1283
1286
|
annotations: annotations("Capture AI Search Fan-Out")
|
|
@@ -1306,7 +1309,8 @@ function registerBrowserAgentMcpTools(server2, opts) {
|
|
|
1306
1309
|
prompt: input.prompt,
|
|
1307
1310
|
wait_ms: input.wait_ms,
|
|
1308
1311
|
first_party_domain: input.first_party_domain,
|
|
1309
|
-
|
|
1312
|
+
reset: input.reset,
|
|
1313
|
+
export: input.export
|
|
1310
1314
|
});
|
|
1311
1315
|
if (!res.ok) return errorResult("browser_capture_fanout", res.data, input.session_id);
|
|
1312
1316
|
const hosted = res.data?.result ?? res.data;
|