mcp-scraper 0.26.2 → 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 +6 -4
- 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 +61 -27
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +64 -5
- package/dist/bin/mcp-stdio-server.js.map +1 -1
- 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-QO2TRJ3L.js → chunk-RPR5LDLS.js} +24 -48
- 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-K6ODZOZA.js → server-YXVSZ3T7.js} +323 -262
- package/dist/server-YXVSZ3T7.js.map +1 -0
- 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-QO2TRJ3L.js.map +0 -1
- package/dist/chunk-V37MZON3.js +0 -7
- package/dist/chunk-V37MZON3.js.map +0 -1
- package/dist/chunk-XGIPATLV.js.map +0 -1
- package/dist/server-K6ODZOZA.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
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
openWorkflowReport,
|
|
7
7
|
runWorkflow,
|
|
8
8
|
workflowOutputBaseDir
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-KAMKTSJQ.js";
|
|
10
10
|
import "../chunk-K443GQY5.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-ZQSHKWV4.js";
|
|
12
12
|
import {
|
|
13
13
|
PACKAGE_VERSION
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-O6KFDDRM.js";
|
|
15
15
|
|
|
16
16
|
// src/cli/human-cli.ts
|
|
17
17
|
import { Command } from "commander";
|
|
@@ -106,7 +106,7 @@ function renderInstallTerminal(options) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
// src/version.ts
|
|
109
|
-
var PACKAGE_VERSION = "0.
|
|
109
|
+
var PACKAGE_VERSION = "0.27.0";
|
|
110
110
|
|
|
111
111
|
// bin/mcp-scraper-install.ts
|
|
112
112
|
var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/install-terminal.ts","../../src/version.ts","../../bin/mcp-scraper-install.ts"],"sourcesContent":["export interface InstallTerminalOptions {\n color?: boolean\n version: string\n apiKeyConfigured?: boolean\n}\n\ntype Tone = 'cyan' | 'lime' | 'amber' | 'red' | 'muted' | 'bold'\n\nconst CODES: Record<Tone | 'reset', string> = {\n reset: '\\x1b[0m',\n cyan: '\\x1b[36m',\n lime: '\\x1b[32m',\n amber: '\\x1b[33m',\n red: '\\x1b[31m',\n muted: '\\x1b[90m',\n bold: '\\x1b[1m',\n}\n\nfunction colorize(value: string, tone: Tone, enabled: boolean): string {\n if (!enabled) return value\n return `${CODES[tone]}${value}${CODES.reset}`\n}\n\nfunction toolRow(label: string, tools: string[], enabled: boolean): string {\n const padded = label.padEnd(9, ' ')\n return ` ${colorize(padded, 'muted', enabled)} ${tools.join(colorize(' . ', 'muted', enabled))}`\n}\n\nexport function renderInstallTerminal(options: InstallTerminalOptions): string {\n const color = options.color ?? true\n const apiKeyValue = options.apiKeyConfigured ? '$MCP_SCRAPER_API_KEY' : 'sk_live_your_key'\n const ascii = String.raw`\n __ __ ____ ____ \n| \\/ |/ ___| _ \\\n| |\\/| | | | |_) |\n| | | | |___| __/\n|_| |_|\\____|_|\n\n ____ ____ ____ _ ____ _____ ____\n/ ___| / ___| _ \\ / \\ | _ \\| ____| _ \\\n\\___ \\| | | |_) | / _ \\ | |_) | _| | |_) |\n ___) | |___| _ < / ___ \\| __/| |___| _ <\n|____/ \\____|_| \\_\\/_/ \\_\\_| |_____|_| \\_\\\n`\n\n const claudeCommand = [\n `MCP_SCRAPER_API_KEY=${apiKeyValue} npx -y -p mcp-scraper@latest \\\\`,\n ' mcp-scraper-cli agent install claude --apply',\n ].join('\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper\"]',\n `env = { MCP_SCRAPER_API_KEY = \"${apiKeyValue}\" }`,\n ].join('\\n')\n\n return [\n colorize(`mcp-scraper v${options.version}`, 'bold', color),\n colorize('> mcp-scraper-install', 'muted', color),\n colorize(ascii, 'amber', color),\n `${colorize('MCP Scraper Agent', 'cyan', color)} . v${options.version} . mcpscraper.dev`,\n '1/1 install surfaces ready',\n colorize('Newest: any approved connection read can become an indexed Memory snapshot in one call. OAuth stays tenant-isolated and provider content is redacted and marked untrusted.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(163 MCP tools)', 'muted', color)}`,\n toolRow('search', ['harvest_paa', 'search_serp', 'maps_search', 'maps_place_intel'], color),\n toolRow('extract', ['extract_url', 'map_site_urls', 'extract_site', 'audit_site', 'directory_workflow'], color),\n toolRow('build', ['rank_tracker_workflow', 'cron plan', 'database prompt'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_ad_transcribe', 'facebook_video_transcribe', 'instagram_profile_content', 'instagram_media_download', 'reddit_thread'], color),\n toolRow('browser', ['browser_open', 'browser_profile_connect', 'browser_profile_list', 'browser_close', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('connect', ['list_service_connections', 'describe_service_connection_tool', 'import_service_connection_to_memory', 'export_connected_service_data', 'renew_connected_data_download', 'read_service_connection', 'call_service_connection_action'], color),\n toolRow('account', ['credits_info', 'reports', 'MCP resources'], color),\n toolRow('memory', ['memory-put', 'memory-get', 'memory-search', 'list-vaults', 'record-fact', 'list-scheduled-actions'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(MCP + CLI + API)', 'muted', color)}`,\n toolRow('route', ['workflow_list', 'workflow_suggest', 'workflow_run', 'workflow_step', 'workflow_status', 'workflow_artifact_read'], color),\n toolRow('seo', ['directory', 'agent-packet', 'competitive audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Run mcp-scraper-install for this visible card. Run mcp-scraper-cli for setup utilities and subcommands.',\n 'Run mcp-scraper in a human terminal to print this card; MCP clients get the same command as a silent stdio server.',\n 'Explicit card command: npx -y -p mcp-scraper@latest mcp-scraper-install',\n 'Hosted browser sessions use direct/no-proxy egress by default.',\n 'Customer auth setup: run browser_profile_connect, send the watch_url, let the user sign in, then call browser_profile_list until AUTHENTICATED.',\n 'Connected account ranges: call export_connected_service_data once. It handles Gmail, Calendar, Zoom, and Resend pagination; do not loop read_service_connection over individual records.',\n 'Connected account RAG: call import_service_connection_to_memory for one bounded approved read. It writes a redacted, untrusted snapshot to a stable Memory path and embeds it for search.',\n 'Stack logins / reconnect: run browser_profile_connect again with the same profile name and another domain to add accounts or refresh a login.',\n 'Start with workflow_suggest for broad jobs like market analysis, ICP research, CRO audits, brand briefs, content gaps, and AI visibility.',\n 'For MCP clients, use mcp-scraper so one install can mix SERP, Maps, browser, reports, and saved MCP resources.',\n 'If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.',\n '',\n `${colorize('Ready.', 'lime', color)} Install the combined MCP server with one command:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Hosted profile setup', 'amber', color),\n 'In your MCP client, call browser_profile_connect with email=\"seo@example.com\" and domain=\"chatgpt.com\".',\n 'Give the returned watch_url to the user. After they sign in, call browser_profile_list, then browser_open with the returned profile. Add more logins by calling browser_profile_connect again with the same profile and a new domain.',\n '',\n colorize('Claude Code one-command setup', 'amber', color),\n claudeCommand,\n 'Then fully exit Claude Code and open a new Claude terminal. Check with: claude mcp list',\n '',\n colorize('Codex config', 'amber', color),\n codexConfig,\n '',\n colorize('Claude Desktop Extension', 'amber', color),\n 'Download: https://mcpscraper.dev/downloads/mcp-scraper.mcpb',\n '',\n colorize('Safety note:', 'muted', color),\n 'mcp-scraper prints this card only when stdin/stdout are an interactive TTY. In MCP clients it writes only JSON-RPC to stdout.',\n 'Use --stdio or MCP_SCRAPER_FORCE_STDIO=1 to force server mode from a terminal.',\n '',\n ].join('\\n')\n}\n","export const PACKAGE_VERSION = '0.26.2'\n","#!/usr/bin/env node\nimport { renderInstallTerminal } from '../src/install-terminal.js'\nimport { PACKAGE_VERSION } from '../src/version.js'\n\nconst noColor =\n process.argv.includes('--no-color') ||\n process.env.NO_COLOR !== undefined ||\n process.env.FORCE_COLOR === '0' ||\n !process.stdout.isTTY\n\nconst help = process.argv.includes('--help') || process.argv.includes('-h')\nif (help) {\n process.stdout.write([\n 'Usage: mcp-scraper-install [--no-color]',\n '',\n 'Prints the branded MCP Scraper terminal install card and copyable install commands.',\n 'mcp-scraper prints the same card in a human terminal and runs as the MCP stdio server in clients.',\n '',\n ].join('\\n'))\n process.exit(0)\n}\n\nprocess.stdout.write(renderInstallTerminal({\n version: PACKAGE_VERSION,\n color: !noColor,\n apiKeyConfigured: Boolean(process.env.MCP_SCRAPER_API_KEY?.trim()),\n}))\n"],"mappings":";;;;AAQA,IAAM,QAAwC;AAAA,EAC5C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AACR;AAEA,SAAS,SAAS,OAAe,MAAY,SAA0B;AACrE,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,GAAG,MAAM,IAAI,CAAC,GAAG,KAAK,GAAG,MAAM,KAAK;AAC7C;AAEA,SAAS,QAAQ,OAAe,OAAiB,SAA0B;AACzE,QAAM,SAAS,MAAM,OAAO,GAAG,GAAG;AAClC,SAAO,KAAK,SAAS,QAAQ,SAAS,OAAO,CAAC,IAAI,MAAM,KAAK,SAAS,SAAS,SAAS,OAAO,CAAC,CAAC;AACnG;AAEO,SAAS,sBAAsB,SAAyC;AAC7E,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,cAAc,QAAQ,mBAAmB,yBAAyB;AACxE,QAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcrB,QAAM,gBAAgB;AAAA,IACpB,uBAAuB,WAAW;AAAA,IAClC;AAAA,EACF,EAAE,KAAK,IAAI;AAEX,QAA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AI,CAAC;AACZ,UAAQ,KAAK,CAAC;AAChB;AAEA,QAAQ,OAAO,MAAM,sBAAsB;AAAA,EACzC,SAAS;AAAA,EACT,OAAO,CAAC;AAAA,EACR,kBAAkB,QAAQ,QAAQ,IAAI,qBAAqB,KAAK,CAAC;AACnE,CAAC,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/install-terminal.ts","../../src/version.ts","../../bin/mcp-scraper-install.ts"],"sourcesContent":["export interface InstallTerminalOptions {\n color?: boolean\n version: string\n apiKeyConfigured?: boolean\n}\n\ntype Tone = 'cyan' | 'lime' | 'amber' | 'red' | 'muted' | 'bold'\n\nconst CODES: Record<Tone | 'reset', string> = {\n reset: '\\x1b[0m',\n cyan: '\\x1b[36m',\n lime: '\\x1b[32m',\n amber: '\\x1b[33m',\n red: '\\x1b[31m',\n muted: '\\x1b[90m',\n bold: '\\x1b[1m',\n}\n\nfunction colorize(value: string, tone: Tone, enabled: boolean): string {\n if (!enabled) return value\n return `${CODES[tone]}${value}${CODES.reset}`\n}\n\nfunction toolRow(label: string, tools: string[], enabled: boolean): string {\n const padded = label.padEnd(9, ' ')\n return ` ${colorize(padded, 'muted', enabled)} ${tools.join(colorize(' . ', 'muted', enabled))}`\n}\n\nexport function renderInstallTerminal(options: InstallTerminalOptions): string {\n const color = options.color ?? true\n const apiKeyValue = options.apiKeyConfigured ? '$MCP_SCRAPER_API_KEY' : 'sk_live_your_key'\n const ascii = String.raw`\n __ __ ____ ____ \n| \\/ |/ ___| _ \\\n| |\\/| | | | |_) |\n| | | | |___| __/\n|_| |_|\\____|_|\n\n ____ ____ ____ _ ____ _____ ____\n/ ___| / ___| _ \\ / \\ | _ \\| ____| _ \\\n\\___ \\| | | |_) | / _ \\ | |_) | _| | |_) |\n ___) | |___| _ < / ___ \\| __/| |___| _ <\n|____/ \\____|_| \\_\\/_/ \\_\\_| |_____|_| \\_\\\n`\n\n const claudeCommand = [\n `MCP_SCRAPER_API_KEY=${apiKeyValue} npx -y -p mcp-scraper@latest \\\\`,\n ' mcp-scraper-cli agent install claude --apply',\n ].join('\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper\"]',\n `env = { MCP_SCRAPER_API_KEY = \"${apiKeyValue}\" }`,\n ].join('\\n')\n\n return [\n colorize(`mcp-scraper v${options.version}`, 'bold', color),\n colorize('> mcp-scraper-install', 'muted', color),\n colorize(ascii, 'amber', color),\n `${colorize('MCP Scraper Agent', 'cyan', color)} . v${options.version} . mcpscraper.dev`,\n '1/1 install surfaces ready',\n colorize('Newest: any approved connection read can become an indexed Memory snapshot in one call. OAuth stays tenant-isolated and provider content is redacted and marked untrusted.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(163 MCP tools)', 'muted', color)}`,\n toolRow('search', ['harvest_paa', 'search_serp', 'maps_search', 'maps_place_intel'], color),\n toolRow('extract', ['extract_url', 'map_site_urls', 'extract_site', 'audit_site', 'directory_workflow'], color),\n toolRow('build', ['rank_tracker_workflow', 'cron plan', 'database prompt'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_ad_transcribe', 'facebook_video_transcribe', 'instagram_profile_content', 'instagram_media_download', 'reddit_thread'], color),\n toolRow('browser', ['browser_open', 'browser_profile_connect', 'browser_profile_list', 'browser_close', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('connect', ['list_service_connections', 'describe_service_connection_tool', 'import_service_connection_to_memory', 'export_connected_service_data', 'renew_connected_data_download', 'read_service_connection', 'call_service_connection_action'], color),\n toolRow('account', ['credits_info', 'reports', 'MCP resources'], color),\n toolRow('memory', ['memory-put', 'memory-get', 'memory-search', 'list-vaults', 'record-fact', 'list-scheduled-actions'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(MCP + CLI + API)', 'muted', color)}`,\n toolRow('route', ['workflow_list', 'workflow_suggest', 'workflow_run', 'workflow_step', 'workflow_status', 'workflow_artifact_read'], color),\n toolRow('seo', ['directory', 'agent-packet', 'competitive audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Run mcp-scraper-install for this visible card. Run mcp-scraper-cli for setup utilities and subcommands.',\n 'Run mcp-scraper in a human terminal to print this card; MCP clients get the same command as a silent stdio server.',\n 'Explicit card command: npx -y -p mcp-scraper@latest mcp-scraper-install',\n 'Hosted browser sessions use direct/no-proxy egress by default.',\n 'Customer auth setup: run browser_profile_connect, send the watch_url, let the user sign in, then call browser_profile_list until AUTHENTICATED.',\n 'Connected account ranges: call export_connected_service_data once. It handles Gmail, Calendar, Zoom, and Resend pagination; do not loop read_service_connection over individual records.',\n 'Connected account RAG: call import_service_connection_to_memory for one bounded approved read. It writes a redacted, untrusted snapshot to a stable Memory path and embeds it for search.',\n 'Stack logins / reconnect: run browser_profile_connect again with the same profile name and another domain to add accounts or refresh a login.',\n 'Start with workflow_suggest for broad jobs like market analysis, ICP research, CRO audits, brand briefs, content gaps, and AI visibility.',\n 'For MCP clients, use mcp-scraper so one install can mix SERP, Maps, browser, reports, and saved MCP resources.',\n 'If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.',\n '',\n `${colorize('Ready.', 'lime', color)} Install the combined MCP server with one command:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Hosted profile setup', 'amber', color),\n 'In your MCP client, call browser_profile_connect with email=\"seo@example.com\" and domain=\"chatgpt.com\".',\n 'Give the returned watch_url to the user. After they sign in, call browser_profile_list, then browser_open with the returned profile. Add more logins by calling browser_profile_connect again with the same profile and a new domain.',\n '',\n colorize('Claude Code one-command setup', 'amber', color),\n claudeCommand,\n 'Then fully exit Claude Code and open a new Claude terminal. Check with: claude mcp list',\n '',\n colorize('Codex config', 'amber', color),\n codexConfig,\n '',\n colorize('Claude Desktop Extension', 'amber', color),\n 'Download: https://mcpscraper.dev/downloads/mcp-scraper.mcpb',\n '',\n colorize('Safety note:', 'muted', color),\n 'mcp-scraper prints this card only when stdin/stdout are an interactive TTY. In MCP clients it writes only JSON-RPC to stdout.',\n 'Use --stdio or MCP_SCRAPER_FORCE_STDIO=1 to force server mode from a terminal.',\n '',\n ].join('\\n')\n}\n","export const PACKAGE_VERSION = '0.27.0'\n","#!/usr/bin/env node\nimport { renderInstallTerminal } from '../src/install-terminal.js'\nimport { PACKAGE_VERSION } from '../src/version.js'\n\nconst noColor =\n process.argv.includes('--no-color') ||\n process.env.NO_COLOR !== undefined ||\n process.env.FORCE_COLOR === '0' ||\n !process.stdout.isTTY\n\nconst help = process.argv.includes('--help') || process.argv.includes('-h')\nif (help) {\n process.stdout.write([\n 'Usage: mcp-scraper-install [--no-color]',\n '',\n 'Prints the branded MCP Scraper terminal install card and copyable install commands.',\n 'mcp-scraper prints the same card in a human terminal and runs as the MCP stdio server in clients.',\n '',\n ].join('\\n'))\n process.exit(0)\n}\n\nprocess.stdout.write(renderInstallTerminal({\n version: PACKAGE_VERSION,\n color: !noColor,\n apiKeyConfigured: Boolean(process.env.MCP_SCRAPER_API_KEY?.trim()),\n}))\n"],"mappings":";;;;AAQA,IAAM,QAAwC;AAAA,EAC5C,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,MAAM;AACR;AAEA,SAAS,SAAS,OAAe,MAAY,SAA0B;AACrE,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,GAAG,MAAM,IAAI,CAAC,GAAG,KAAK,GAAG,MAAM,KAAK;AAC7C;AAEA,SAAS,QAAQ,OAAe,OAAiB,SAA0B;AACzE,QAAM,SAAS,MAAM,OAAO,GAAG,GAAG;AAClC,SAAO,KAAK,SAAS,QAAQ,S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EACF,EAAE,KAAK,IAAI;AACb;;;ACnHO,IAAM,kBAAkB;;;ACI/B,IAAM,UACJ,QAAQ,KAAK,SAAS,YAAY,KAClC,QAAQ,IAAI,aAAa,UACzB,QAAQ,IAAI,gBAAgB,OAC5B,CAAC,QAAQ,OAAO;AAElB,IAAM,OAAO,QAAQ,KAAK,SAAS,QAAQ,KAAK,QAAQ,KAAK,SAAS,IAAI;AAC1E,IAAI,MAAM;AACR,UAAQ,OAAO,MAAM;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI,CAAC;AACZ,UAAQ,KAAK,CAAC;AAChB;AAEA,QAAQ,OAAO,MAAM,sBAAsB;AAAA,EACzC,SAAS;AAAA,EACT,OAAO,CAAC;AAAA,EACR,kBAAkB,QAAQ,QAAQ,IAAI,qBAAqB,KAAK,CAAC;AACnE,CAAC,CAAC;","names":[]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../chunk-TBRX7VOP.js";
|
|
5
5
|
import {
|
|
6
6
|
PACKAGE_VERSION
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-O6KFDDRM.js";
|
|
8
8
|
|
|
9
9
|
// bin/mcp-scraper-install.ts
|
|
10
10
|
var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
|
|
@@ -561,7 +561,7 @@ render();
|
|
|
561
561
|
}
|
|
562
562
|
|
|
563
563
|
// src/version.ts
|
|
564
|
-
var PACKAGE_VERSION = "0.
|
|
564
|
+
var PACKAGE_VERSION = "0.27.0";
|
|
565
565
|
|
|
566
566
|
// src/mcp/browser-agent-tool-schemas.ts
|
|
567
567
|
var import_zod = require("zod");
|
|
@@ -4800,7 +4800,10 @@ function formatMapsSearch(raw, input) {
|
|
|
4800
4800
|
const normalizedResults = results.map((result) => ({
|
|
4801
4801
|
...result,
|
|
4802
4802
|
phone: result.phone ?? null,
|
|
4803
|
-
hoursStatus: result.hoursStatus ?? null
|
|
4803
|
+
hoursStatus: result.hoursStatus ?? null,
|
|
4804
|
+
services: result.services ?? [],
|
|
4805
|
+
areasServed: result.areasServed ?? [],
|
|
4806
|
+
profileDetailsStatus: result.profileDetailsStatus ?? "unavailable"
|
|
4804
4807
|
}));
|
|
4805
4808
|
const searchQuery = d.searchQuery ?? [input.query, input.location].filter(Boolean).join(" ");
|
|
4806
4809
|
const requestedMax = d.requestedMaxResults ?? input.maxResults ?? 10;
|
|
@@ -4828,9 +4831,14 @@ ${meta}`;
|
|
|
4828
4831
|
|---|------|----------|--------|---------|-----|---------|------|
|
|
4829
4832
|
${rows}`,
|
|
4830
4833
|
metadataSection,
|
|
4834
|
+
results.some((result) => result.services?.length || result.areasServed?.length) ? `
|
|
4835
|
+
## Services and Areas Served
|
|
4836
|
+
${results.filter((result) => result.services?.length || result.areasServed?.length).map((result) => `### ${result.position}. ${result.name}
|
|
4837
|
+
${result.services?.length ? `- **Services:** ${result.services.join(", ")}` : ""}${result.areasServed?.length ? `
|
|
4838
|
+
- **Serves:** ${result.areasServed.join("; ")}` : ""}`).join("\n\n")}` : null,
|
|
4831
4839
|
`
|
|
4832
4840
|
---
|
|
4833
|
-
\u{1F4A1} **Next step:** use \`maps_place_intel\` with a selected business name and location
|
|
4841
|
+
\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.`,
|
|
4834
4842
|
durationMs != null ? `
|
|
4835
4843
|
*Extracted in ${(durationMs / 1e3).toFixed(1)}s*` : null
|
|
4836
4844
|
].filter(Boolean).join("\n");
|
|
@@ -5978,7 +5986,7 @@ var import_zod4 = require("zod");
|
|
|
5978
5986
|
// src/schemas.ts
|
|
5979
5987
|
var import_zod3 = require("zod");
|
|
5980
5988
|
var DEFAULT_PROXY_MODE = "none";
|
|
5981
|
-
var DEFAULT_MAPS_PROXY_MODE = "
|
|
5989
|
+
var DEFAULT_MAPS_PROXY_MODE = "none";
|
|
5982
5990
|
var HarvestOptionsSchema = import_zod3.z.object({
|
|
5983
5991
|
query: import_zod3.z.string().min(1),
|
|
5984
5992
|
location: import_zod3.z.string().optional(),
|
|
@@ -6020,6 +6028,7 @@ var MapsSearchOptionsSchema = import_zod3.z.object({
|
|
|
6020
6028
|
gl: import_zod3.z.string().length(2).default("us"),
|
|
6021
6029
|
hl: import_zod3.z.string().length(2).default("en"),
|
|
6022
6030
|
maxResults: import_zod3.z.number().int().min(1).max(50).default(10),
|
|
6031
|
+
includeServices: import_zod3.z.boolean().default(false),
|
|
6023
6032
|
proxyMode: import_zod3.z.enum(["location", "configured", "none"]).default(DEFAULT_MAPS_PROXY_MODE),
|
|
6024
6033
|
proxyZip: import_zod3.z.string().regex(/^\d{5}$/).optional(),
|
|
6025
6034
|
debug: import_zod3.z.boolean().default(false),
|
|
@@ -6251,8 +6260,9 @@ var MapsSearchInputSchema = {
|
|
|
6251
6260
|
gl: import_zod4.z.string().length(2).default("us").describe("Google country code inferred from location."),
|
|
6252
6261
|
hl: import_zod4.z.string().length(2).default("en").describe("Language inferred from user request."),
|
|
6253
6262
|
maxResults: import_zod4.z.number().int().min(1).max(50).default(10).describe("Number of candidates to return. Default 10, maximum 50."),
|
|
6254
|
-
|
|
6255
|
-
|
|
6263
|
+
includeServices: import_zod4.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."),
|
|
6264
|
+
proxyMode: import_zod4.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."),
|
|
6265
|
+
proxyZip: import_zod4.z.string().regex(/^\d{5}$/).optional().describe("Optional US ZIP override when proxyMode is location."),
|
|
6256
6266
|
debug: import_zod4.z.boolean().default(false).describe("Include sanitized browser/proxy diagnostics.")
|
|
6257
6267
|
};
|
|
6258
6268
|
var DirectoryWorkflowInputSchema = {
|
|
@@ -6266,7 +6276,7 @@ var DirectoryWorkflowInputSchema = {
|
|
|
6266
6276
|
includeZipGroups: import_zod4.z.boolean().default(true).describe("Attach ZIP groups from a configured US ZIPS CSV when available (MCP_SCRAPER_USZIPS_CSV_PATH or usZipsCsvPath)."),
|
|
6267
6277
|
usZipsCsvPath: import_zod4.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."),
|
|
6268
6278
|
saveCsv: import_zod4.z.boolean().default(true).describe("Save a directory-ready CSV of results to the MCP Scraper output directory and return its path."),
|
|
6269
|
-
proxyMode: import_zod4.z.enum(["location", "configured", "none"]).default(DEFAULT_MAPS_PROXY_MODE).describe("Proxy
|
|
6279
|
+
proxyMode: import_zod4.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."),
|
|
6270
6280
|
proxyZip: import_zod4.z.string().regex(/^\d{5}$/).optional().describe("Optional ZIP override for proxy targeting; normally omitted."),
|
|
6271
6281
|
debug: import_zod4.z.boolean().default(false).describe("Include sanitized browser/proxy diagnostics.")
|
|
6272
6282
|
};
|
|
@@ -6337,7 +6347,10 @@ var MapsSearchOutputSchema = {
|
|
|
6337
6347
|
hoursStatus: NullableString2,
|
|
6338
6348
|
websiteUrl: NullableString2,
|
|
6339
6349
|
directionsUrl: NullableString2,
|
|
6340
|
-
metadata: import_zod4.z.array(import_zod4.z.string())
|
|
6350
|
+
metadata: import_zod4.z.array(import_zod4.z.string()),
|
|
6351
|
+
services: import_zod4.z.array(import_zod4.z.string()).default([]),
|
|
6352
|
+
areasServed: import_zod4.z.array(import_zod4.z.string()).default([]),
|
|
6353
|
+
profileDetailsStatus: import_zod4.z.enum(["collected", "none_exist", "unavailable", "not_requested"]).default("unavailable")
|
|
6341
6354
|
})),
|
|
6342
6355
|
attempts: import_zod4.z.array(MapsSearchAttemptOutput),
|
|
6343
6356
|
durationMs: import_zod4.z.number().int().min(0)
|
|
@@ -8067,7 +8080,7 @@ function registerPaaExtractorMcpTools(server2, executor, options = {}) {
|
|
|
8067
8080
|
}, async (input) => formatMapsPlaceIntel(await executor.mapsPlaceIntel(input), input));
|
|
8068
8081
|
server2.registerTool("maps_search", {
|
|
8069
8082
|
title: "Google Maps Business Search",
|
|
8070
|
-
description: "Search Google
|
|
8083
|
+
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.",
|
|
8071
8084
|
inputSchema: MapsSearchInputSchema,
|
|
8072
8085
|
outputSchema: recordOutputSchema("maps_search", MapsSearchOutputSchema),
|
|
8073
8086
|
annotations: liveWebToolAnnotations("Google Maps Business Search")
|
|
@@ -10690,38 +10703,59 @@ function registerMemoryMcpTools(server2, executor) {
|
|
|
10690
10703
|
}
|
|
10691
10704
|
}
|
|
10692
10705
|
|
|
10693
|
-
// src/mcp/memory-mcp-tool-executor.ts
|
|
10694
|
-
var
|
|
10706
|
+
// src/mcp/hosted-memory-mcp-tool-executor.ts
|
|
10707
|
+
var publicToolNameByUpstreamName = new Map(
|
|
10708
|
+
MEMORY_TOOL_SCHEMAS.map((schema) => [schema.upstreamName, schema.id])
|
|
10709
|
+
);
|
|
10710
|
+
function parseJsonRpcEnvelope(text) {
|
|
10711
|
+
const payloads = text.split("\n").filter((line) => line.startsWith("data:")).map((line) => line.slice(5).trim()).filter(Boolean);
|
|
10712
|
+
if (!payloads.length) return JSON.parse(text);
|
|
10713
|
+
for (const payload of payloads) {
|
|
10714
|
+
const parsed = JSON.parse(payload);
|
|
10715
|
+
if (parsed.result || parsed.error) return parsed;
|
|
10716
|
+
}
|
|
10717
|
+
throw new Error("hosted MCP returned no JSON-RPC result");
|
|
10718
|
+
}
|
|
10719
|
+
function errorResult2(message) {
|
|
10720
|
+
return {
|
|
10721
|
+
content: [{ type: "text", text: JSON.stringify({ ok: false, error: message }) }],
|
|
10722
|
+
isError: true
|
|
10723
|
+
};
|
|
10724
|
+
}
|
|
10725
|
+
var HostedMemoryMcpToolExecutor = class {
|
|
10695
10726
|
baseUrl;
|
|
10696
10727
|
apiKey;
|
|
10697
10728
|
constructor(baseUrl2, apiKey2) {
|
|
10698
10729
|
this.baseUrl = baseUrl2.replace(/\/$/, "");
|
|
10699
10730
|
this.apiKey = apiKey2;
|
|
10700
10731
|
}
|
|
10701
|
-
async callMemoryTool(
|
|
10732
|
+
async callMemoryTool(upstreamName, args) {
|
|
10733
|
+
const publicToolName = publicToolNameByUpstreamName.get(upstreamName);
|
|
10734
|
+
if (!publicToolName) return errorResult2(`unknown memory tool: ${upstreamName}`);
|
|
10702
10735
|
try {
|
|
10703
|
-
const res = await fetch(`${this.baseUrl}/
|
|
10736
|
+
const res = await fetch(`${this.baseUrl}/mcp`, {
|
|
10704
10737
|
method: "POST",
|
|
10705
10738
|
headers: {
|
|
10706
10739
|
"content-type": "application/json",
|
|
10740
|
+
accept: "application/json, text/event-stream",
|
|
10707
10741
|
"x-api-key": this.apiKey
|
|
10708
10742
|
},
|
|
10709
|
-
body: JSON.stringify({
|
|
10743
|
+
body: JSON.stringify({
|
|
10744
|
+
jsonrpc: "2.0",
|
|
10745
|
+
id: `memory:${publicToolName}`,
|
|
10746
|
+
method: "tools/call",
|
|
10747
|
+
params: { name: publicToolName, arguments: args }
|
|
10748
|
+
})
|
|
10710
10749
|
});
|
|
10711
|
-
const
|
|
10712
|
-
if (!res.ok) {
|
|
10713
|
-
|
|
10714
|
-
|
|
10750
|
+
const text = await res.text();
|
|
10751
|
+
if (!res.ok) return errorResult2(`hosted memory ${publicToolName} failed (HTTP ${res.status})`);
|
|
10752
|
+
const envelope = parseJsonRpcEnvelope(text);
|
|
10753
|
+
if (envelope.error) {
|
|
10754
|
+
return errorResult2(envelope.error.message ?? `hosted memory ${publicToolName} failed`);
|
|
10715
10755
|
}
|
|
10716
|
-
|
|
10717
|
-
return {
|
|
10718
|
-
content: [{ type: "text", text: JSON.stringify(result) }],
|
|
10719
|
-
structuredContent: result,
|
|
10720
|
-
isError: false
|
|
10721
|
-
};
|
|
10756
|
+
return envelope.result ?? errorResult2(`hosted memory ${publicToolName} returned no result`);
|
|
10722
10757
|
} catch (err) {
|
|
10723
|
-
|
|
10724
|
-
return { content: [{ type: "text", text: message }], isError: true };
|
|
10758
|
+
return errorResult2(err instanceof Error ? err.message : `hosted memory ${publicToolName} call failed`);
|
|
10725
10759
|
}
|
|
10726
10760
|
}
|
|
10727
10761
|
};
|
|
@@ -10867,7 +10901,7 @@ var httpExecutor = new HttpMcpToolExecutor(baseUrl, apiKey);
|
|
|
10867
10901
|
registerPaaExtractorMcpTools(server, httpExecutor);
|
|
10868
10902
|
registerSerpIntelligenceCaptureTools(server, httpExecutor);
|
|
10869
10903
|
registerBrowserAgentMcpTools(server, { baseUrl, apiKey, consoleBaseUrl });
|
|
10870
|
-
registerMemoryMcpTools(server, new
|
|
10904
|
+
registerMemoryMcpTools(server, new HostedMemoryMcpToolExecutor(baseUrl, apiKey));
|
|
10871
10905
|
var transport = new import_stdio.StdioServerTransport();
|
|
10872
10906
|
async function main() {
|
|
10873
10907
|
await server.connect(transport);
|