Back to Home
patpil-cloudflare-mcp icon

facebook-ads-mcp

Verified Safe

by patpil-cloudflare-mcp

Overview

Production-ready Cloudflare MCP server for Facebook Ad Library competitive intelligence, combining Apify scraping with AI-powered strategic analysis and format aggregation.

Installation

Run Command
wrangler dev

Environment Variables

  • OAUTH_KV
  • MCP_OBJECT
  • TOKEN_DB
  • WORKOS_CLIENT_ID
  • WORKOS_API_KEY
  • USER_SESSIONS
  • AI_GATEWAY_ID
  • AI_GATEWAY_TOKEN
  • APIFY_API_TOKEN
  • APIFY_SEMAPHORE
  • CACHE_KV
  • APIFY_CACHE
  • AI

Security Notes

The server implements robust security practices: OAuth 2.1 with PKCE using WorkOS for user authentication, API key authentication with SHA-256 hashing and user-level validity checks against a D1 database, and explicit PII redaction and output sanitization via `pilpat-mcp-security` (v1.1.0+) in all tool outputs (Step 4.5). Secrets are managed through `.dev.vars` locally and `wrangler secrets` in production, not hardcoded. Concurrency is controlled via a Durable Object semaphore to prevent resource exhaustion. URL validation is present before external API calls. No `eval` or suspicious dynamic code execution is observed. The choice to disable email/phone PII redaction for ad content is a documented, deliberate business decision for publicly available marketing data.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens3
Stars0
Forks0
Last Update2025-12-28

Tags

Facebook AdsCompetitive IntelligenceApifyAICloudflare WorkersMCPMarketing Analytics