
Facebook/Meta Ads MCP Server
Programmatic read & insights access to Meta (Facebook) Ads accounts, campaigns, ad sets, ads and performance data.
Add to your client
Copy the config for your MCP client and paste it into its config file.
pip install -r requirements.txtPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"facebook-meta-ads-mcp-server": {
"command": "python",
"args": [
"/path/to/your/fb-ads-mcp-server/server.py",
"--fb-token",
"YOUR_META_ACCESS_TOKEN"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Python 3.10+
- Dependencies from requirements.txt (mcp >=1.6.0, requests >=2.32.3)
- A Meta User Access Token with the necessary permissions (e.g. ads_read)
About Facebook/Meta Ads MCP Server
This MCP server provides an interface to the Meta (Facebook) Ads platform, giving MCP-compatible clients such as Cursor and Claude Desktop programmatic access to Meta Ads data. It supports reading ad accounts, campaigns, ad sets, ads and creatives; fetching collections of objects scoped to an account, campaign or ad set; retrieving performance insights at the account, campaign, ad set and ad levels; paginating through results; and inspecting account/ad-set change history. It runs locally over stdio and authenticates with a Meta User Access Token supplied via the --fb-token argument.
Tools & capabilities (21)
list_ad_accountsLists ad accounts linked to the token.
get_details_of_ad_accountRetrieves details for a specific ad account.
get_campaign_by_idRetrieves details for a specific campaign.
get_adset_by_idRetrieves details for a specific ad set.
get_ad_by_idRetrieves details for a specific ad.
get_ad_creative_by_idRetrieves details for a specific ad creative.
get_adsets_by_idsRetrieves details for multiple ad sets by their IDs.
get_campaigns_by_adaccountRetrieves campaigns within an ad account.
get_adsets_by_adaccountRetrieves ad sets within an ad account.
get_ads_by_adaccountRetrieves ads within an ad account.
get_adsets_by_campaignRetrieves ad sets within a campaign.
get_ads_by_campaignRetrieves ads within a campaign.
get_ads_by_adsetRetrieves ads within an ad set.
get_ad_creatives_by_ad_idRetrieves creatives associated with an ad.
get_adaccount_insightsRetrieves performance insights for an ad account.
get_campaign_insightsRetrieves performance insights for a campaign.
get_adset_insightsRetrieves performance insights for an ad set.
get_ad_insightsRetrieves performance insights for an ad.
fetch_pagination_urlFetches data from a pagination URL (e.g., from insights).
get_activities_by_adaccountRetrieves change history for an ad account.
get_activities_by_adsetRetrieves change history for an ad set.
When to use it
- Pull Meta Ads performance insights at the account, campaign, ad set or ad level directly from an AI assistant.
- List and inspect ad accounts, campaigns, ad sets, ads and creatives without leaving Cursor or Claude Desktop.
- Audit recent changes to an ad account or ad set via its activity/change history.
- Page through large insight result sets using the returned pagination URLs.
Security notes
Requires a Meta User Access Token (e.g. with the `ads_read` permission), passed via the `--fb-token` command-line argument and stored in the MCP client config. Treat this token as a secret. If the token expires you must generate a new one and update the client configuration. The optional GoMarble one-click installer can create a token on your behalf via GoMarble's server; per the README GoMarble does not store the token — it is saved locally on your machine.
Facebook/Meta Ads MCP Server FAQ
How do I authenticate?
Provide a Meta User Access Token (with permissions such as ads_read) via the --fb-token command-line argument in your MCP client configuration. You can generate the token through the Meta Developer portal, or use the optional GoMarble one-click installer to have a token created on your behalf.
What happens when my token expires?
If your Meta access token expires you'll need to generate a new one and update the MCP client configuration file with the new token to continue using the tools.
Can it modify campaigns, or is it read-only?
The documented tools cover reading objects, fetching collections, performance insights, pagination, and change history. The README describes it as enabling access to Meta Ads data and management features; refer to the docstrings in server.py for the full argument list of each tool.
Is there an easier installation path?
Yes. GoMarble offers a one-click installer at https://gomarble.ai/mcp, and the server can be installed for Claude Desktop automatically via Smithery using 'npx -y @smithery/cli install @gomarble-ai/facebook-ads-mcp-server --client claude'.
Alternatives to Facebook/Meta Ads MCP Server
Compare all alternatives →Official MCP server providing persistent, file-backed knowledge-graph memory across sessions.
Structured step-by-step reasoning tool for breaking problems into revisable thought sequences.
Fully managed remote server for AWS docs, blogs, What's-New and Well-Architected guidance — no key.
Compare Facebook/Meta Ads MCP Server with: