mcp-scraper 0.25.0 → 0.26.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.
Files changed (37) hide show
  1. package/README.md +3 -3
  2. package/dist/bin/api-server.cjs +4984 -2931
  3. package/dist/bin/api-server.cjs.map +1 -1
  4. package/dist/bin/api-server.js +2 -2
  5. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  6. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  7. package/dist/bin/mcp-scraper-cli.js +1 -1
  8. package/dist/bin/mcp-scraper-install.cjs +2 -2
  9. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  10. package/dist/bin/mcp-scraper-install.js +2 -2
  11. package/dist/bin/mcp-stdio-server.cjs +56 -8
  12. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  13. package/dist/bin/mcp-stdio-server.js +4 -4
  14. package/dist/{chunk-PNBYYAEK.js → chunk-3ZZOLQ6A.js} +2 -2
  15. package/dist/{chunk-JHI373VB.js → chunk-4767BA2O.js} +85 -3
  16. package/dist/chunk-4767BA2O.js.map +1 -0
  17. package/dist/chunk-7PYRJ7CB.js +7 -0
  18. package/dist/chunk-7PYRJ7CB.js.map +1 -0
  19. package/dist/{chunk-YNHPZU6B.js → chunk-TBRX7VOP.js} +2 -2
  20. package/dist/{chunk-YNHPZU6B.js.map → chunk-TBRX7VOP.js.map} +1 -1
  21. package/dist/{chunk-NC37L5RW.js → chunk-UMTBCKHH.js} +51 -9
  22. package/dist/chunk-UMTBCKHH.js.map +1 -0
  23. package/dist/{server-PILR3U5E.js → server-H4PPYTOM.js} +2484 -580
  24. package/dist/server-H4PPYTOM.js.map +1 -0
  25. package/dist/{site-extract-repository-2QQSL2QC.js → site-extract-repository-O36SIFI2.js} +3 -3
  26. package/dist/{worker-RV2TYXE3.js → worker-E3KHQH2F.js} +2 -2
  27. package/docs/mcp-tool-manifest.generated.json +164 -5
  28. package/docs/specs/main-mcp-integration-ownership-spec.md +1164 -0
  29. package/package.json +5 -1
  30. package/dist/chunk-JHI373VB.js.map +0 -1
  31. package/dist/chunk-NC37L5RW.js.map +0 -1
  32. package/dist/chunk-UELJZCUC.js +0 -7
  33. package/dist/chunk-UELJZCUC.js.map +0 -1
  34. package/dist/server-PILR3U5E.js.map +0 -1
  35. /package/dist/{chunk-PNBYYAEK.js.map → chunk-3ZZOLQ6A.js.map} +0 -0
  36. /package/dist/{site-extract-repository-2QQSL2QC.js.map → site-extract-repository-O36SIFI2.js.map} +0 -0
  37. /package/dist/{worker-RV2TYXE3.js.map → worker-E3KHQH2F.js.map} +0 -0
@@ -7,17 +7,17 @@ import {
7
7
  registerMemoryMcpTools,
8
8
  registerPaaExtractorMcpTools,
9
9
  registerSerpIntelligenceCaptureTools
10
- } from "../chunk-NC37L5RW.js";
10
+ } from "../chunk-UMTBCKHH.js";
11
11
  import "../chunk-R7EETU7Z.js";
12
12
  import "../chunk-MTSBI7ZH.js";
13
13
  import {
14
14
  renderInstallTerminal
15
- } from "../chunk-YNHPZU6B.js";
15
+ } from "../chunk-TBRX7VOP.js";
16
16
  import "../chunk-XGIPATLV.js";
17
17
  import {
18
18
  PACKAGE_VERSION
19
- } from "../chunk-UELJZCUC.js";
20
- import "../chunk-JHI373VB.js";
19
+ } from "../chunk-7PYRJ7CB.js";
20
+ import "../chunk-4767BA2O.js";
21
21
  import "../chunk-M2S27J6Z.js";
22
22
  import "../chunk-ICT7DDHL.js";
23
23
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LedgerOperation
3
- } from "./chunk-JHI373VB.js";
3
+ } from "./chunk-4767BA2O.js";
4
4
  import {
5
5
  sanitizeVendorName
6
6
  } from "./chunk-M2S27J6Z.js";
@@ -127,4 +127,4 @@ export {
127
127
  failExtractJob,
128
128
  settleExtractJob
129
129
  };
130
- //# sourceMappingURL=chunk-PNBYYAEK.js.map
130
+ //# sourceMappingURL=chunk-3ZZOLQ6A.js.map
@@ -49,6 +49,78 @@ var SCHEDULED_RUN_BASE_MC = SCHEDULED_RUN_BASE_CREDITS * MC_PER_CREDIT;
49
49
  var SCHEDULED_AGENT_LLM_MARKUP_BPS = 15e3;
50
50
  var SCHEDULED_AGENT_LLM_MARKUP = SCHEDULED_AGENT_LLM_MARKUP_BPS / BILLING_BASIS_POINTS;
51
51
  var SCHEDULED_RUN_DEFAULT_MAX_CREDITS = 5e3;
52
+ var CONNECTED_USAGE_RATE_POLICY_VERSION = "2026-07-15.connected-usage-v1";
53
+ var CONNECTED_ACTIVE_CONNECTION_MONTHLY_USD = 3;
54
+ var CONNECTED_FUNCTION_RUN_CREDITS = 2;
55
+ var CONNECTED_PROXY_REQUEST_CREDITS = 2;
56
+ var CONNECTED_COMPUTE_CREDITS_PER_SECOND = 5;
57
+ var CONNECTED_FUNCTION_RUN_MC = CONNECTED_FUNCTION_RUN_CREDITS * MC_PER_CREDIT;
58
+ var CONNECTED_PROXY_REQUEST_MC = CONNECTED_PROXY_REQUEST_CREDITS * MC_PER_CREDIT;
59
+ var CONNECTED_COMPUTE_MC_PER_SECOND = CONNECTED_COMPUTE_CREDITS_PER_SECOND * MC_PER_CREDIT;
60
+ var CONNECTED_USAGE_RATE_POLICY = {
61
+ schemaVersion: 1,
62
+ ratePolicyVersion: CONNECTED_USAGE_RATE_POLICY_VERSION,
63
+ effectiveAt: "2026-07-15T00:00:00.000Z",
64
+ provider: "nango",
65
+ entitlement: "paid_plan_add_on",
66
+ connection: {
67
+ billingMode: "flat_recurring_usd",
68
+ amountUsd: CONNECTED_ACTIVE_CONNECTION_MONTHLY_USD,
69
+ currency: "usd",
70
+ interval: "month",
71
+ unit: "active_connection",
72
+ proration: "subscription_period"
73
+ },
74
+ usage: {
75
+ billingMode: "credits",
76
+ settlementMode: "authoritative_receipt",
77
+ rounding: "aggregate_then_ceil_to_mc",
78
+ functionRun: {
79
+ credits: CONNECTED_FUNCTION_RUN_CREDITS,
80
+ mc: CONNECTED_FUNCTION_RUN_MC,
81
+ unit: "per_function_run"
82
+ },
83
+ proxyRequest: {
84
+ credits: CONNECTED_PROXY_REQUEST_CREDITS,
85
+ mc: CONNECTED_PROXY_REQUEST_MC,
86
+ unit: "per_proxy_request"
87
+ },
88
+ compute: {
89
+ creditsPerSecond: CONNECTED_COMPUTE_CREDITS_PER_SECOND,
90
+ mcPerSecond: CONNECTED_COMPUTE_MC_PER_SECOND,
91
+ sourceUnit: "millisecond",
92
+ unit: "per_compute_second",
93
+ formula: "ceil(computeMilliseconds * mcPerSecond / 1000)"
94
+ }
95
+ }
96
+ };
97
+ function nonNegativeSafeInteger(value, field) {
98
+ if (!Number.isSafeInteger(value) || value < 0) {
99
+ throw new Error(`${field} must be a non-negative safe integer`);
100
+ }
101
+ return BigInt(value);
102
+ }
103
+ function safeMc(value) {
104
+ if (value > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error("connected usage charge exceeds the safe integer range");
105
+ return Number(value);
106
+ }
107
+ function calculateConnectedUsageCharge(usage) {
108
+ const functionRuns = nonNegativeSafeInteger(usage.functionRuns, "functionRuns");
109
+ const proxyRequests = nonNegativeSafeInteger(usage.proxyRequests, "proxyRequests");
110
+ const computeMilliseconds = nonNegativeSafeInteger(usage.computeMilliseconds, "computeMilliseconds");
111
+ const functionRunMc = functionRuns * BigInt(CONNECTED_FUNCTION_RUN_MC);
112
+ const proxyRequestMc = proxyRequests * BigInt(CONNECTED_PROXY_REQUEST_MC);
113
+ const computeNumerator = computeMilliseconds * BigInt(CONNECTED_COMPUTE_MC_PER_SECOND);
114
+ const computeMc = computeNumerator === 0n ? 0n : (computeNumerator + 999n) / 1000n;
115
+ const amountMc = functionRunMc + proxyRequestMc + computeMc;
116
+ return {
117
+ functionRunMc: safeMc(functionRunMc),
118
+ proxyRequestMc: safeMc(proxyRequestMc),
119
+ computeMc: safeMc(computeMc),
120
+ amountMc: safeMc(amountMc),
121
+ credits: safeMc(amountMc) / MC_PER_CREDIT
122
+ };
123
+ }
52
124
  var SCHEDULED_ACTIONS_RATE_POLICY = {
53
125
  billingMode: "credits",
54
126
  entitlement: "paid_plan_included",
@@ -317,7 +389,8 @@ function getPublicRatesPayload() {
317
389
  return {
318
390
  creditsPerDollarStarter: Math.round(mcToCredits(starter.credits_mc) / starter.monthly_usd),
319
391
  costs,
320
- scheduling: SCHEDULED_ACTIONS_RATE_POLICY
392
+ scheduling: SCHEDULED_ACTIONS_RATE_POLICY,
393
+ connectedAccounts: CONNECTED_USAGE_RATE_POLICY
321
394
  };
322
395
  }
323
396
  var CONCURRENCY_SLOT_PRICE_USD = 5;
@@ -427,7 +500,8 @@ var LedgerOperation = {
427
500
  DIFF_PAGE: "diff_page",
428
501
  DIFF_PAGE_REFUND: "diff_page_refund",
429
502
  SITE_AUDIT_LLM: "site_audit_llm",
430
- SCHEDULED_RUN: "scheduled_run"
503
+ SCHEDULED_RUN: "scheduled_run",
504
+ CONNECTED_USAGE: "connected_usage"
431
505
  };
432
506
  var MEMORY_AI_MARGIN_MULTIPLE = 3;
433
507
  var SITE_AUDIT_LLM_MARGIN_MULTIPLE = 1.5;
@@ -448,6 +522,14 @@ export {
448
522
  SCHEDULED_AGENT_LLM_MARKUP_BPS,
449
523
  SCHEDULED_AGENT_LLM_MARKUP,
450
524
  SCHEDULED_RUN_DEFAULT_MAX_CREDITS,
525
+ CONNECTED_USAGE_RATE_POLICY_VERSION,
526
+ CONNECTED_ACTIVE_CONNECTION_MONTHLY_USD,
527
+ CONNECTED_FUNCTION_RUN_CREDITS,
528
+ CONNECTED_PROXY_REQUEST_CREDITS,
529
+ CONNECTED_COMPUTE_CREDITS_PER_SECOND,
530
+ CONNECTED_FUNCTION_RUN_MC,
531
+ CONNECTED_USAGE_RATE_POLICY,
532
+ calculateConnectedUsageCharge,
451
533
  vendorCostUsdToMc,
452
534
  CREDIT_COST_CATALOG,
453
535
  CONCURRENCY_PRICE_ID,
@@ -466,4 +548,4 @@ export {
466
548
  MEDIA_TRANSCRIBE_HOLD_MC,
467
549
  MC_PER_USD
468
550
  };
469
- //# sourceMappingURL=chunk-JHI373VB.js.map
551
+ //# sourceMappingURL=chunk-4767BA2O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/api/rates.ts"],"sourcesContent":["export const MC_COSTS = {\n serp: 400,\n serp_headless: 400,\n serp_headful: 1_400,\n paa: 300,\n paa_base: 5_500,\n page_scrape: 100,\n url_map: 500,\n yt_channel: 200,\n yt_transcription: 200,\n fb_ad: 200,\n maps_search: 500,\n maps_place: 6_000,\n maps_review: 100,\n fb_search: 600,\n fb_transcribe: 33_300,\n google_ads_search: 600,\n google_ads_intel: 200,\n google_ads_transcribe: 33_300,\n instagram_profile: 400,\n instagram_media: 400,\n instagram_transcribe: 33_300,\n browser_minute: 12_000,\n reddit_thread: 3_000,\n reddit_comment: 200,\n video_analysis: 666_700,\n trustpilot_reviews: 500,\n trustpilot_review: 100,\n g2_reviews: 500,\n g2_review: 200,\n diff_page: 100,\n} as const\n\nexport type McCostKey = keyof typeof MC_COSTS\n\n/**\n * Kernel omits the `headless` field for a headful session, so the runtime\n * records headless as `true` and headful/unknown as `null`. Unknown is billed\n * at the conservative headful rate because no cheaper mode was proven.\n */\nexport function serpActualCostMc(headlessSent: boolean | null | undefined): number {\n return headlessSent === true ? MC_COSTS.serp_headless : MC_COSTS.serp_headful\n}\n\nexport const MC_PER_BROWSER_MS = MC_COSTS.browser_minute / 60_000\n\nexport function browserActiveCostMc(activeMs: number): number {\n return Math.round(activeMs * MC_PER_BROWSER_MS)\n}\n\nexport const BROWSER_OPEN_MIN_BALANCE_MC = 1_000\n\nexport const MC_PER_CREDIT = 100\n\n// Billing conversion is intentionally explicit rather than derived from a\n// Stripe plan. Plan grant changes must not silently reprice vendor-backed work.\nexport const BILLING_MC_PER_USD_NUMERATOR = 2_000_000\nexport const BILLING_MC_PER_USD_DENOMINATOR = 3\nexport const BILLING_BASIS_POINTS = 10_000\nexport const USD_NANOS = 1_000_000_000\n\nexport const SCHEDULED_RUN_BASE_CREDITS = 75\nexport const SCHEDULED_RUN_BASE_MC = SCHEDULED_RUN_BASE_CREDITS * MC_PER_CREDIT\nexport const SCHEDULED_AGENT_LLM_MARKUP_BPS = 15_000\nexport const SCHEDULED_AGENT_LLM_MARKUP = SCHEDULED_AGENT_LLM_MARKUP_BPS / BILLING_BASIS_POINTS\nexport const SCHEDULED_RUN_DEFAULT_MAX_CREDITS = 5_000\n\nexport const CONNECTED_USAGE_RATE_POLICY_VERSION = '2026-07-15.connected-usage-v1'\nexport const CONNECTED_ACTIVE_CONNECTION_MONTHLY_USD = 3\nexport const CONNECTED_FUNCTION_RUN_CREDITS = 2\nexport const CONNECTED_PROXY_REQUEST_CREDITS = 2\nexport const CONNECTED_COMPUTE_CREDITS_PER_SECOND = 5\nexport const CONNECTED_FUNCTION_RUN_MC = CONNECTED_FUNCTION_RUN_CREDITS * MC_PER_CREDIT\nexport const CONNECTED_PROXY_REQUEST_MC = CONNECTED_PROXY_REQUEST_CREDITS * MC_PER_CREDIT\nexport const CONNECTED_COMPUTE_MC_PER_SECOND = CONNECTED_COMPUTE_CREDITS_PER_SECOND * MC_PER_CREDIT\n\n/**\n * Versioned commercial contract for tenant-owned Nango connections.\n *\n * The recurring connection line item is denominated in USD and is deliberately\n * separate from usage debits in the Credit wallet. Usage receipts are reported\n * in aggregate milliseconds and rounded once to the smallest ledger unit (mc),\n * never up to a whole compute second.\n */\nexport const CONNECTED_USAGE_RATE_POLICY = {\n schemaVersion: 1,\n ratePolicyVersion: CONNECTED_USAGE_RATE_POLICY_VERSION,\n effectiveAt: '2026-07-15T00:00:00.000Z',\n provider: 'nango',\n entitlement: 'paid_plan_add_on',\n connection: {\n billingMode: 'flat_recurring_usd',\n amountUsd: CONNECTED_ACTIVE_CONNECTION_MONTHLY_USD,\n currency: 'usd',\n interval: 'month',\n unit: 'active_connection',\n proration: 'subscription_period',\n },\n usage: {\n billingMode: 'credits',\n settlementMode: 'authoritative_receipt',\n rounding: 'aggregate_then_ceil_to_mc',\n functionRun: {\n credits: CONNECTED_FUNCTION_RUN_CREDITS,\n mc: CONNECTED_FUNCTION_RUN_MC,\n unit: 'per_function_run',\n },\n proxyRequest: {\n credits: CONNECTED_PROXY_REQUEST_CREDITS,\n mc: CONNECTED_PROXY_REQUEST_MC,\n unit: 'per_proxy_request',\n },\n compute: {\n creditsPerSecond: CONNECTED_COMPUTE_CREDITS_PER_SECOND,\n mcPerSecond: CONNECTED_COMPUTE_MC_PER_SECOND,\n sourceUnit: 'millisecond',\n unit: 'per_compute_second',\n formula: 'ceil(computeMilliseconds * mcPerSecond / 1000)',\n },\n },\n} as const\n\nexport interface ConnectedUsageQuantities {\n functionRuns: number\n proxyRequests: number\n computeMilliseconds: number\n}\n\nexport interface ConnectedUsageCharge {\n functionRunMc: number\n proxyRequestMc: number\n computeMc: number\n amountMc: number\n credits: number\n}\n\nfunction nonNegativeSafeInteger(value: number, field: string): bigint {\n if (!Number.isSafeInteger(value) || value < 0) {\n throw new Error(`${field} must be a non-negative safe integer`)\n }\n return BigInt(value)\n}\n\nfunction safeMc(value: bigint): number {\n if (value > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error('connected usage charge exceeds the safe integer range')\n return Number(value)\n}\n\n/** Calculate one receipt after aggregating its raw Nango usage counters. */\nexport function calculateConnectedUsageCharge(usage: ConnectedUsageQuantities): ConnectedUsageCharge {\n const functionRuns = nonNegativeSafeInteger(usage.functionRuns, 'functionRuns')\n const proxyRequests = nonNegativeSafeInteger(usage.proxyRequests, 'proxyRequests')\n const computeMilliseconds = nonNegativeSafeInteger(usage.computeMilliseconds, 'computeMilliseconds')\n const functionRunMc = functionRuns * BigInt(CONNECTED_FUNCTION_RUN_MC)\n const proxyRequestMc = proxyRequests * BigInt(CONNECTED_PROXY_REQUEST_MC)\n const computeNumerator = computeMilliseconds * BigInt(CONNECTED_COMPUTE_MC_PER_SECOND)\n const computeMc = computeNumerator === 0n ? 0n : (computeNumerator + 999n) / 1_000n\n const amountMc = functionRunMc + proxyRequestMc + computeMc\n\n return {\n functionRunMc: safeMc(functionRunMc),\n proxyRequestMc: safeMc(proxyRequestMc),\n computeMc: safeMc(computeMc),\n amountMc: safeMc(amountMc),\n credits: safeMc(amountMc) / MC_PER_CREDIT,\n }\n}\n\n/**\n * Public, machine-readable Scheduled Actions billing contract.\n *\n * Keep every API/UI surface on this object instead of restating the policy.\n * The primitive constants above remain the execution-time source of truth;\n * this object gives clients stable semantic fields for displaying and applying\n * those rates without having to infer behavior from prose.\n */\nexport const SCHEDULED_ACTIONS_RATE_POLICY = {\n billingMode: 'credits',\n entitlement: 'paid_plan_included',\n separateSubscriptionRequired: false,\n chargeEvent: 'started_occurrence',\n runBaseCredits: SCHEDULED_RUN_BASE_CREDITS,\n runBaseMc: SCHEDULED_RUN_BASE_MC,\n llmCostMultiplier: SCHEDULED_AGENT_LLM_MARKUP,\n llmCostMultiplierBps: SCHEDULED_AGENT_LLM_MARKUP_BPS,\n modes: {\n connection_sync: {\n runBaseCredits: SCHEDULED_RUN_BASE_CREDITS,\n modelCostBilling: 'none',\n modelCostMultiplier: 0,\n },\n agent: {\n runBaseCredits: SCHEDULED_RUN_BASE_CREDITS,\n modelCostBilling: 'actual_reported_cost',\n modelCostProvider: 'openrouter',\n modelCostMultiplier: SCHEDULED_AGENT_LLM_MARKUP,\n modelCostMultiplierBps: SCHEDULED_AGENT_LLM_MARKUP_BPS,\n },\n },\n} as const\n\nexport function vendorCostUsdToMc(costUsd: number, markupBps: number): number {\n if (!Number.isFinite(costUsd) || costUsd < 0) throw new Error('costUsd must be a finite non-negative number')\n if (!Number.isInteger(markupBps) || markupBps < 0) throw new Error('markupBps must be a non-negative integer')\n\n const rawCostNanos = BigInt(Math.round(costUsd * USD_NANOS))\n const numerator =\n rawCostNanos *\n BigInt(markupBps) *\n BigInt(BILLING_MC_PER_USD_NUMERATOR)\n const denominator =\n BigInt(USD_NANOS) *\n BigInt(BILLING_BASIS_POINTS) *\n BigInt(BILLING_MC_PER_USD_DENOMINATOR)\n const mc = numerator === 0n ? 0n : (numerator + denominator - 1n) / denominator\n if (mc > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error('calculated mc exceeds the safe integer range')\n return Number(mc)\n}\n\nexport const CREDIT_COST_CATALOG: Array<{\n key: McCostKey\n label: string\n aliases: string[]\n credits: number\n unit: string\n notes?: string\n}> = [\n {\n key: 'serp',\n label: 'SERP search',\n aliases: ['search_serp', 'serp', 'google search', 'organic results'],\n credits: mcToCredits(MC_COSTS.serp_headless),\n unit: 'per search (headless); escalates to headful only when needed',\n notes: `Returns AI Overview, PAA snippet, videos, forums, and local pack. Billed ${mcToCredits(MC_COSTS.serp_headless)} credits when served headless (the common case), ${mcToCredits(MC_COSTS.serp_headful)} credits if an anti-bot escalation forces headful mode (overestimate refunded). Optional SERP Intelligence page snapshots add ${mcToCredits(MC_COSTS.page_scrape)} credit per attempted URL.`,\n },\n {\n key: 'paa',\n label: 'PAA harvest',\n aliases: ['harvest_paa', 'paa', 'people also ask', 'questions'],\n credits: mcToCredits(MC_COSTS.paa),\n unit: `per question (+${mcToCredits(MC_COSTS.paa_base)} credit base)`,\n notes: `Full SERP feature extraction. Billed ${mcToCredits(MC_COSTS.paa_base)} credit base + ${mcToCredits(MC_COSTS.paa)} per question actually returned (unused estimate refunded).`,\n },\n {\n key: 'page_scrape',\n label: 'Page crawl / extract',\n aliases: ['extract_url', 'extract_site', 'page scrape', 'url scrape', 'single page', 'site crawl'],\n credits: mcToCredits(MC_COSTS.page_scrape),\n unit: 'per page',\n notes: 'Applies to both single-URL extraction and per-page site crawls.',\n },\n {\n key: 'url_map',\n label: 'Site URL mapping',\n aliases: ['map_site_urls', 'url map', 'site map', 'crawl urls'],\n credits: mcToCredits(MC_COSTS.url_map),\n unit: 'per mapping operation',\n notes: 'Flat rate for the full /map-urls call regardless of URL count discovered.',\n },\n {\n key: 'yt_channel',\n label: 'YouTube search / channel harvest',\n aliases: ['youtube_harvest', 'youtube search', 'youtube channel', 'yt_channel'],\n credits: mcToCredits(MC_COSTS.yt_channel),\n unit: 'per call',\n },\n {\n key: 'yt_transcription',\n label: 'YouTube transcription',\n aliases: ['youtube_transcribe', 'youtube transcript', 'transcription', 'yt_transcription'],\n credits: mcToCredits(MC_COSTS.yt_transcription),\n unit: 'per minute',\n notes: 'A 5-minute hold is taken, then reconciled to actual video duration.',\n },\n {\n key: 'fb_ad',\n label: 'Facebook search / ad lookup',\n aliases: ['facebook_page_intel', 'facebook_ad_search', 'facebook_ad', 'facebook ads', 'fb ads'],\n credits: mcToCredits(MC_COSTS.fb_ad),\n unit: 'per call',\n },\n {\n key: 'maps_search',\n label: 'Maps business search',\n aliases: ['maps_search', 'google maps search', 'gmb search', 'gbp search', 'business profiles'],\n credits: mcToCredits(MC_COSTS.maps_search),\n unit: 'per search',\n notes: 'Returns up to 50 Google Maps business/profile candidates. Use maps_place_intel to hydrate selected businesses.',\n },\n {\n key: 'maps_place',\n label: 'Maps business lookup',\n aliases: ['maps_place_intel', 'google maps', 'maps place', 'place intel'],\n credits: mcToCredits(MC_COSTS.maps_place),\n unit: 'per business',\n notes: 'Base lookup. Reviews billed separately per card at maps_review rate.',\n },\n {\n key: 'maps_review',\n label: 'Maps review',\n aliases: ['maps_reviews', 'google reviews', 'review cards', 'reviews'],\n credits: mcToCredits(MC_COSTS.maps_review),\n unit: 'per review card',\n notes: 'Charged after extraction when includeReviews is true.',\n },\n {\n key: 'fb_search',\n label: 'Facebook ad library search',\n aliases: ['facebook_search', 'fb_search', 'fb ad search'],\n credits: mcToCredits(MC_COSTS.fb_search),\n unit: 'per search',\n notes: 'Browser automation to search Facebook Ads Library by keyword.',\n },\n {\n key: 'google_ads_search',\n label: 'Google Ads Transparency search',\n aliases: ['google_ads_search', 'google ads search', 'ads transparency search'],\n credits: mcToCredits(MC_COSTS.google_ads_search),\n unit: 'per search',\n notes: 'Browser automation to find advertisers in Google Ads Transparency Center by domain or name.',\n },\n {\n key: 'google_ads_intel',\n label: 'Google Ads Transparency advertiser intel',\n aliases: ['google_ads_page_intel', 'google ads intel', 'ads transparency intel'],\n credits: mcToCredits(MC_COSTS.google_ads_intel),\n unit: 'per call',\n notes: 'Lists and hydrates an advertiser\\'s creatives with image URLs and video references.',\n },\n {\n key: 'google_ads_transcribe',\n label: 'Google ad video transcription',\n aliases: ['google_ads_transcribe', 'google ad transcript'],\n credits: mcToCredits(MC_COSTS.google_ads_transcribe),\n unit: 'per minute (typical)',\n notes: 'A hold is taken, then reconciled to the real transcription cost for the actual audio duration.',\n },\n {\n key: 'fb_transcribe',\n label: 'Facebook video / ad transcription',\n aliases: ['facebook_transcribe', 'facebook_video_transcribe', 'fb_transcribe', 'fb ad transcript'],\n credits: mcToCredits(MC_COSTS.fb_transcribe),\n unit: 'per minute (typical)',\n notes: 'A hold is taken, then reconciled to the real transcription cost for the actual audio duration.',\n },\n {\n key: 'instagram_profile',\n label: 'Instagram profile content discovery',\n aliases: ['instagram_profile_content', 'instagram profile', 'instagram content list', 'ig profile'],\n credits: mcToCredits(MC_COSTS.instagram_profile),\n unit: 'per profile scan',\n notes: 'Browser extraction of public Instagram profile grid links. Complete history may require a logged-in profile.',\n },\n {\n key: 'instagram_media',\n label: 'Instagram media download',\n aliases: ['instagram_media_download', 'instagram reel download', 'instagram post download', 'ig media'],\n credits: mcToCredits(MC_COSTS.instagram_media),\n unit: 'per post or reel',\n notes: 'Extracts post text, image URLs, and reel audio/video tracks, with local downloads when the server can write files.',\n },\n {\n key: 'instagram_transcribe',\n label: 'Instagram media transcription',\n aliases: ['instagram transcript', 'instagram reel transcript', 'ig transcribe'],\n credits: mcToCredits(MC_COSTS.instagram_transcribe),\n unit: 'per minute (typical)',\n notes: 'Whisper transcription of selected Instagram audio/video media via fal.ai. A hold is taken, then reconciled to the real transcription cost for the actual audio duration.',\n },\n {\n key: 'browser_minute',\n label: 'Interactive browser session',\n aliases: ['browser_open', 'browser agent', 'browser_agent', 'live browser', 'browse', 'browser control', 'interactive browser'],\n credits: mcToCredits(MC_COSTS.browser_minute),\n unit: 'per minute of use',\n notes: 'Metered per minute of use for the whole time the browser session is open. Close the session to stop the meter; abandoned sessions are auto-closed after a short idle window.',\n },\n {\n key: 'reddit_thread',\n label: 'Reddit thread base lookup',\n aliases: ['reddit', 'reddit_thread', 'reddit comments', 'subreddit', 'reddit post'],\n credits: mcToCredits(MC_COSTS.reddit_thread),\n unit: 'per thread',\n notes: 'Base lookup for the post itself. Comments billed separately per comment at reddit_comment rate. Refunded if the thread cannot be retrieved.',\n },\n {\n key: 'reddit_comment',\n label: 'Reddit comment',\n aliases: ['reddit_comment', 'reddit comments'],\n credits: mcToCredits(MC_COSTS.reddit_comment),\n unit: 'per comment',\n notes: 'Charged per comment actually extracted, billed down automatically if the balance runs out mid-thread.',\n },\n {\n key: 'video_analysis',\n label: 'Video breakdown (frame-by-frame + transcript)',\n aliases: ['video_frame_analysis', 'video breakdown', 'video analysis', 'analyze video'],\n credits: mcToCredits(MC_COSTS.video_analysis),\n unit: 'per 120 frames (max 480)',\n notes: 'Full multi-lens video breakdown: samples frames across a video (up to 30 minutes), analyzes each with vision AI, transcribes the audio, then produces summary, pacing/energy, words-per-minute, topic outline, key points, hook analysis, visual style, and a how-to-replicate recipe with a quality-control pass. $1 per 120 frames requested (max 480 = $4); billed down automatically if the video cannot use the requested frames, and refunded fully if the run fails.',\n },\n {\n key: 'trustpilot_reviews',\n label: 'Trustpilot review harvest',\n aliases: ['trustpilot_reviews', 'trustpilot', 'trustpilot reviews'],\n credits: mcToCredits(MC_COSTS.trustpilot_reviews),\n unit: 'per call',\n notes: 'Base lookup. Reviews billed separately per card at trustpilot_review rate. Refunded if no reviews are found.',\n },\n {\n key: 'trustpilot_review',\n label: 'Trustpilot review card',\n aliases: ['trustpilot_review', 'trustpilot card'],\n credits: mcToCredits(MC_COSTS.trustpilot_review),\n unit: 'per review card',\n notes: 'Charged per review actually extracted, billed down automatically if the balance runs out mid-page.',\n },\n {\n key: 'g2_reviews',\n label: 'G2 review harvest',\n aliases: ['g2_reviews', 'g2', 'g2 reviews'],\n credits: mcToCredits(MC_COSTS.g2_reviews),\n unit: 'per call',\n notes: 'Base lookup. Reviews billed separately per card at g2_review rate. Refunded if no reviews are found.',\n },\n {\n key: 'g2_review',\n label: 'G2 review card',\n aliases: ['g2_review', 'g2 card'],\n credits: mcToCredits(MC_COSTS.g2_review),\n unit: 'per review card',\n notes: 'Charged per review actually extracted (each card carries up to 3 Q&A sections), billed down automatically if the balance runs out mid-page.',\n },\n {\n key: 'diff_page',\n label: 'Page change check',\n aliases: ['diff_page', 'page diff', 'change detection'],\n credits: mcToCredits(MC_COSTS.diff_page),\n unit: 'per check',\n notes: 'Same cost as a single page extract — one scrape is performed per check, then compared against your last stored snapshot for that URL.',\n },\n]\n\nexport const CONCURRENCY_PRICE_ID = 'price_1Ta1NRS8aAcsk3TGwsRnYbix'\n\nexport interface SubscriptionTier { tier: string; label: string; price_id: string; monthly_usd: number; credits_mc: number; concurrency: number; intro_coupon: string | null }\n\nexport const SUBSCRIPTION_TIERS: Record<string, SubscriptionTier> = {\n 'price_1TmiHRS8aAcsk3TGwmSNfNIa': { tier: 'starter', label: 'Starter', price_id: 'price_1TmiHRS8aAcsk3TGwmSNfNIa', monthly_usd: 12, credits_mc: 8_000_000, concurrency: 3, intro_coupon: 'mcp-starter-1dollar-intro-12' },\n 'price_1TrgihS8aAcsk3TG5cglrq4D': { tier: 'growth', label: 'Growth', price_id: 'price_1TrgihS8aAcsk3TG5cglrq4D', monthly_usd: 40, credits_mc: 26_666_700, concurrency: 10, intro_coupon: null },\n 'price_1TrgihS8aAcsk3TG4HnG4gbY': { tier: 'scale', label: 'Scale', price_id: 'price_1TrgihS8aAcsk3TG4HnG4gbY', monthly_usd: 100, credits_mc: 80_000_000, concurrency: 20, intro_coupon: null },\n}\n\nexport const SUBSCRIPTION_TIER_BY_KEY: Record<string, SubscriptionTier> = Object.fromEntries(\n Object.values(SUBSCRIPTION_TIERS).map(t => [t.tier, t]),\n)\n\nexport function getPublicRatesPayload() {\n const starter = SUBSCRIPTION_TIER_BY_KEY.starter\n const costs = CREDIT_COST_CATALOG.map(({ aliases, ...cost }) => ({\n ...cost,\n ...(cost.notes ? { notes: cost.notes.replace(/ via fal\\.ai/g, '') } : {}),\n }))\n\n return {\n creditsPerDollarStarter: Math.round(mcToCredits(starter.credits_mc) / starter.monthly_usd),\n costs,\n scheduling: SCHEDULED_ACTIONS_RATE_POLICY,\n connectedAccounts: CONNECTED_USAGE_RATE_POLICY,\n }\n}\n\nexport const CONCURRENCY_SLOT_PRICE_USD = 5\nexport const CONCURRENCY_SLOT_PRICE_CURRENCY = 'usd'\nexport const CONCURRENCY_SLOT_PRICE_INTERVAL = 'month'\nexport const CONCURRENCY_SLOT_PRICE_LABEL = '$5/month'\nexport const CONCURRENCY_SLOT_TERMINAL_COMMAND = 'npx -y -p mcp-scraper@latest mcp-scraper-cli billing concurrency checkout'\n\nexport function concurrencySlotBillingInfo() {\n const billingUrl = process.env.CONCURRENCY_BILLING_URL ?? 'https://mcpscraper.dev/billing'\n return {\n product: 'Extra concurrency slot',\n price_label: CONCURRENCY_SLOT_PRICE_LABEL,\n unit_amount_usd: CONCURRENCY_SLOT_PRICE_USD,\n currency: CONCURRENCY_SLOT_PRICE_CURRENCY,\n interval: CONCURRENCY_SLOT_PRICE_INTERVAL,\n billing_url: billingUrl,\n terminal_command: CONCURRENCY_SLOT_TERMINAL_COMMAND,\n terminal_command_with_api_key_env: `MCP_SCRAPER_API_KEY=sk_live_your_key ${CONCURRENCY_SLOT_TERMINAL_COMMAND}`,\n }\n}\n\n// The free tier is retired. Keep these exported compatibility constants at zero\n// so older consumers do not advertise or grant credits that no longer exist.\nexport const FREE_SIGNUP_MC = 0\nexport const FREE_MONTHLY_REFRESH_MC = 0\n\nexport const BALANCE_PRICE_IDS: Record<string, number> = {\n 'price_1TZx6rS8aAcsk3TGNMc1Vgpo': 11_000_000,\n 'price_1TZx6sS8aAcsk3TGxgqB7khO': 27_500_000,\n 'price_1TZx6tS8aAcsk3TG8PnJqHlG': 60_500_000,\n 'price_1TZx6tS8aAcsk3TGNgRMpy0e': 121_000_000,\n}\n\nexport const BALANCE_PACK_LABELS: Record<string, string> = {\n 'price_1TZx6rS8aAcsk3TGNMc1Vgpo': '$10',\n 'price_1TZx6sS8aAcsk3TGxgqB7khO': '$25',\n 'price_1TZx6tS8aAcsk3TG8PnJqHlG': '$50',\n 'price_1TZx6tS8aAcsk3TGNgRMpy0e': '$100',\n}\n\nexport function mcToCredits(mc: number): number {\n return mc / MC_PER_CREDIT\n}\n\nexport function insufficientBalanceResponse(balanceMc: number, requiredMc: number) {\n const topupUrl = process.env.TOPUP_URL ?? 'https://mcpscraper.dev/billing'\n const balanceCredits = mcToCredits(balanceMc)\n const requiredCredits = mcToCredits(requiredMc)\n return {\n error: 'insufficient_balance',\n error_code: 'insufficient_balance' as const,\n message: `Insufficient credits. Balance: ${balanceCredits} credits. This call requires ${requiredCredits} credits. Top up at ${topupUrl}`,\n balance_credits: balanceCredits,\n required_credits: requiredCredits,\n topup_url: topupUrl,\n }\n}\n\nexport interface MemoryPlan {\n plan: 'pro' | 'team'\n label: string\n price_id: string\n interval: 'month' | 'year'\n monthly_usd: number\n quota_bytes: number\n}\n\nexport const MEMORY_FREE_QUOTA_BYTES = 0.01e9 * 1\n\nexport const MEMORY_PLANS: Record<string, MemoryPlan> = {\n 'price_1TnMSTS8aAcsk3TGBgiwuvqL': { plan: 'pro', label: 'Pro', price_id: 'price_1TnMSTS8aAcsk3TGBgiwuvqL', interval: 'month', monthly_usd: 19, quota_bytes: 5e9 },\n 'price_1TnMSTS8aAcsk3TGWBVU2agY': { plan: 'pro', label: 'Pro', price_id: 'price_1TnMSTS8aAcsk3TGWBVU2agY', interval: 'year', monthly_usd: 19, quota_bytes: 5e9 },\n}\n\nexport const MEMORY_PLAN_QUOTA: Record<string, number> = { free: MEMORY_FREE_QUOTA_BYTES, pro: 5e9, team: 50e9 }\n\nexport const MEMORY_MARGIN_MULTIPLE = 3\nexport const MEMORY_FREE_COST_CAP_USD = 1.0\nexport const MEMORY_PRO_COST_BUDGET_USD = 19 / MEMORY_MARGIN_MULTIPLE\n\nexport const LedgerOperation = {\n TOPUP: 'topup',\n SUBSCRIPTION: 'subscription',\n SIGNUP_GRANT: 'signup_grant',\n MONTHLY_REFRESH: 'monthly_free_refresh',\n PAA: 'paa',\n PAA_REFUND: 'paa_refund',\n SERP: 'serp',\n SERP_REFUND: 'serp_refund',\n REFUND: 'refund',\n TRANSCRIPTION: 'transcription',\n TRANSCRIPTION_HOLD: 'transcription_hold',\n TRANSCRIPTION_REFUND: 'transcription_refund',\n YT_CHANNEL: 'yt_channel',\n FB_AD: 'fb_ad',\n MAPS_SEARCH: 'maps_search',\n MAPS_PLACE: 'maps_place',\n MAPS_REVIEW: 'maps_review',\n MAPS_REVIEW_REFUND: 'maps_review_refund',\n EXTRACT_SITE: 'extract_site',\n EXTRACT_SITE_REFUND: 'extract_site_refund',\n EXTRACT_URL: 'page_scrape',\n URL_MAP: 'url_map',\n EXTRACT_SITE_HOLD: 'extract_site_hold',\n YT_CHANNEL_REFUND: 'yt_channel_refund',\n FB_AD_REFUND: 'fb_ad_refund',\n URL_MAP_REFUND: 'url_map_refund',\n FB_SEARCH: 'fb_search',\n FB_TRANSCRIBE: 'fb_transcribe',\n FB_SEARCH_REFUND: 'fb_search_refund',\n FB_TRANSCRIBE_REFUND: 'fb_transcribe_refund',\n GOOGLE_ADS_SEARCH: 'google_ads_search',\n GOOGLE_ADS_SEARCH_REFUND: 'google_ads_search_refund',\n GOOGLE_ADS_INTEL: 'google_ads_intel',\n GOOGLE_ADS_INTEL_REFUND: 'google_ads_intel_refund',\n GOOGLE_ADS_TRANSCRIBE: 'google_ads_transcribe',\n GOOGLE_ADS_TRANSCRIBE_REFUND: 'google_ads_transcribe_refund',\n INSTAGRAM_PROFILE: 'instagram_profile',\n INSTAGRAM_PROFILE_REFUND: 'instagram_profile_refund',\n INSTAGRAM_MEDIA: 'instagram_media',\n INSTAGRAM_MEDIA_REFUND:'instagram_media_refund',\n INSTAGRAM_TRANSCRIBE: 'instagram_transcribe',\n INSTAGRAM_TRANSCRIBE_REFUND: 'instagram_transcribe_refund',\n BROWSER_SESSION: 'browser_session',\n REDDIT_THREAD: 'reddit_thread',\n REDDIT_THREAD_REFUND: 'reddit_thread_refund',\n REDDIT_COMMENT: 'reddit_comment',\n REDDIT_COMMENT_REFUND: 'reddit_comment_refund',\n VIDEO_ANALYSIS: 'video_analysis',\n VIDEO_ANALYSIS_REFUND: 'video_analysis_refund',\n VIDEO_ANALYSIS_ADJUST: 'video_analysis_adjust',\n VIDEO_ANALYSIS_LLM: 'video_analysis_llm',\n MEMORY_AI: 'memory_ai',\n MEMORY_AI_REFUND: 'memory_ai_refund',\n TRUSTPILOT_REVIEWS: 'trustpilot_reviews',\n TRUSTPILOT_REVIEWS_REFUND: 'trustpilot_reviews_refund',\n TRUSTPILOT_REVIEW: 'trustpilot_review',\n TRUSTPILOT_REVIEW_REFUND: 'trustpilot_review_refund',\n G2_REVIEWS: 'g2_reviews',\n G2_REVIEWS_REFUND: 'g2_reviews_refund',\n G2_REVIEW: 'g2_review',\n G2_REVIEW_REFUND: 'g2_review_refund',\n DIFF_PAGE: 'diff_page',\n DIFF_PAGE_REFUND: 'diff_page_refund',\n SITE_AUDIT_LLM: 'site_audit_llm',\n SCHEDULED_RUN: 'scheduled_run',\n CONNECTED_USAGE: 'connected_usage',\n} as const\n\nexport type LedgerOperation = typeof LedgerOperation[keyof typeof LedgerOperation]\n\nexport const MEMORY_AI_MARGIN_MULTIPLE = 3\nexport const SITE_AUDIT_LLM_MARGIN_MULTIPLE = 1.5\nexport const VIDEO_ANALYSIS_LLM_MARGIN_MULTIPLE = 1.5\nexport const MEDIA_TRANSCRIBE_MARGIN_MULTIPLE = 3\nexport const MEDIA_TRANSCRIBE_HOLD_MC = MC_COSTS.fb_transcribe * 3\n\nexport const MC_PER_USD =\n SUBSCRIPTION_TIERS['price_1TmiHRS8aAcsk3TGwmSNfNIa'].credits_mc /\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ACrD,mBAAmB,gCAAgC,EAAE;","names":[]}
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var PACKAGE_VERSION = "0.26.0";
3
+
4
+ export {
5
+ PACKAGE_VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-7PYRJ7CB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.26.0'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
@@ -50,7 +50,7 @@ function renderInstallTerminal(options) {
50
50
  "1/1 install surfaces ready",
51
51
  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),
52
52
  "",
53
- `${colorize("Tools", "cyan", color)} ${colorize("(159 MCP tools)", "muted", color)}`,
53
+ `${colorize("Tools", "cyan", color)} ${colorize("(163 MCP tools)", "muted", color)}`,
54
54
  toolRow("search", ["harvest_paa", "search_serp", "maps_search", "maps_place_intel"], color),
55
55
  toolRow("extract", ["extract_url", "map_site_urls", "extract_site", "audit_site", "directory_workflow"], color),
56
56
  toolRow("build", ["rank_tracker_workflow", "cron plan", "database prompt"], color),
@@ -105,4 +105,4 @@ function renderInstallTerminal(options) {
105
105
  export {
106
106
  renderInstallTerminal
107
107
  };
108
- //# sourceMappingURL=chunk-YNHPZU6B.js.map
108
+ //# sourceMappingURL=chunk-TBRX7VOP.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/install-terminal.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('(159 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"],"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,KA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AAS,4BAA4B,SAAS,KAAK;AAAA,IACnD;AAAA,IACA;AAAA,IACA,SAAS,gBAAgB,SAAS,KAAK;AAAA,IACvC;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;","names":[]}
1
+ {"version":3,"sources":["../src/install-terminal.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"],"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,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,kCAAkC,WAAW;AAAA,EAC/C,EAAE,KAAK,IAAI;AAEX,SAAO;AAAA,IACL,SAAS,gBAAgB,QAAQ,OAAO,IAAI,QAAQ,KAAK;AAAA,IACzD,SAAS,yBAAyB,SAAS,KAAK;AAAA,IAChD,SAAS,OAAO,SAAS,KA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AAS,eAAe,SAAS,KAAK;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,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,wBAAwB,SAAS,KAAK;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,iCAAiC,SAAS,KAAK;AAAA,IACxD;AAAA,IACA;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,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;","names":[]}
@@ -19,10 +19,10 @@ import {
19
19
  } from "./chunk-XGIPATLV.js";
20
20
  import {
21
21
  PACKAGE_VERSION
22
- } from "./chunk-UELJZCUC.js";
22
+ } from "./chunk-7PYRJ7CB.js";
23
23
  import {
24
24
  MC_PER_CREDIT
25
- } from "./chunk-JHI373VB.js";
25
+ } from "./chunk-4767BA2O.js";
26
26
  import {
27
27
  sanitizeVendorName
28
28
  } from "./chunk-M2S27J6Z.js";
@@ -374,6 +374,9 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
374
374
  is \`done\`.
375
375
 
376
376
  ## Notes
377
+ - Connected-service lifecycle and availability are separate. A connection can remain \`connected\` while
378
+ \`operationalStatus\` is \`unavailable\`; call \`test_service_connection\` before recommending reconnect.
379
+ Recommend reconnect only when \`reconnectRequired\` is true.
377
380
  - Bulk / full-site crawls: call \`extract_site\` with \`rotateProxies:true\` for blocked or rate-limited
378
381
  sites. It returns a saved folder/artifact plus a summary, not the full content inline.
379
382
  - Browser sessions and media transcription cost credits and take longer \u2014 prefer the cheapest tool that
@@ -382,6 +385,10 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
382
385
  when connected Graph media did not provide a playable source. It is not a bypass for URL/SSRF restrictions.
383
386
  - Large results are saved to disk or an artifact and returned as a summary plus a path or artifactId;
384
387
  read it back for full detail rather than expecting the whole payload inline.
388
+ - Before using a connected account, call \`list_service_connections\` and match the intended provider-side
389
+ identity from \`providerAccountEmail\` or \`providerAccountName\`, not the MCP Scraper login. If
390
+ \`providerIdentityStatus\` is \`unavailable\`, ask the person to refresh that connection before assuming
391
+ which external account it represents.
385
392
  - For Google Search Console, use \`export_connected_service_data\` with
386
393
  \`dataset:"search_console_performance"\` when the person asks for a fresh JSONL download. When they
387
394
  ask to schedule ingestion or repeatedly filter historical rows, create a \`connection_sync\` schedule,
@@ -4496,8 +4503,14 @@ var ListServiceConnectionsOutputSchema = {
4496
4503
  connectionId: z.string(),
4497
4504
  providerConfigKey: z.string(),
4498
4505
  provider: z.string().nullable().optional(),
4499
- label: z.string(),
4506
+ label: z.string().describe("Best verified provider-side account label. This is never derived from the MCP Scraper login email."),
4507
+ providerAccountId: z.string().nullable().describe("Provider-side account or principal identifier when safely discoverable. This is not the MCP Scraper user id."),
4508
+ providerAccountEmail: z.string().nullable().describe("Actual provider-side email for the authorized account when the provider exposes and verifies it. Null for organization-only accounts or unavailable identity scopes."),
4509
+ providerAccountName: z.string().nullable().describe("Actual provider-side person, workspace, channel, or organization name when available."),
4510
+ providerIdentityStatus: z.enum(["pending", "verified", "unavailable"]).describe("Whether provider-side account identity discovery is pending, verified, or unavailable under the current OAuth grant. Reconnect when unavailable after identity scopes were added."),
4500
4511
  status: z.string(),
4512
+ lifecycleStatus: z.enum(["pending", "connected", "needs_reauth", "disconnecting", "disconnected"]).optional().describe("Credential lifecycle. This is separate from current provider availability."),
4513
+ operationalStatus: z.enum(["unknown", "available", "degraded", "unavailable"]).optional().describe("Last observed provider transport availability. Unavailable does not imply reconnect is required."),
4501
4514
  reconnectRequired: z.boolean().optional(),
4502
4515
  transport: z.enum(["nango", "remote_mcp"]).describe("Credential transport behind this tenant-scoped connection. Tokens and API keys are never returned."),
4503
4516
  actionsEnabled: z.boolean(),
@@ -4520,10 +4533,27 @@ var ListServiceConnectionsOutputSchema = {
4520
4533
  mcpEndpoint: z.string().url().nullable().describe("Authenticated connection-scoped MCP endpoint when native provider tools/list projection is available. Null means use describe_service_connection_tool on this root MCP."),
4521
4534
  schemaDiscovery: z.enum(["connection_tools_list", "compatibility_describe"]).describe("How clients discover this connection's exact live provider schemas."),
4522
4535
  toolRevision: z.string().nullable().describe("Opaque revision of the resolved live tool catalog, when available. It changes when provider tools or policy change."),
4536
+ lastCheckedAt: z.string().nullable().optional(),
4537
+ lastSuccessfulCallAt: z.string().nullable().optional(),
4538
+ lastFailureAt: z.string().nullable().optional(),
4539
+ lastFailureCode: z.string().nullable().optional(),
4540
+ lastFailureRetryable: z.boolean().nullable().optional(),
4523
4541
  vaultName: z.string().nullable().describe("Memory vault this connection's digest writes into, if it has run at least once. Search it with memory-search."),
4524
4542
  tableName: z.string().nullable().describe("Tenant-owned structured table populated by this connection, if available. For scheduled Google Search Console connection_sync runs, this is a typed performance table with site_url, date, query, page, country, device, clicks, impressions, ctr, and position. Call table-describe, then filter or sort it with table-query.")
4525
4543
  }))
4526
4544
  };
4545
+ var TestServiceConnectionInputSchema = {
4546
+ connectionId: z.string().min(1).describe("A tenant-owned connectionId from list_service_connections."),
4547
+ providerConfigKey: z.string().min(1).optional().describe("Optional provider hint from list_service_connections.")
4548
+ };
4549
+ var TestServiceConnectionOutputSchema = {
4550
+ ok: z.boolean(),
4551
+ operationalStatus: z.enum(["available", "unavailable"]).optional(),
4552
+ checkedAt: z.string().optional(),
4553
+ toolCount: z.number().int().min(0).optional(),
4554
+ code: z.string().optional(),
4555
+ error: NullableString
4556
+ };
4527
4557
  var ReadServiceConnectionInputSchema = {
4528
4558
  connectionId: z.string().min(1).describe("A connectionId from list_service_connections."),
4529
4559
  tool: z.string().min(1).describe("One of that connection's readTools (from list_service_connections). An unlisted tool name is rejected with the allowed list."),
@@ -5504,11 +5534,18 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
5504
5534
  }, async (input) => formatCreditsInfo(await executor.creditsInfo(input), input));
5505
5535
  server.registerTool("list_service_connections", {
5506
5536
  title: "List Connected Services",
5507
- description: "List every third-party service connection this MCP Scraper account has authorized, including Resend, GitHub, Google Analytics, Google Search Console, YouTube, Facebook Pages, LinkedIn, X, Meta Marketing, Slack, Gmail, Calendar, Google Drive, Zoom, Xero, and others. Returns the tenant-scoped connectionId, credential transport, exact live readTools and gated actionTools, permission-aware toolCapabilities with missing OAuth-grant or provider-app-feature blockers, permanently blocked administrative tools, and schema-discovery metadata. Get a connectionId and exact tool name here before calling describe_service_connection_tool, read_service_connection, or call_service_connection_action. Nango OAuth and official remote MCP connections use the same provider-neutral bridges; mutations still require the account action switch and an exact allowed action. A scheduled Search Console connection_sync creates a typed tenant-owned performance table; after it runs, use the returned tableName with table-describe and table-query instead of repeatedly calling Google for historical filtering.",
5537
+ description: "List every third-party service connection this MCP Scraper account has authorized, including Resend, GitHub, Google Analytics, Google Search Console, YouTube, Facebook Pages, LinkedIn, X, Meta Marketing, Slack, Gmail, Calendar, Google Drive, Zoom, Xero, and others. Returns the tenant-scoped connectionId; verified providerAccountEmail/providerAccountName identity when the provider exposes it; credential transport; exact live readTools and gated actionTools; permission-aware toolCapabilities with missing OAuth-grant or provider-app-feature blockers; permanently blocked administrative tools; and schema-discovery metadata. The provider identity is distinct from the MCP Scraper login: use it to choose the intended account before any read, export, schedule binding, or gated action. Get a connectionId and exact tool name here before calling describe_service_connection_tool, read_service_connection, or call_service_connection_action. Nango OAuth and official remote MCP connections use the same provider-neutral bridges; mutations still require the account action switch and an exact allowed action. A scheduled Search Console connection_sync creates a typed tenant-owned performance table; after it runs, use the returned tableName with table-describe and table-query instead of repeatedly calling Google for historical filtering.",
5508
5538
  inputSchema: ListServiceConnectionsInputSchema,
5509
5539
  outputSchema: recordOutputSchema("list_service_connections", ListServiceConnectionsOutputSchema),
5510
5540
  annotations: { title: "List Connected Services", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
5511
5541
  }, async (input) => executor.listServiceConnections(input));
5542
+ server.registerTool("test_service_connection", {
5543
+ title: "Test Connected Service",
5544
+ description: "Test the current provider transport for one tenant-owned connection without changing its OAuth lifecycle. Call this when a connected account appears unavailable before recommending reconnect. Reconnect is appropriate only when reconnectRequired is true.",
5545
+ inputSchema: TestServiceConnectionInputSchema,
5546
+ outputSchema: recordOutputSchema("test_service_connection", TestServiceConnectionOutputSchema),
5547
+ annotations: { title: "Test Connected Service", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }
5548
+ }, async (input) => executor.testServiceConnection(input));
5512
5549
  server.registerTool("slack_send_message", {
5513
5550
  title: "Send Slack Message",
5514
5551
  description: "Send a message to a Slack channel through a connected, action-enabled Slack connection. Requires a connectionId from list_service_connections with actionsEnabled true; the person must have explicitly turned actions on for that connection.",
@@ -5894,7 +5931,12 @@ var HttpMcpToolExecutor = class {
5894
5931
  return this.call("/billing/credits", input);
5895
5932
  }
5896
5933
  listServiceConnections(input) {
5897
- return this.getJson("/schedule-connections");
5934
+ return this.getJson("/integrations");
5935
+ }
5936
+ testServiceConnection(input) {
5937
+ return this.call(`/integrations/${encodeURIComponent(input.connectionId)}/test`, {
5938
+ ...input.providerConfigKey ? { providerConfigKey: input.providerConfigKey } : {}
5939
+ });
5898
5940
  }
5899
5941
  slackSendMessage(input) {
5900
5942
  return this.call("/schedule-connections/actions/slack/send-message", input);
@@ -5909,13 +5951,13 @@ var HttpMcpToolExecutor = class {
5909
5951
  return this.call("/schedule-connections/actions/zoom/create-meeting", input);
5910
5952
  }
5911
5953
  readServiceConnection(input) {
5912
- return this.call("/schedule-connections/actions/read", input);
5954
+ return this.call("/integrations/actions/read", input);
5913
5955
  }
5914
5956
  importServiceConnectionToMemory(input) {
5915
5957
  return this.call("/schedule-connections/actions/import-memory", input);
5916
5958
  }
5917
5959
  describeServiceConnectionTool(input) {
5918
- return this.call("/schedule-connections/actions/describe", input);
5960
+ return this.call("/integrations/actions/describe", input);
5919
5961
  }
5920
5962
  exportConnectedServiceData(input) {
5921
5963
  const timeoutMs = this.httpTimeoutOverrideMs ?? 29e4;
@@ -5929,7 +5971,7 @@ var HttpMcpToolExecutor = class {
5929
5971
  return this.call("/schedule-connections/actions/export-download", input);
5930
5972
  }
5931
5973
  callServiceConnectionAction(input) {
5932
- return this.call("/schedule-connections/actions/call", input);
5974
+ return this.call("/integrations/actions/call", input);
5933
5975
  }
5934
5976
  setScheduledActionConnections(input) {
5935
5977
  return this.call(`/schedule-actions/${encodeURIComponent(input.scheduleActionId)}/connections`, {
@@ -10012,4 +10054,4 @@ export {
10012
10054
  registerMemoryMcpTools,
10013
10055
  MemoryMcpToolExecutor
10014
10056
  };
10015
- //# sourceMappingURL=chunk-NC37L5RW.js.map
10057
+ //# sourceMappingURL=chunk-UMTBCKHH.js.map