mcp-scraper 0.2.13 → 0.2.15
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 +12 -2
- package/dist/bin/api-server.cjs +977 -200
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +3 -3
- package/dist/bin/browser-agent-stdio-server.cjs +1 -1
- 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 +46 -3
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +42 -2
- package/dist/bin/mcp-scraper-cli.js.map +1 -1
- package/dist/bin/mcp-scraper-combined-stdio-server.cjs +135 -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 +4 -3
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +4 -3
- package/dist/bin/mcp-scraper-install.js.map +1 -1
- package/dist/bin/mcp-stdio-server.cjs +135 -5
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/chunk-2CQXHSWC.js +7 -0
- package/dist/chunk-2CQXHSWC.js.map +1 -0
- package/dist/{chunk-ROS67BNV.js → chunk-BSYPATSM.js} +21 -2
- package/dist/chunk-BSYPATSM.js.map +1 -0
- package/dist/{chunk-AYTOCZBS.js → chunk-F44RBOJ5.js} +6 -3
- package/dist/chunk-F44RBOJ5.js.map +1 -0
- package/dist/{chunk-DKJ2XCY7.js → chunk-Q4DFONIK.js} +136 -6
- package/dist/chunk-Q4DFONIK.js.map +1 -0
- package/dist/{chunk-BQTWXY6G.js → chunk-TIPUIEJN.js} +2 -2
- package/dist/{chunk-7GCCOT3M.js → chunk-TL7YTFLH.js} +15 -1
- package/dist/chunk-TL7YTFLH.js.map +1 -0
- package/dist/{db-BVHYI57K.js → db-P5X6UQ3E.js} +2 -2
- package/dist/{server-LUNOI26E.js → server-VD2TD3AD.js} +773 -184
- package/dist/server-VD2TD3AD.js.map +1 -0
- package/dist/{worker-TDJQ6TH3.js → worker-OZSWIS3F.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-7GCCOT3M.js.map +0 -1
- package/dist/chunk-AYTOCZBS.js.map +0 -1
- package/dist/chunk-DKJ2XCY7.js.map +0 -1
- package/dist/chunk-RDROUQ4E.js +0 -7
- package/dist/chunk-RDROUQ4E.js.map +0 -1
- package/dist/chunk-ROS67BNV.js.map +0 -1
- package/dist/server-LUNOI26E.js.map +0 -1
- /package/dist/{chunk-BQTWXY6G.js.map → chunk-TIPUIEJN.js.map} +0 -0
- /package/dist/{db-BVHYI57K.js.map → db-P5X6UQ3E.js.map} +0 -0
- /package/dist/{worker-TDJQ6TH3.js.map → worker-OZSWIS3F.js.map} +0 -0
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
HttpMcpToolExecutor,
|
|
4
4
|
registerPaaExtractorMcpTools
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-Q4DFONIK.js";
|
|
6
6
|
import "../chunk-M2S27J6Z.js";
|
|
7
7
|
import {
|
|
8
8
|
registerBrowserAgentMcpTools
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-TIPUIEJN.js";
|
|
10
10
|
import {
|
|
11
11
|
PACKAGE_VERSION
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-2CQXHSWC.js";
|
|
13
13
|
|
|
14
14
|
// bin/mcp-scraper-combined-stdio-server.ts
|
|
15
15
|
import { readFileSync } from "fs";
|
|
@@ -54,11 +54,11 @@ function renderInstallTerminal(options) {
|
|
|
54
54
|
"1/1 install surfaces ready",
|
|
55
55
|
colorize("Newest: workflow skills for Maps comparison, SERP comparison, PAA expansion briefs, and AI Overview language guidance.", "lime", color),
|
|
56
56
|
"",
|
|
57
|
-
`${colorize("Tools", "cyan", color)} ${colorize("(
|
|
57
|
+
`${colorize("Tools", "cyan", color)} ${colorize("(33 MCP tools)", "muted", color)}`,
|
|
58
58
|
toolRow("search", ["harvest_paa", "search_serp", "maps_search", "maps_place_intel"], color),
|
|
59
59
|
toolRow("extract", ["extract_url", "map_site_urls", "extract_site", "directory_workflow"], color),
|
|
60
60
|
toolRow("build", ["rank_tracker_blueprint", "cron plan", "database prompt"], color),
|
|
61
|
-
toolRow("media", ["youtube_harvest", "youtube_transcribe", "facebook_ad_search", "facebook_page_intel"], color),
|
|
61
|
+
toolRow("media", ["youtube_harvest", "youtube_transcribe", "facebook_ad_search", "facebook_page_intel", "facebook_video_transcribe"], color),
|
|
62
62
|
toolRow("browser", ["browser_open", "browser_screenshot", "browser_read", "browser_locate", "browser_replay_mark", "browser_replay_annotate"], color),
|
|
63
63
|
toolRow("account", ["credits_info", "local reports", "MCP resources"], color),
|
|
64
64
|
`${colorize("Workflows", "cyan", color)} ${colorize("(CLI + API)", "muted", color)}`,
|
|
@@ -67,6 +67,7 @@ function renderInstallTerminal(options) {
|
|
|
67
67
|
colorize("Usage tips:", "amber", color),
|
|
68
68
|
"Start with mcp-scraper-cli doctor, then use workflow list or agent prompt agent-packet to hand an AI agent the right job shape.",
|
|
69
69
|
"For local SEO and directory work, use mcp-scraper-combined so one install can mix SERP, Maps, browser, reports, and saved MCP resources.",
|
|
70
|
+
"If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.",
|
|
70
71
|
"",
|
|
71
72
|
`${colorize("Ready.", "lime", color)} Install the combined MCP server with one of these paths:`,
|
|
72
73
|
"",
|
|
@@ -89,7 +90,7 @@ function renderInstallTerminal(options) {
|
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
// src/version.ts
|
|
92
|
-
var PACKAGE_VERSION = "0.2.
|
|
93
|
+
var PACKAGE_VERSION = "0.2.15";
|
|
93
94
|
|
|
94
95
|
// bin/mcp-scraper-install.ts
|
|
95
96
|
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 'claude mcp add mcp-scraper --scope user',\n ` --env MCP_SCRAPER_API_KEY=${apiKeyValue}`,\n ' -- npx -y -p mcp-scraper@latest mcp-scraper-combined',\n ].join(' \\\\\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper-combined\"]',\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: workflow skills for Maps comparison, SERP comparison, PAA expansion briefs, and AI Overview language guidance.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(
|
|
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 'claude mcp add mcp-scraper --scope user',\n ` --env MCP_SCRAPER_API_KEY=${apiKeyValue}`,\n ' -- npx -y -p mcp-scraper@latest mcp-scraper-combined',\n ].join(' \\\\\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper-combined\"]',\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: workflow skills for Maps comparison, SERP comparison, PAA expansion briefs, and AI Overview language guidance.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(33 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', 'directory_workflow'], color),\n toolRow('build', ['rank_tracker_blueprint', 'cron plan', 'database prompt'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_video_transcribe'], color),\n toolRow('browser', ['browser_open', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('account', ['credits_info', 'local reports', 'MCP resources'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(CLI + API)', 'muted', color)}`,\n toolRow('seo', ['directory', 'agent-packet', 'local audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Start with mcp-scraper-cli doctor, then use workflow list or agent prompt agent-packet to hand an AI agent the right job shape.',\n 'For local SEO and directory work, use mcp-scraper-combined 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 of these paths:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Claude Code', 'amber', color),\n claudeCommand,\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 'This installer can print terminal UI. MCP server commands stay silent so stdio JSON-RPC is not corrupted.',\n '',\n ].join('\\n')\n}\n","export const PACKAGE_VERSION = '0.2.15'\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 'Use mcp-scraper-combined, mcp-scraper, and browser-agent only as MCP stdio servers.',\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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AAY,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":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
PACKAGE_VERSION
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2CQXHSWC.js";
|
|
5
5
|
|
|
6
6
|
// src/install-terminal.ts
|
|
7
7
|
var CODES = {
|
|
@@ -56,11 +56,11 @@ function renderInstallTerminal(options) {
|
|
|
56
56
|
"1/1 install surfaces ready",
|
|
57
57
|
colorize("Newest: workflow skills for Maps comparison, SERP comparison, PAA expansion briefs, and AI Overview language guidance.", "lime", color),
|
|
58
58
|
"",
|
|
59
|
-
`${colorize("Tools", "cyan", color)} ${colorize("(
|
|
59
|
+
`${colorize("Tools", "cyan", color)} ${colorize("(33 MCP tools)", "muted", color)}`,
|
|
60
60
|
toolRow("search", ["harvest_paa", "search_serp", "maps_search", "maps_place_intel"], color),
|
|
61
61
|
toolRow("extract", ["extract_url", "map_site_urls", "extract_site", "directory_workflow"], color),
|
|
62
62
|
toolRow("build", ["rank_tracker_blueprint", "cron plan", "database prompt"], color),
|
|
63
|
-
toolRow("media", ["youtube_harvest", "youtube_transcribe", "facebook_ad_search", "facebook_page_intel"], color),
|
|
63
|
+
toolRow("media", ["youtube_harvest", "youtube_transcribe", "facebook_ad_search", "facebook_page_intel", "facebook_video_transcribe"], color),
|
|
64
64
|
toolRow("browser", ["browser_open", "browser_screenshot", "browser_read", "browser_locate", "browser_replay_mark", "browser_replay_annotate"], color),
|
|
65
65
|
toolRow("account", ["credits_info", "local reports", "MCP resources"], color),
|
|
66
66
|
`${colorize("Workflows", "cyan", color)} ${colorize("(CLI + API)", "muted", color)}`,
|
|
@@ -69,6 +69,7 @@ function renderInstallTerminal(options) {
|
|
|
69
69
|
colorize("Usage tips:", "amber", color),
|
|
70
70
|
"Start with mcp-scraper-cli doctor, then use workflow list or agent prompt agent-packet to hand an AI agent the right job shape.",
|
|
71
71
|
"For local SEO and directory work, use mcp-scraper-combined so one install can mix SERP, Maps, browser, reports, and saved MCP resources.",
|
|
72
|
+
"If you hit the concurrency limit, add an extra slot for $5/month with mcp-scraper-cli billing concurrency checkout.",
|
|
72
73
|
"",
|
|
73
74
|
`${colorize("Ready.", "lime", color)} Install the combined MCP server with one of these paths:`,
|
|
74
75
|
"",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/install-terminal.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 'claude mcp add mcp-scraper --scope user',\n ` --env MCP_SCRAPER_API_KEY=${apiKeyValue}`,\n ' -- npx -y -p mcp-scraper@latest mcp-scraper-combined',\n ].join(' \\\\\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper-combined\"]',\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: workflow skills for Maps comparison, SERP comparison, PAA expansion briefs, and AI Overview language guidance.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(
|
|
1
|
+
{"version":3,"sources":["../../src/install-terminal.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 'claude mcp add mcp-scraper --scope user',\n ` --env MCP_SCRAPER_API_KEY=${apiKeyValue}`,\n ' -- npx -y -p mcp-scraper@latest mcp-scraper-combined',\n ].join(' \\\\\\n')\n\n const codexConfig = [\n '[mcp_servers.mcp-scraper]',\n 'command = \"npx\"',\n 'args = [\"-y\", \"-p\", \"mcp-scraper@latest\", \"mcp-scraper-combined\"]',\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: workflow skills for Maps comparison, SERP comparison, PAA expansion briefs, and AI Overview language guidance.', 'lime', color),\n '',\n `${colorize('Tools', 'cyan', color)} ${colorize('(33 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', 'directory_workflow'], color),\n toolRow('build', ['rank_tracker_blueprint', 'cron plan', 'database prompt'], color),\n toolRow('media', ['youtube_harvest', 'youtube_transcribe', 'facebook_ad_search', 'facebook_page_intel', 'facebook_video_transcribe'], color),\n toolRow('browser', ['browser_open', 'browser_screenshot', 'browser_read', 'browser_locate', 'browser_replay_mark', 'browser_replay_annotate'], color),\n toolRow('account', ['credits_info', 'local reports', 'MCP resources'], color),\n `${colorize('Workflows', 'cyan', color)} ${colorize('(CLI + API)', 'muted', color)}`,\n toolRow('seo', ['directory', 'agent-packet', 'local audit', 'map/serp comparison', 'PAA/AIO briefs', 'scheduled runs'], color),\n '',\n colorize('Usage tips:', 'amber', color),\n 'Start with mcp-scraper-cli doctor, then use workflow list or agent prompt agent-packet to hand an AI agent the right job shape.',\n 'For local SEO and directory work, use mcp-scraper-combined 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 of these paths:`,\n '',\n colorize('Setup doctor', 'amber', color),\n 'npx -y -p mcp-scraper@latest mcp-scraper-cli doctor',\n '',\n colorize('Claude Code', 'amber', color),\n claudeCommand,\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 'This installer can print terminal UI. MCP server commands stay silent so stdio JSON-RPC is not corrupted.',\n '',\n ].join('\\n')\n}\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 'Use mcp-scraper-combined, mcp-scraper, and browser-agent only as MCP stdio servers.',\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;AAAA,IACA,+BAA+B,W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A,IACA;AAAA,IACA;AAAA,IACA,GAAG,SAAS,UAAU,QAAQ,KAAK,CAAC;AAAA,IACpC;AAAA,IACA,SAAS,gBAAgB,SAAS,KAAK;AAAA,IACvC;AAAA,IACA;AAAA,IACA,SAAS,eAAe,SAAS,KAAK;AAAA,IACtC;AAAA,IACA;AAAA,IACA,SAAS,gBAAgB,SAAS,KAAK;AAAA,IACvC;AAAA,IACA;AAAA,IACA,SAAS,4BAA4B,SAAS,KAAK;AAAA,IACnD;AAAA,IACA;AAAA,IACA,SAAS,gBAAgB,SAAS,KAAK;AAAA,IACvC;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;;;AC/FA,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":[]}
|
|
@@ -107,6 +107,9 @@ var HttpMcpToolExecutor = class {
|
|
|
107
107
|
facebookAdTranscribe(input) {
|
|
108
108
|
return this.call("/facebook/transcribe", input);
|
|
109
109
|
}
|
|
110
|
+
facebookVideoTranscribe(input) {
|
|
111
|
+
return this.call("/facebook/video-transcribe", input, this.httpTimeoutOverrideMs ?? 24e4);
|
|
112
|
+
}
|
|
110
113
|
mapsPlaceIntel(input) {
|
|
111
114
|
return this.call("/maps/place", input);
|
|
112
115
|
}
|
|
@@ -136,7 +139,7 @@ var import_node_fs2 = require("fs");
|
|
|
136
139
|
var import_node_path2 = require("path");
|
|
137
140
|
|
|
138
141
|
// src/version.ts
|
|
139
|
-
var PACKAGE_VERSION = "0.2.
|
|
142
|
+
var PACKAGE_VERSION = "0.2.15";
|
|
140
143
|
|
|
141
144
|
// src/mcp/mcp-response-formatter.ts
|
|
142
145
|
var import_node_fs = require("fs");
|
|
@@ -778,6 +781,8 @@ function formatCreditsInfo(raw, input) {
|
|
|
778
781
|
const costs = d.costs ?? [];
|
|
779
782
|
const matched = d.matched_cost;
|
|
780
783
|
const ledger = d.ledger ?? [];
|
|
784
|
+
const concurrencyRaw = d.concurrency;
|
|
785
|
+
const upgradeRaw = concurrencyRaw?.upgrade;
|
|
781
786
|
const costRows = costs.map((c) => {
|
|
782
787
|
const notes = c.notes ? ` ${c.notes}` : "";
|
|
783
788
|
return `| ${c.label} | ${c.credits} | ${c.unit}${notes} |`;
|
|
@@ -793,10 +798,20 @@ function formatCreditsInfo(raw, input) {
|
|
|
793
798
|
${matched.notes}` : ""}` : input.item ? `
|
|
794
799
|
## Matched Cost
|
|
795
800
|
No exact cost match found for "${input.item}". See the full cost table below.` : "";
|
|
801
|
+
const concurrencySection = concurrencyRaw ? [
|
|
802
|
+
`
|
|
803
|
+
## Concurrency`,
|
|
804
|
+
`**Current limit:** ${concurrencyRaw.current_limit ?? "unknown"} concurrent operation${concurrencyRaw.current_limit === 1 ? "" : "s"}`,
|
|
805
|
+
`**Extra slots:** ${concurrencyRaw.current_extra_slots ?? "unknown"}`,
|
|
806
|
+
`**Extra concurrency slot:** ${upgradeRaw?.price_label ?? "$5/month"}`,
|
|
807
|
+
`**Upgrade in terminal:** \`${upgradeRaw?.terminal_command ?? "npx -y -p mcp-scraper@latest mcp-scraper-cli billing concurrency checkout"}\``,
|
|
808
|
+
`**Billing URL:** ${upgradeRaw?.billing_url ?? "https://mcpscraper.dev/billing"}`
|
|
809
|
+
].join("\n") : "";
|
|
796
810
|
const full = [
|
|
797
811
|
`# Credits`,
|
|
798
812
|
`**Balance:** ${balance ?? "unknown"} credits`,
|
|
799
813
|
matchedSection,
|
|
814
|
+
concurrencySection,
|
|
800
815
|
costs.length ? `
|
|
801
816
|
## Cost Table
|
|
802
817
|
| Item | Credits | Unit |
|
|
@@ -825,7 +840,22 @@ ${ledgerRows}` : ""
|
|
|
825
840
|
operation: String(row.operation ?? ""),
|
|
826
841
|
credits: row.amount_mc / 1e3,
|
|
827
842
|
description: row.description ?? null
|
|
828
|
-
}))
|
|
843
|
+
})),
|
|
844
|
+
concurrency: concurrencyRaw && upgradeRaw ? {
|
|
845
|
+
currentExtraSlots: Number(concurrencyRaw.current_extra_slots ?? 0),
|
|
846
|
+
currentLimit: Number(concurrencyRaw.current_limit ?? 1),
|
|
847
|
+
hasSubscription: concurrencyRaw.has_subscription === true,
|
|
848
|
+
upgrade: {
|
|
849
|
+
product: String(upgradeRaw.product ?? "Extra concurrency slot"),
|
|
850
|
+
priceLabel: String(upgradeRaw.price_label ?? "$5/month"),
|
|
851
|
+
unitAmountUsd: Number(upgradeRaw.unit_amount_usd ?? 5),
|
|
852
|
+
currency: String(upgradeRaw.currency ?? "usd"),
|
|
853
|
+
interval: String(upgradeRaw.interval ?? "month"),
|
|
854
|
+
billingUrl: String(upgradeRaw.billing_url ?? "https://mcpscraper.dev/billing"),
|
|
855
|
+
terminalCommand: String(upgradeRaw.terminal_command ?? "npx -y -p mcp-scraper@latest mcp-scraper-cli billing concurrency checkout"),
|
|
856
|
+
terminalCommandWithApiKeyEnv: String(upgradeRaw.terminal_command_with_api_key_env ?? "MCP_SCRAPER_API_KEY=sk_live_your_key npx -y -p mcp-scraper@latest mcp-scraper-cli billing concurrency checkout")
|
|
857
|
+
}
|
|
858
|
+
} : null
|
|
829
859
|
}
|
|
830
860
|
};
|
|
831
861
|
}
|
|
@@ -1111,6 +1141,62 @@ ${chunkRows}` : "",
|
|
|
1111
1141
|
].filter(Boolean).join("\n");
|
|
1112
1142
|
return oneBlock(full);
|
|
1113
1143
|
}
|
|
1144
|
+
function formatFacebookVideoTranscribe(raw, input) {
|
|
1145
|
+
const parsed = parseData(raw);
|
|
1146
|
+
if ("error" in parsed) return { content: [{ type: "text", text: parsed.error }], isError: true };
|
|
1147
|
+
const d = parsed.data;
|
|
1148
|
+
const text = d.text ?? "";
|
|
1149
|
+
const chunks = d.chunks ?? [];
|
|
1150
|
+
const wordCount = text.trim() ? text.trim().split(/\s+/).length : 0;
|
|
1151
|
+
const durSec = d.durationMs ? (d.durationMs / 1e3).toFixed(0) : "\u2014";
|
|
1152
|
+
const videoDuration = typeof d.videoDurationSec === "number" ? `${Math.round(d.videoDurationSec)}s` : "\u2014";
|
|
1153
|
+
const label = d.videoId ? `Facebook Organic Video \`${d.videoId}\`` : "Facebook Organic Video";
|
|
1154
|
+
const chunkRows = chunks.slice(0, 50).map((c) => {
|
|
1155
|
+
const sec = Number.isFinite(c.timestamp[0]) ? Math.floor(c.timestamp[0]) : 0;
|
|
1156
|
+
const mm = String(Math.floor(sec / 60)).padStart(2, "0");
|
|
1157
|
+
const ss = String(sec % 60).padStart(2, "0");
|
|
1158
|
+
return `| ${mm}:${ss} | ${cell(truncate(c.text, 120))} |`;
|
|
1159
|
+
}).join("\n");
|
|
1160
|
+
const full = [
|
|
1161
|
+
`# ${label} Transcript`,
|
|
1162
|
+
d.ownerName ? `**Owner:** ${d.ownerName}` : "",
|
|
1163
|
+
`**Video duration:** ${videoDuration} \xB7 **Transcribed in:** ${durSec}s \xB7 **${wordCount} words**`,
|
|
1164
|
+
d.pageUrl ? `**Page URL:** ${d.pageUrl}` : `**Page URL:** ${input.url}`,
|
|
1165
|
+
d.videoUrl ? `**Extracted MP4:** \`${d.videoUrl}\`` : "",
|
|
1166
|
+
`
|
|
1167
|
+
## Full Transcript
|
|
1168
|
+
${text}`,
|
|
1169
|
+
chunks.length ? `
|
|
1170
|
+
## Timestamped Chunks
|
|
1171
|
+
| Time | Text |
|
|
1172
|
+
|------|------|
|
|
1173
|
+
${chunkRows}` : "",
|
|
1174
|
+
`
|
|
1175
|
+
---
|
|
1176
|
+
\u{1F4A1} To download the extracted MP4, call the Facebook media endpoint with the extracted MP4 URL.`
|
|
1177
|
+
].filter(Boolean).join("\n");
|
|
1178
|
+
return {
|
|
1179
|
+
...oneBlock(full),
|
|
1180
|
+
structuredContent: {
|
|
1181
|
+
sourceUrl: d.sourceUrl ?? input.url,
|
|
1182
|
+
pageUrl: d.pageUrl ?? input.url,
|
|
1183
|
+
videoId: d.videoId ?? null,
|
|
1184
|
+
ownerName: d.ownerName ?? null,
|
|
1185
|
+
selectedQuality: d.selectedQuality ?? input.quality ?? "best",
|
|
1186
|
+
bitrate: typeof d.bitrate === "number" ? d.bitrate : null,
|
|
1187
|
+
videoDurationSec: typeof d.videoDurationSec === "number" ? d.videoDurationSec : null,
|
|
1188
|
+
videoUrl: d.videoUrl ?? "",
|
|
1189
|
+
wordCount,
|
|
1190
|
+
chunkCount: chunks.length,
|
|
1191
|
+
transcriptText: text,
|
|
1192
|
+
chunks: chunks.map((c) => ({
|
|
1193
|
+
startSec: Number.isFinite(c.timestamp[0]) ? c.timestamp[0] : 0,
|
|
1194
|
+
endSec: Number.isFinite(c.timestamp[1]) ? c.timestamp[1] : 0,
|
|
1195
|
+
text: c.text
|
|
1196
|
+
}))
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1114
1200
|
|
|
1115
1201
|
// src/mcp/mcp-tool-schemas.ts
|
|
1116
1202
|
var import_zod = require("zod");
|
|
@@ -1166,6 +1252,10 @@ var FacebookAdSearchInputSchema = {
|
|
|
1166
1252
|
var FacebookAdTranscribeInputSchema = {
|
|
1167
1253
|
videoUrl: import_zod.z.string().url().describe("Facebook CDN video URL from a facebook_page_intel result")
|
|
1168
1254
|
};
|
|
1255
|
+
var FacebookVideoTranscribeInputSchema = {
|
|
1256
|
+
url: import_zod.z.string().url().describe("Organic Facebook reel, video, watch, or share URL. The tool renders the page, extracts the best public Facebook CDN MP4 URL, then transcribes it."),
|
|
1257
|
+
quality: import_zod.z.enum(["best", "hd", "sd"]).default("best").describe("Preferred progressive MP4 quality. Use best by default; hd prefers the highest HD progressive URL; sd forces the SD URL.")
|
|
1258
|
+
};
|
|
1169
1259
|
var MapsPlaceIntelInputSchema = {
|
|
1170
1260
|
businessName: import_zod.z.string().min(1).describe('Business name only. If user says "Elite Roofing Denver CO", use businessName="Elite Roofing" and location="Denver, CO".'),
|
|
1171
1261
|
location: import_zod.z.string().min(1).describe('City/region/country where the business should be searched, e.g. "Denver, CO". Infer from the user request when possible.'),
|
|
@@ -1459,7 +1549,22 @@ var CreditsInfoOutputSchema = {
|
|
|
1459
1549
|
operation: import_zod.z.string(),
|
|
1460
1550
|
credits: import_zod.z.number(),
|
|
1461
1551
|
description: NullableString
|
|
1462
|
-
}))
|
|
1552
|
+
})),
|
|
1553
|
+
concurrency: import_zod.z.object({
|
|
1554
|
+
currentExtraSlots: import_zod.z.number().int().min(0),
|
|
1555
|
+
currentLimit: import_zod.z.number().int().min(1),
|
|
1556
|
+
hasSubscription: import_zod.z.boolean(),
|
|
1557
|
+
upgrade: import_zod.z.object({
|
|
1558
|
+
product: import_zod.z.string(),
|
|
1559
|
+
priceLabel: import_zod.z.string(),
|
|
1560
|
+
unitAmountUsd: import_zod.z.number(),
|
|
1561
|
+
currency: import_zod.z.string(),
|
|
1562
|
+
interval: import_zod.z.string(),
|
|
1563
|
+
billingUrl: import_zod.z.string().url(),
|
|
1564
|
+
terminalCommand: import_zod.z.string(),
|
|
1565
|
+
terminalCommandWithApiKeyEnv: import_zod.z.string()
|
|
1566
|
+
})
|
|
1567
|
+
}).nullable()
|
|
1463
1568
|
};
|
|
1464
1569
|
var MapSiteUrlsOutputSchema = {
|
|
1465
1570
|
startUrl: import_zod.z.string(),
|
|
@@ -1516,8 +1621,26 @@ var FacebookPageIntelOutputSchema = {
|
|
|
1516
1621
|
variations: import_zod.z.number().int().nullable()
|
|
1517
1622
|
}))
|
|
1518
1623
|
};
|
|
1624
|
+
var FacebookVideoTranscribeOutputSchema = {
|
|
1625
|
+
sourceUrl: import_zod.z.string().url(),
|
|
1626
|
+
pageUrl: import_zod.z.string().url(),
|
|
1627
|
+
videoId: NullableString,
|
|
1628
|
+
ownerName: NullableString,
|
|
1629
|
+
selectedQuality: import_zod.z.string(),
|
|
1630
|
+
bitrate: import_zod.z.number().int().nullable(),
|
|
1631
|
+
videoDurationSec: import_zod.z.number().nullable(),
|
|
1632
|
+
videoUrl: import_zod.z.string().url(),
|
|
1633
|
+
wordCount: import_zod.z.number().int().min(0),
|
|
1634
|
+
chunkCount: import_zod.z.number().int().min(0),
|
|
1635
|
+
transcriptText: import_zod.z.string(),
|
|
1636
|
+
chunks: import_zod.z.array(import_zod.z.object({
|
|
1637
|
+
startSec: import_zod.z.number(),
|
|
1638
|
+
endSec: import_zod.z.number(),
|
|
1639
|
+
text: import_zod.z.string()
|
|
1640
|
+
}))
|
|
1641
|
+
};
|
|
1519
1642
|
var CreditsInfoInputSchema = {
|
|
1520
|
-
item: import_zod.z.string().optional().describe('Optional tool, action, or feature to look up, e.g. "maps reviews", "extract_url",
|
|
1643
|
+
item: import_zod.z.string().optional().describe('Optional tool, action, or feature to look up, e.g. "maps reviews", "extract_url", "YouTube transcription", or "concurrency"'),
|
|
1521
1644
|
includeLedger: import_zod.z.boolean().default(false).describe("Whether to include recent credit ledger entries")
|
|
1522
1645
|
};
|
|
1523
1646
|
var SearchSerpInputSchema = {
|
|
@@ -2015,6 +2138,13 @@ function registerPaaExtractorMcpTools(server2, executor2, options = {}) {
|
|
|
2015
2138
|
inputSchema: FacebookAdTranscribeInputSchema,
|
|
2016
2139
|
annotations: liveWebToolAnnotations("Facebook Ad Transcription")
|
|
2017
2140
|
}, async (input) => formatFacebookAdTranscribe(await executor2.facebookAdTranscribe(input), input));
|
|
2141
|
+
server2.registerTool("facebook_video_transcribe", {
|
|
2142
|
+
title: "Facebook Organic Video Transcription",
|
|
2143
|
+
description: withReportNote("Transcribe audio from an organic Facebook reel, video, watch, or share URL. Renders the Facebook page, extracts the best public Facebook CDN MP4 URL from the page state, then returns the full transcript, timestamped chunks, and extracted MP4 URL."),
|
|
2144
|
+
inputSchema: FacebookVideoTranscribeInputSchema,
|
|
2145
|
+
outputSchema: FacebookVideoTranscribeOutputSchema,
|
|
2146
|
+
annotations: liveWebToolAnnotations("Facebook Organic Video Transcription")
|
|
2147
|
+
}, async (input) => formatFacebookVideoTranscribe(await executor2.facebookVideoTranscribe(input), input));
|
|
2018
2148
|
server2.registerTool("maps_place_intel", {
|
|
2019
2149
|
title: "Google Maps Business Profile Details",
|
|
2020
2150
|
description: withReportNote('Extract Google Maps business intelligence for one known/named business: rating, review count, category, address, phone, website, hours, booking URL, review histogram, review topics, about attributes, entity IDs, and optional review cards. Do not use this for category searches, local market prospect lists, or requests for multiple GMB/GBP profiles; use maps_search first for those. Split business name from location (e.g. "Elite Roofing Denver CO" => businessName "Elite Roofing", location "Denver, CO"). Pass includeReviews true when the user asks for reviews/customer pain.'),
|
|
@@ -2045,7 +2175,7 @@ function registerPaaExtractorMcpTools(server2, executor2, options = {}) {
|
|
|
2045
2175
|
}, async (input) => buildRankTrackerBlueprint(input));
|
|
2046
2176
|
server2.registerTool("credits_info", {
|
|
2047
2177
|
title: "MCP Scraper Credits & Costs",
|
|
2048
|
-
description: "Answer questions about MCP Scraper credits: current credit balance, what a specific tool/action costs, the full cost table, and
|
|
2178
|
+
description: "Answer questions about MCP Scraper credits, usage limits, and concurrency upgrades: current credit balance, what a specific tool/action costs, the full cost table, current concurrency limit, the extra-slot price, billing URL, and the terminal checkout command. Does not expose payment methods or credit card information.",
|
|
2049
2179
|
inputSchema: CreditsInfoInputSchema,
|
|
2050
2180
|
outputSchema: CreditsInfoOutputSchema,
|
|
2051
2181
|
annotations: {
|