mcp-scraper 0.26.3 → 0.27.0
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 +309 -270
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +3 -2
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.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 +22 -9
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +3 -3
- package/dist/bin/paa-harvest.cjs +2 -1
- package/dist/bin/paa-harvest.cjs.map +1 -1
- package/dist/bin/paa-harvest.js +2 -2
- package/dist/{chunk-FUWZWKGO.js → chunk-KAMKTSJQ.js} +2 -2
- package/dist/chunk-O6KFDDRM.js +7 -0
- package/dist/chunk-O6KFDDRM.js.map +1 -0
- package/dist/{chunk-73YM3DEB.js → chunk-RPR5LDLS.js} +22 -10
- package/dist/chunk-RPR5LDLS.js.map +1 -0
- package/dist/{chunk-E5J4HJBO.js → chunk-YH5DRFWQ.js} +4 -2
- package/dist/{chunk-XGIPATLV.js → chunk-ZQSHKWV4.js} +3 -2
- package/dist/chunk-ZQSHKWV4.js.map +1 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{server-GN34MGAE.js → server-YXVSZ3T7.js} +287 -261
- package/dist/{server-GN34MGAE.js.map → server-YXVSZ3T7.js.map} +1 -1
- package/dist/{worker-E3KHQH2F.js → worker-RYP5EOV5.js} +3 -3
- package/docs/mcp-tool-manifest.generated.json +37 -8
- package/package.json +1 -1
- package/dist/chunk-27VXTOD2.js +0 -7
- package/dist/chunk-27VXTOD2.js.map +0 -1
- package/dist/chunk-73YM3DEB.js.map +0 -1
- package/dist/chunk-XGIPATLV.js.map +0 -1
- /package/dist/{chunk-FUWZWKGO.js.map → chunk-KAMKTSJQ.js.map} +0 -0
- /package/dist/{chunk-E5J4HJBO.js.map → chunk-YH5DRFWQ.js.map} +0 -0
- /package/dist/{worker-E3KHQH2F.js.map → worker-RYP5EOV5.js.map} +0 -0
package/dist/bin/paa-harvest.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
harvest
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-YH5DRFWQ.js";
|
|
5
5
|
import {
|
|
6
6
|
browserServiceApiKey
|
|
7
7
|
} from "../chunk-MTSBI7ZH.js";
|
|
8
8
|
import "../chunk-K443GQY5.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-ZQSHKWV4.js";
|
|
10
10
|
import "../chunk-M2S27J6Z.js";
|
|
11
11
|
import "../chunk-ICT7DDHL.js";
|
|
12
12
|
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-K443GQY5.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_MAPS_PROXY_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZQSHKWV4.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/slugify.ts
|
|
9
9
|
function slugify(s) {
|
|
@@ -1925,4 +1925,4 @@ export {
|
|
|
1925
1925
|
runWorkflow,
|
|
1926
1926
|
runWorkflowStep
|
|
1927
1927
|
};
|
|
1928
|
-
//# sourceMappingURL=chunk-
|
|
1928
|
+
//# sourceMappingURL=chunk-KAMKTSJQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.27.0'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_MAPS_PROXY_MODE,
|
|
18
18
|
DEFAULT_PROXY_MODE
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZQSHKWV4.js";
|
|
20
20
|
import {
|
|
21
21
|
PACKAGE_VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O6KFDDRM.js";
|
|
23
23
|
import {
|
|
24
24
|
MC_PER_CREDIT
|
|
25
25
|
} from "./chunk-4767BA2O.js";
|
|
@@ -2420,7 +2420,10 @@ function formatMapsSearch(raw, input) {
|
|
|
2420
2420
|
const normalizedResults = results.map((result) => ({
|
|
2421
2421
|
...result,
|
|
2422
2422
|
phone: result.phone ?? null,
|
|
2423
|
-
hoursStatus: result.hoursStatus ?? null
|
|
2423
|
+
hoursStatus: result.hoursStatus ?? null,
|
|
2424
|
+
services: result.services ?? [],
|
|
2425
|
+
areasServed: result.areasServed ?? [],
|
|
2426
|
+
profileDetailsStatus: result.profileDetailsStatus ?? "unavailable"
|
|
2424
2427
|
}));
|
|
2425
2428
|
const searchQuery = d.searchQuery ?? [input.query, input.location].filter(Boolean).join(" ");
|
|
2426
2429
|
const requestedMax = d.requestedMaxResults ?? input.maxResults ?? 10;
|
|
@@ -2448,9 +2451,14 @@ ${meta}`;
|
|
|
2448
2451
|
|---|------|----------|--------|---------|-----|---------|------|
|
|
2449
2452
|
${rows}`,
|
|
2450
2453
|
metadataSection,
|
|
2454
|
+
results.some((result) => result.services?.length || result.areasServed?.length) ? `
|
|
2455
|
+
## Services and Areas Served
|
|
2456
|
+
${results.filter((result) => result.services?.length || result.areasServed?.length).map((result) => `### ${result.position}. ${result.name}
|
|
2457
|
+
${result.services?.length ? `- **Services:** ${result.services.join(", ")}` : ""}${result.areasServed?.length ? `
|
|
2458
|
+
- **Serves:** ${result.areasServed.join("; ")}` : ""}`).join("\n\n")}` : null,
|
|
2451
2459
|
`
|
|
2452
2460
|
---
|
|
2453
|
-
\u{1F4A1} **Next step:** use \`maps_place_intel\` with a selected business name and location
|
|
2461
|
+
\u{1F4A1} **Next step:** use \`maps_place_intel\` with a selected business name and location for full hours, review topics, and optional review cards. Set \`includeServices: true\` on this search to enrich the ranked list in one local-results session.`,
|
|
2454
2462
|
durationMs != null ? `
|
|
2455
2463
|
*Extracted in ${(durationMs / 1e3).toFixed(1)}s*` : null
|
|
2456
2464
|
].filter(Boolean).join("\n");
|
|
@@ -3600,8 +3608,9 @@ var MapsSearchInputSchema = {
|
|
|
3600
3608
|
gl: z.string().length(2).default("us").describe("Google country code inferred from location."),
|
|
3601
3609
|
hl: z.string().length(2).default("en").describe("Language inferred from user request."),
|
|
3602
3610
|
maxResults: z.number().int().min(1).max(50).default(10).describe("Number of candidates to return. Default 10, maximum 50."),
|
|
3603
|
-
|
|
3604
|
-
|
|
3611
|
+
includeServices: z.boolean().default(false).describe("Open each returned Google Business Profile and include configured services and areas served when available. Does not collect review cards."),
|
|
3612
|
+
proxyMode: z.enum(["location", "configured", "none"]).default(DEFAULT_MAPS_PROXY_MODE).describe("Leave unset for the default direct browser route. Google localization comes from the city in the query plus UULE, gl, and hl. location is an explicit residential-proxy override."),
|
|
3613
|
+
proxyZip: z.string().regex(/^\d{5}$/).optional().describe("Optional US ZIP override when proxyMode is location."),
|
|
3605
3614
|
debug: z.boolean().default(false).describe("Include sanitized browser/proxy diagnostics.")
|
|
3606
3615
|
};
|
|
3607
3616
|
var DirectoryWorkflowInputSchema = {
|
|
@@ -3615,7 +3624,7 @@ var DirectoryWorkflowInputSchema = {
|
|
|
3615
3624
|
includeZipGroups: z.boolean().default(true).describe("Attach ZIP groups from a configured US ZIPS CSV when available (MCP_SCRAPER_USZIPS_CSV_PATH or usZipsCsvPath)."),
|
|
3616
3625
|
usZipsCsvPath: z.string().optional().describe("Local/test-only path to a US ZIPS CSV (state_abbr, zipcode, county, city columns). Deployed APIs should use MCP_SCRAPER_USZIPS_CSV_PATH instead. For ZIP enrichment, set MCP_SCRAPER_USZIPS_CSV_PATH on the server, or pass this in local/test mode."),
|
|
3617
3626
|
saveCsv: z.boolean().default(true).describe("Save a directory-ready CSV of results to the MCP Scraper output directory and return its path."),
|
|
3618
|
-
proxyMode: z.enum(["location", "configured", "none"]).default(DEFAULT_MAPS_PROXY_MODE).describe("Proxy
|
|
3627
|
+
proxyMode: z.enum(["location", "configured", "none"]).default(DEFAULT_MAPS_PROXY_MODE).describe("Proxy behavior per city search. Leave unset for the direct localized Google route; location is an explicit residential-proxy override."),
|
|
3619
3628
|
proxyZip: z.string().regex(/^\d{5}$/).optional().describe("Optional ZIP override for proxy targeting; normally omitted."),
|
|
3620
3629
|
debug: z.boolean().default(false).describe("Include sanitized browser/proxy diagnostics.")
|
|
3621
3630
|
};
|
|
@@ -3686,7 +3695,10 @@ var MapsSearchOutputSchema = {
|
|
|
3686
3695
|
hoursStatus: NullableString,
|
|
3687
3696
|
websiteUrl: NullableString,
|
|
3688
3697
|
directionsUrl: NullableString,
|
|
3689
|
-
metadata: z.array(z.string())
|
|
3698
|
+
metadata: z.array(z.string()),
|
|
3699
|
+
services: z.array(z.string()).default([]),
|
|
3700
|
+
areasServed: z.array(z.string()).default([]),
|
|
3701
|
+
profileDetailsStatus: z.enum(["collected", "none_exist", "unavailable", "not_requested"]).default("unavailable")
|
|
3690
3702
|
})),
|
|
3691
3703
|
attempts: z.array(MapsSearchAttemptOutput),
|
|
3692
3704
|
durationMs: z.number().int().min(0)
|
|
@@ -5424,7 +5436,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
|
|
|
5424
5436
|
}, async (input) => formatMapsPlaceIntel(await executor.mapsPlaceIntel(input), input));
|
|
5425
5437
|
server.registerTool("maps_search", {
|
|
5426
5438
|
title: "Google Maps Business Search",
|
|
5427
|
-
description: "Search Google
|
|
5439
|
+
description: "Search Google local results for multiple businesses by category, niche, or local market \u2014 leads, prospects, competitors, or beyond the 3-pack. It paginates the rendered local-results list, opens each exact business card, then closes the profile dialog before continuing. Set includeServices for services and areas served; review cards are never collected by this tool.",
|
|
5428
5440
|
inputSchema: MapsSearchInputSchema,
|
|
5429
5441
|
outputSchema: recordOutputSchema("maps_search", MapsSearchOutputSchema),
|
|
5430
5442
|
annotations: liveWebToolAnnotations("Google Maps Business Search")
|
|
@@ -10018,4 +10030,4 @@ export {
|
|
|
10018
10030
|
MEMORY_TOOL_SCHEMAS,
|
|
10019
10031
|
registerMemoryMcpTools
|
|
10020
10032
|
};
|
|
10021
|
-
//# sourceMappingURL=chunk-
|
|
10033
|
+
//# sourceMappingURL=chunk-RPR5LDLS.js.map
|