mcp-scraper 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/bin/api-server.cjs +635 -109
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +3 -3
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +2 -2
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +2 -2
- package/dist/bin/mcp-stdio-server.cjs +2228 -1783
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +5 -4
- package/dist/bin/mcp-stdio-server.js.map +1 -1
- package/dist/bin/paa-harvest.cjs.map +1 -1
- package/dist/bin/paa-harvest.js +3 -3
- package/dist/{chunk-GL4BW4CP.js → chunk-22VEGGTW.js} +21 -9
- package/dist/{chunk-GL4BW4CP.js.map → chunk-22VEGGTW.js.map} +1 -1
- package/dist/{chunk-RUGJE5EB.js → chunk-EJK25QOW.js} +2 -2
- package/dist/chunk-JWIE5NCR.js +284 -0
- package/dist/chunk-JWIE5NCR.js.map +1 -0
- package/dist/{chunk-FMEDPBIV.js → chunk-KE7KE2Q2.js} +482 -35
- package/dist/chunk-KE7KE2Q2.js.map +1 -0
- package/dist/chunk-PZB3TJWK.js +7 -0
- package/dist/chunk-PZB3TJWK.js.map +1 -0
- package/dist/{chunk-BX5RCOG5.js → chunk-Q44DN6T2.js} +2 -2
- package/dist/{chunk-BX5RCOG5.js.map → chunk-Q44DN6T2.js.map} +1 -1
- package/dist/chunk-UN7VMHZL.js +244 -0
- package/dist/chunk-UN7VMHZL.js.map +1 -0
- package/dist/{chunk-RMPPYKUV.js → chunk-XDFSLSSH.js} +7 -218
- package/dist/chunk-XDFSLSSH.js.map +1 -0
- package/dist/{chunk-HE2LQPJ2.js → chunk-ZRKFW5FB.js} +2 -2
- package/dist/{db-LIOTIWVN.js → db-YHZYG7D2.js} +2 -2
- package/dist/{extract-bundle-U4D5LW5W.js → extract-bundle-OSUPAHCE.js} +58 -5
- package/dist/extract-bundle-OSUPAHCE.js.map +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/{server-MQDCAR6I.js → server-VDWIPV7F.js} +100 -363
- package/dist/server-VDWIPV7F.js.map +1 -0
- package/dist/{site-extract-repository-NVSZH35Y.js → site-extract-repository-GWKGK46Z.js} +3 -3
- package/dist/{worker-JQTS437L.js → worker-O5PZTTPY.js} +8 -8
- package/docs/mcp-tool-manifest.generated.json +564 -30
- package/docs/specs/meta-ad-creative-media-resolution-spec.md +31 -0
- package/docs/specs/unified-credit-and-scheduled-execution-billing-spec.md +1007 -0
- package/package.json +1 -1
- package/dist/chunk-FMEDPBIV.js.map +0 -1
- package/dist/chunk-HPV4VOQX.js +0 -27
- package/dist/chunk-HPV4VOQX.js.map +0 -1
- package/dist/chunk-RLWCHLV3.js +0 -7
- package/dist/chunk-RLWCHLV3.js.map +0 -1
- package/dist/chunk-RMPPYKUV.js.map +0 -1
- package/dist/extract-bundle-U4D5LW5W.js.map +0 -1
- package/dist/server-MQDCAR6I.js.map +0 -1
- /package/dist/{chunk-RUGJE5EB.js.map → chunk-EJK25QOW.js.map} +0 -0
- /package/dist/{chunk-HE2LQPJ2.js.map → chunk-ZRKFW5FB.js.map} +0 -0
- /package/dist/{db-LIOTIWVN.js.map → db-YHZYG7D2.js.map} +0 -0
- /package/dist/{site-extract-repository-NVSZH35Y.js.map → site-extract-repository-GWKGK46Z.js.map} +0 -0
- /package/dist/{worker-JQTS437L.js.map → worker-O5PZTTPY.js.map} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Canonical Build Spec — Meta Ad Creative Media Resolution
|
|
2
|
+
|
|
3
|
+
- **Request:** Replace the brittle manual path from a connected Meta ad-account ad to visible creative images, playable/transcribable video, and trustworthy analysis signals. Preserve the generic connected-service tools, but make the correct path directly discoverable and callable from the external MCP and scheduled Mastra agents.
|
|
4
|
+
- **Lane:** MCP Build using Mastra, with a provider-native Nango read primitive and an external MCP composition tool.
|
|
5
|
+
- **Capability:** `meta_ad_creative_media` for media buyers, ad directors, analysts, and agents. Given a tenant-owned Meta connection plus an `adId`, return the resolved creative media, render bounded images as MCP image content, and provide exact explicit follow-up calls for video transcription or frame analysis when video media is present.
|
|
6
|
+
- **Inputs:** This report; the MCP Scraper, scheduler, Nango integration, and SDK repositories; current Meta Graph API behavior; current MCP content/result specification; existing `facebook_page_intel`, `facebook_ad_transcribe`, `facebook_video_transcribe`, `video_frame_analysis`, `get-ad`, `get-ad-creative`, `get-ad-image`, and `get-ad-video` implementations.
|
|
7
|
+
- **Missing Context:** None that blocks implementation. Default behavior is read-only resolution with image inclusion. Transcription and frame analysis are explicit opt-ins because they spend credits; ad mutations remain outside this tool.
|
|
8
|
+
- **Evidence Plan:** Inspect current source and live schemas; verify Meta media fields against primary sources; verify MCP image content against the protocol/SDK; test a connected Meta ad when a safe fixture or user-owned ad ID is available; never run a write operation during verification.
|
|
9
|
+
- **Target Runtime:** `mcp-scraper` hosted MCP and npm stdio package; `mcp-scraper-scheduler` on Vercel/Mastra; source-controlled Nango functions deployed to the Meta Marketing integration; generated Node/Python/CLI/cURL SDK contracts.
|
|
10
|
+
- **Agents:** Existing scheduled-action Mastra agent receives the provider-native resolver through its per-run connection toolset. No new supervisor or model route is required; creative interpretation remains with the calling vision-capable model.
|
|
11
|
+
- **Skills:** Existing MCP Scraper and Mastra operating guidance. No new workspace skill is required.
|
|
12
|
+
- **Workflows:** Resolve ad and creative deterministically; collect bounded media descriptors; derive organic post/reel candidates; hydrate image/video metadata; attach safe image bytes; recommend the appropriate explicit transcription route or existing asynchronous video-frame analysis workflow without spending those credits inside the read tool.
|
|
13
|
+
- **Tools:**
|
|
14
|
+
- Provider read: `resolve-ad-creative-media` in the Meta Nango integration.
|
|
15
|
+
- External MCP composition: `meta_ad_creative_media`.
|
|
16
|
+
- Existing lower-level tools remain available and cross-reference the new path.
|
|
17
|
+
- **MCP:** `meta_ad_creative_media` returns text plus structured content. Successfully fetched creative images are additional MCP `image` content blocks with MIME type and base64 data. Videos remain URL/metadata plus transcript or asynchronous analysis receipt; raw video is not embedded in context.
|
|
18
|
+
- **Data Shape:** Stable media descriptor with ad/creative IDs, account/page/post IDs, unverified public-post candidate, media type, image assets, video assets, selected follow-up route, warnings, limitations, and next actions. Image content indices map descriptors to MCP content blocks. Transcript calls separately return their transcript signal.
|
|
19
|
+
- **Signals:** Not required. Video frame analysis continues through its existing asynchronous status tool.
|
|
20
|
+
- **Background Tasks:** Resolution and transcription are foreground bounded calls. Deep video analysis uses the existing asynchronous `video_frame_analysis` run/status path.
|
|
21
|
+
- **Guardrails:** Tenant ownership and live provider policy; read-only provider function; explicit opt-in for credit-spending work; SSRF-safe HTTPS image fetching; Meta/CDN host allowlist; redirect validation; MIME allowlist; per-image and image-count limits; no tokens or signed query strings in logs; untrusted-provider-data labeling; action switch is not required for reads.
|
|
22
|
+
- **Observability:** Existing MCP/API request logging, provider call logs, transcription cost telemetry, frame-analysis run IDs, plus structured warnings and route selection.
|
|
23
|
+
- **Enforcement:** Nango compile/source tests; resolver mapping tests; MCP registration/schema tests; image-fetch safety tests; transcript-signal tests; fuzzy advertiser-match warning tests; scheduler policy/binding tests; generated-manifest and SDK parity; local/remote MCP discovery and safe connected-account smoke test.
|
|
24
|
+
- **Done Contract:**
|
|
25
|
+
1. A vision-capable MCP client receives actual image content for a connected Meta ad creative without manually fetching a URL.
|
|
26
|
+
2. A paused ad with `effectiveObjectStoryId` produces a public post candidate and the correct organic transcription route automatically.
|
|
27
|
+
3. Video-only/dark creatives return the best provider source available or an explicit non-playable limitation, never ambiguous partial success.
|
|
28
|
+
4. Transcript results include a low-signal assessment and actionable warning.
|
|
29
|
+
5. Query-based Ad Library results disclose match confidence and mixed-advertiser risk.
|
|
30
|
+
6. The capability exists in the actual MCP, Mastra scheduled toolsets, Vercel production, npm, MCPB, and generated SDK contracts.
|
|
31
|
+
- **Receipt:** Report shipped tool names, callable surfaces, deployment/package versions, test evidence, live safe-read evidence, image delivery result, transcription routing result, and any Meta/provider limitations.
|