FB Ads MCP Server
Provides tools to access Facebook Ads campaign data, insights, and account spend summaries without paid services.
README
FB Ads MCP Server
MCP server sendiri yang bagi Claude akses terus ke data Facebook Ads (Meta Ads) kau — tanpa perlu bayar Supermetrics/Windsor.ai.
Ada 3 tools:
list_campaigns— senarai campaign (active/paused/all)get_campaign_insights— spend, impressions, clicks, CPC, CTR ikut campaignget_account_spend_summary— ringkasan total spend untuk seluruh akaun
1. Dapatkan Facebook Access Token
- Pergi ke Meta Business Suite → Business Settings
- Bawah Users, pilih System Users → Add → buat satu system user (contoh:
mcp-bot) - Assign system user tu ke Ad Account kau, dengan permission Manage Campaigns (view sudah cukup untuk
ads_read) - Klik Generate New Token:
- App: pilih/buat Facebook App (kena ada App ID di developers.facebook.com)
- Permission: tick
ads_read - Token expiry: pilih Never expire (system user token boleh permanent)
- Copy token tu — ni akan jadi
FB_ACCESS_TOKEN - Dapatkan Ad Account ID kau dari Business Settings → Accounts → Ad Accounts (format:
act_1234567890)
2. Setup Local (untuk test dulu)
npm install
cp .env.example .env.local
# isi FB_ACCESS_TOKEN, FB_AD_ACCOUNT_ID, dan MCP_SECRET (guna: openssl rand -hex 24)
npm run dev
Server akan jalan di http://localhost:3000/mcp?key=MCP_SECRET_KAU
3. Deploy ke Vercel
npm i -g vercel
vercel
Lepas deploy, pergi ke Vercel Dashboard → Project → Settings → Environment Variables,
tambah FB_ACCESS_TOKEN, FB_AD_ACCOUNT_ID, MCP_SECRET (yang sama macam local), then
vercel --prod untuk deploy production.
URL server kau akan jadi macam:
https://fb-ads-mcp-xxxx.vercel.app/mcp?key=MCP_SECRET_KAU
4. Connect ke Claude
- Claude → Settings → Connectors → Add custom connector
- Paste URL penuh (dengan
?key=...sekali) dari step 3 - Klik Add
- Dalam mana-mana chat, klik + → Add connectors → toggle ON connector ni
- Cuba tanya: "Tunjuk spend campaign aku 7 hari lepas"
Nota Keselamatan
- Server ni public di internet (syarat MCP remote connector).
MCP_SECRETdi URL adalah satu-satunya proteksi — jangan share URL tu kat sesiapa, treat macam password. - Token Facebook kau disimpan sebagai environment variable di Vercel, bukan dalam kod — jangan
commit
.env.localke Git (dah ada dalam.gitignoresepatutnya, cek balik). - Kalau nak lebih selamat, boleh upgrade guna OAuth (Claude custom connector ada slot untuk OAuth Client ID/Secret) — tapi untuk penggunaan solo/peribadi, shared secret ni dah cukup.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.