Meta Ads MCP Server
Enables Claude to fetch and analyze Meta ad accounts, campaigns, ad sets, ads, and performance insights via the Meta Marketing API.
README
Meta Ads MCP Server
A remote MCP server that wraps the Meta Marketing API so Claude can pull data from all of your Meta ad accounts: accounts, campaigns, ad sets, ads, and performance insights (spend, impressions, clicks, CTR/CPC/CPM, reach, conversions, with optional breakdowns and date ranges).
Tools exposed
list_ad_accounts— every ad account reachable with your tokenget_campaigns(account_id, status?, limit?)get_adsets(account_id, campaign_id?, limit?)get_ads(account_id, adset_id?, campaign_id?, limit?)get_insights(account_id, level?, date_preset? | since+until, breakdowns?, fields?, limit?)
1. Get a Meta access token with access to all your ad accounts
- Go to developers.facebook.com and create an app (type: Business).
- Add the Marketing API product to the app.
- In Meta Business Settings → Users → System Users, create a system user (role: Admin, or Employee with the right permission).
- Under Assign Assets, assign every ad account you want Claude to see to that system user.
- Generate a token for the system user with the
ads_readpermission (addads_managementtoo if you later want write access, e.g. pausing campaigns). Choose a token with no expiry, or a long-lived one, and set a calendar reminder to rotate it if it does expire.
This gives you one token that covers every ad account, rather than one login per account.
2. Deploy to Vercel
cd meta-ads-mcp
npm install
vercel deploy --prod
Then in the Vercel project settings, add two environment variables (Project Settings → Environment Variables), and redeploy so they take effect:
| Variable | Value |
|---|---|
META_ACCESS_TOKEN |
the system user token from step 1 |
MCP_SECRET_TOKEN |
a random string you generate, e.g. openssl rand -hex 24 |
3. Add it to Claude as a custom connector
In Claude, go to Customize → Connectors → Add custom connector, and enter this URL (no OAuth fields needed):
https://<your-project>.vercel.app/api/mcp?token=<MCP_SECRET_TOKEN>
Using the exact MCP_SECRET_TOKEN value from step 2. This URL is effectively
a bearer credential, so treat it as a secret — don't post it or check it into
git.
Note: the token is passed as a ?token= query parameter rather than a
bracketed dynamic path segment. This is deliberate — folder names with
square brackets (e.g. [token]) can get mangled by drag-and-drop uploads or
some zip tools, so a query string is more robust if you're not deploying via
git push or the Vercel CLI.
Enable the connector for a conversation via the "+" button → Connectors, then ask Claude something like: "List my Meta ad accounts" or "Show me spend and ROAS by campaign for account X over the last 30 days."
Notes / next steps
- Security model: this uses a shared-secret URL rather than full OAuth, which is the simplest option for a single-user setup. If you ever want to let teammates connect with their own Meta permissions instead of a shared system-user token, that would need a real OAuth layer in front of Meta's Marketing API — a bigger build, happy to do that if it becomes useful.
- Rate limits: the Marketing API has its own rate limits per app/ad account; if you're pulling insights across many accounts at once you may want to add caching or request the accounts one at a time.
- Extending: to add write actions (e.g. pause a campaign, adjust a
budget), add a new
server.registerTool(...)block inlib/server.tscalling the relevant Graph API POST endpoint — same pattern as the read tools here.
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.