home / mcp / meta ads mcp server
Provides access to Meta Marketing API data and actions for campaigns, analytics, audiences, and creatives via MCP.
Configuration
View docs{
"mcpServers": {
"brijr-meta-mcp": {
"url": "https://your-project.vercel.app/api/mcp",
"headers": {
"META_APP_ID": "YOUR_APP_ID",
"META_API_TIER": "standard",
"META_MCP_DEBUG": "1",
"META_APP_SECRET": "YOUR_APP_SECRET",
"META_API_VERSION": "v23.0",
"META_BUSINESS_ID": "BUSINESS_ID",
"META_ACCESS_TOKEN": "EAAB...",
"META_AUTO_REFRESH": "true",
"META_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN",
"META_MCP_REQUEST_TIMEOUT_MS": ","
}
}
}
}You can run a Meta Marketing API MCP Server to empower AI assistants with direct access to Meta ad data. This server handles campaigns, analytics, audiences, and creatives, enabling automated workflows and rich contextual data for smarter advertising decisions.
You interact with the MCP server from your MCP client (for example Claude Desktop or Cursor) by configuring a server entry that points to either a local stdio process or a remote HTTP endpoint. The server exposes a set of tools to manage campaigns, pull analytics, handle audiences, and create or review ad creatives. Use the client to issue high-level actions like creating a campaign, retrieving insights, or building audiences, and rely on the server to translate those requests into Meta Marketing API calls with proper error handling and rate limiting.
Typical usage patterns include: creating a new campaign with a target objective, fetching performance data for a date range, listing ad accounts, or generating lookalike audiences. You can also set up health checks to verify authentication and connectivity before running production workloads.
Prerequisites: you need Node.js and npm installed on your system.
# Install the MCP server globally
npm install -g meta-ads-mcp
# Optional: verify version
meta-ads-mcp --versionConfigure your MCP client to connect to the local MCP server or the remote endpoint. The source provides concrete configuration examples for Claude Desktop and Cursor. Use these as starting points and replace placeholders with your actual tokens and IDs.
{
"mcpServers": {
"meta-ads": {
"command": "npx",
"args": ["-y", "meta-ads-mcp"],
"env": {
"META_ACCESS_TOKEN": "your_access_token_here"
}
}
}
}Add the MCP server configuration to your clientβs settings. For Claude Desktop the configuration path is your clientβs MCP configuration file. For Cursor, add the same JSON block in the Claude extension settings.
After configuring, restart your client and run a health check to confirm the server is reachable and authenticated.
npm run health-checkRetrieve detailed performance metrics such as impressions, clicks, ROAS, CTR, CPC, and more for specified accounts and date ranges.
Compare performance across multiple campaigns or ads side-by-side within a given date range.
Export performance data in JSON or CSV formats for reporting and analysis.
Create a new advertising campaign with full configuration including objective and budget.
Update properties of an existing campaign such as name, budget, or status.
Pause active campaigns to halt spending.
Resume paused campaigns to restart ads serving.
Create ad sets with targeting, budget, schedule, and optimization goals.
List ad sets within campaigns with filtering options.
Create a new ad within an ad set using a specified creative.
List ads with filtering by ad set, campaign, or account.
List all custom audiences for an account.
Create a custom audience from various sources.
Generate a lookalike audience from a source audience.
Get detailed information about a specific audience.
List all ad creatives for an account.
Create new ad creatives with rich specifications (supports external image URLs).
Perform a comprehensive authentication and server status check.
List accessible Meta ad accounts.
List campaigns with filtering options.
Validate the current access token and show its permissions and expiry.
Check if a campaign is ready for ad set creation and identify issues.
Validate account setup including payment methods and permissions.