Server facts
facebook-ads-mcp-server
GitHub stars
370
Last commit
Aug 5, 2026
Runtime
python
License
MIT
Project
- Author
- gomarble-ai
- License
- MIT
- Category
- Data & Analytics
Tech
- Runtime
- python
- Transports
- stdio
- Remote access
- No
- Authentication
- Meta User Access Token (--fb-token, e.g. ads_read) or GoMarble local installer
Activity
- GitHub stars
- 370
- Last commit
- Data as of
Tags
- Data Analysis
- facebook ads
- mcp server
Overview
Performance marketers and growth analysts building a `facebook ads mcp` workflow can query Meta Ads Manager objects directly from Cursor or Claude Desktop using `gomarble-ai/facebook-ads-mcp-server` (Python 3.10+, MIT license, built on `mcp >=1.6.0` and `requests >=2.32.3`). Setup supports either manual Python installation—creating a virtual environment, running `pip install -r requirements.txt`, generating a Meta User Access Token with scopes such as `ads_read`, and pointing `mcpServers` at `python /path/to/server.py --fb-token YOUR_META_ACCESS_TOKEN` over `stdio`—or downloading GoMarble's local installer from `gomarble.ai/mcp`, which automates local configuration and can optionally mint a token via GoMarble's server while saving it only on your machine.
Its read-focused toolset covers full Meta Ads hierarchy traversal and reporting: listing linked accounts (`list_ad_accounts`), fetching individual accounts, campaigns, ad sets, ads, and creatives by ID, enumerating collections per account/campaign/ad set, pulling account, campaign, ad-set, and ad insights (`get_adaccount_insights`, `get_campaign_insights`, `get_adset_insights`, `get_ad_insights`), following paginated insights cursors (`fetch_pagination_url`), and auditing change logs (`get_activities_by_adaccount`, `get_activities_by_adset`). Most tools accept filtering, field selection, date range, limit, and pagination arguments documented in `server.py`.
Install & configure
Requirements
- Python 3.10+ and packages from `requirements.txt` (`mcp >=1.6.0`, `requests >=2.32.3`)
- Meta User Access Token with `ads_read` (or required Meta Ads permissions), passed via `--fb-token` (or minted locally via the GoMarble installer at `gomarble.ai/mcp`)
- Local MCP client such as Claude Desktop or Cursor configured for `stdio` execution
pip install -r requirements.txtClone the repository, install dependencies with `pip install -r requirements.txt` (ideally inside a virtual environment), and configure `mcpServers` in Claude Desktop or Cursor to run `python /path/to/server.py --fb-token YOUR_META_ACCESS_TOKEN`. Restart the client after saving, or use the local installer at `gomarble.ai/mcp`.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"fb-ads-mcp-server": {
"command": "python",
"args": [
"/path/to/your/fb-ads-mcp-server/server.py",
"--fb-token",
"YOUR_META_ACCESS_TOKEN"
]
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"fb-ads-mcp-server": {
"command": "python",
"args": [
"/path/to/your/fb-ads-mcp-server/server.py",
"--fb-token",
"YOUR_META_ACCESS_TOKEN"
]
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"fb-ads-mcp-server": {
"type": "stdio",
"command": "python",
"args": [
"/path/to/your/fb-ads-mcp-server/server.py",
"--fb-token",
"YOUR_META_ACCESS_TOKEN"
]
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"fb-ads-mcp-server": {
"command": "python",
"args": [
"/path/to/your/fb-ads-mcp-server/server.py",
"--fb-token",
"YOUR_META_ACCESS_TOKEN"
]
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"fb-ads-mcp-server": {
"type": "stdio",
"command": "python",
"args": [
"/path/to/your/fb-ads-mcp-server/server.py",
"--fb-token",
"YOUR_META_ACCESS_TOKEN"
]
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| list_ad_accounts | List Meta ad accounts accessible under the configured access token. |
| get_details_of_ad_account | Fetch detailed metadata and configuration for a specified Meta ad account. |
| get_campaign_by_id | Retrieve metadata and settings for a single Meta Ads campaign by ID. |
| get_adset_by_id | Retrieve targeting, budget, and status details for a specific ad set by ID. |
| get_ad_by_id | Fetch full object details for a single Meta ad by ID. |
| get_ad_creative_by_id | Inspect creative assets and specifications for an individual ad creative ID. |
| get_adsets_by_ids | Batch-retrieve details for multiple ad sets given a list of ad set IDs. |
| get_campaigns_by_adaccount | List campaigns belonging to a target Meta ad account with optional filtering and fields. |
| get_adsets_by_adaccount | List all ad sets under a specified Meta ad account. |
| get_ads_by_adaccount | List ads inside a target Meta ad account. |
| get_adsets_by_campaign | List ad sets organized under a specific Meta Ads campaign. |
| get_ads_by_campaign | Retrieve all ads running inside a given campaign. |
| get_ads_by_adset | Retrieve ads assigned to a specific ad set. |
| get_ad_creatives_by_ad_id | Fetch creative definitions linked to a specific ad ID. |
| get_adaccount_insights | Pull performance insights and metrics at the Meta ad account level. |
| get_campaign_insights | Pull campaign-level performance metrics with date range, field, and filter options. |
| get_adset_insights | Pull ad-set-level performance insights for spend and conversion analysis. |
| get_ad_insights | Pull individual ad performance insights for creative evaluation. |
| fetch_pagination_url | Follow a Meta Graph API pagination cursor URL returned by insights or collection tools. |
| get_activities_by_adaccount | Retrieve the historical activity and change log for a Meta ad account (paired with get_activities_by_adset for ad-set logs). |
Use cases
- Pull account, campaign, ad-set, and ad performance insights into Claude Desktop to diagnose spend, fatigue, and ROAS shifts.
- Traverse Meta Ads hierarchies from `list_ad_accounts` down to individual ad creatives via `get_ad_creatives_by_ad_id`.
- Audit recent budget, targeting, or status edits across an account or ad set using `get_activities_by_adaccount` and `get_activities_by_adset`.
- Page cleanly through large Meta Ads insight responses with `fetch_pagination_url` without writing custom Graph API scripts.
Strengths
- Covers 20+ documented tools spanning Meta Ads hierarchy reads, multi-level performance insights, pagination, and change-history auditing.
- Runs locally over `stdio` with minimal Python dependencies (`mcp` and `requests`) under an MIT license.
- Offers both direct manual Meta Developer token configuration (`--fb-token`) and an optional local GoMarble installer that avoids manual portal setup.
Limitations
- Runs locally over `stdio` only—there is no hosted remote MCP URL documented for browser-only connectors.
- Manual Meta User Access Tokens expire periodically and require regenerating and updating your MCP client configuration.
- Documented tools focus on reading accounts, creatives, insights, and activity logs rather than mutating campaigns or budgets.
facebook-ads-mcp-server setup notes
- facebook-ads-mcp-server's stdio example needs a client that launches local processes.