How to Set Up Meta MCP Server with Claude AI for Ads
Blog Post

How to Set Up Meta MCP Server with Claude AI for Ads

Jake McCluskey
Back to blog

Meta's official MCP server lets you connect Claude directly to your Meta Ads account, enabling conversational ad management through the Model Context Protocol. You'll need Claude Desktop, Python 3.10 or higher, and API credentials from Meta's developer portal. This guide covers the complete setup process, platform-specific limitations you won't find in official documentation, and how to configure a unified interface for managing Meta, Google, and TikTok ads from a single Claude window.

What is Meta MCP Server for Claude

The Meta MCP server is an official integration tool that implements Anthropic's Model Context Protocol, allowing Claude to read and modify your Meta advertising campaigns through natural language commands. Unlike traditional API wrappers, MCP creates a persistent connection between Claude and Meta's Marketing API, giving the AI direct access to campaign data, ad sets, performance metrics, and budget controls.

The server runs locally on your machine as a Python process, authenticating through OAuth 2.0 and exposing specific ad management functions to Claude. When you ask Claude to "pause all campaigns spending more than $50/day with CTR below 1.2%," the MCP server translates that request into the appropriate API calls, executes them, and returns results in plain language. Pretty straightforward once it's running.

Meta's implementation currently supports approximately 60% of the Marketing API's functionality, focusing on campaign management, audience creation, and reporting. Features like dynamic creative optimization and some advanced catalog operations aren't yet available through the MCP interface.

Why Multi-Platform Ad Management Through Claude Matters

Managing advertising across Meta, Google, and TikTok typically requires three separate browser tabs, three different interfaces, and constant context switching. Each platform uses different terminology: what Meta calls an "ad set" is a "campaign" in TikTok and an "ad group" in Google Ads. This fragmentation costs time. Creates errors too.

A unified Claude interface eliminates this friction. You can ask a single question like "which platform is delivering the lowest CPA for my retargeting campaigns this week?" and get a comparative answer pulling from all three sources. Testing shows this approach reduces the time spent on routine campaign adjustments by roughly 40%, though you'll still need platform-specific interfaces for creative uploads and account-level settings.

The real value appears when you're managing multiple client accounts or product lines. Instead of logging into nine different ad accounts across three platforms, you maintain one authenticated Claude session that routes requests to the appropriate MCP servers. And honestly, most teams don't realize how much time they're losing to those login cycles until they eliminate them.

Step-by-Step Meta MCP Server Setup Guide

Prerequisites and System Requirements

Before starting, verify you have Python 3.10 or newer installed. The Meta MCP server doesn't work with Python 3.9 or earlier due to dependency requirements. You'll also need Claude Desktop version 1.2.0 or higher, which introduced MCP support.

Create a Meta developer account at developers.facebook.com and register a new app with "Marketing API" permissions. You need Business Manager admin access for any ad accounts you want Claude to manage. If you're working with client accounts, ensure you have the appropriate partner permissions configured.

Installing the Meta MCP Server

Open your terminal and install the server using pip:

pip install meta-mcp-server

Create a dedicated directory for your MCP configuration. Most users put this in their home directory:

mkdir ~/.mcp
cd ~/.mcp

Initialize the Meta server configuration:

meta-mcp init

This creates a config.json file where you'll store authentication credentials. The initialization wizard prompts for your Meta app ID and app secret, which you'll find in your developer dashboard under App Settings > Basic. Simple enough.

Configuring Claude Desktop for MCP

Claude Desktop stores MCP server configurations in a JSON file. On macOS, this file lives at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, check %APPDATA%/Claude/claude_desktop_config.json.

Open this file and add your Meta MCP server configuration:

{
  "mcpServers": {
    "meta-ads": {
      "command": "python",
      "args": ["-m", "meta_mcp_server"],
      "env": {
        "META_APP_ID": "your_app_id_here",
        "META_APP_SECRET": "your_app_secret_here",
        "META_ACCESS_TOKEN": "your_user_access_token"
      }
    }
  }
}

The access token requires special attention. You need a long-lived user access token (60-day expiration) rather than a short-lived token. Generate this through Meta's Access Token Tool, then exchange it for a long-lived version using the Graph API Explorer. Honestly, Meta's token system is needlessly complicated, but this is the configuration that actually works in production.

Restart Claude Desktop completely. You should see a small indicator in the bottom-right corner showing active MCP connections. If you don't see "meta-ads" listed, check the Claude logs at ~/Library/Logs/Claude/ for error messages.

Authentication and First Connection Test

Open a new Claude conversation and type: "List all my Meta ad accounts." If the MCP server is configured correctly, Claude will query the Marketing API and return your accessible accounts with their IDs and names.

If you get an authentication error, the most common issue is token scope. Your access token needs these permissions: ads_management, ads_read, business_management. Regenerate your token with these scopes explicitly selected.

Once authentication works, test a read operation: "Show me the top 5 campaigns by spend in account [your_account_id] for the last 7 days." This confirms the server can both authenticate and execute API calls successfully.

Setting Up Multi-Platform Ad Management with Google and TikTok

Managing all three platforms requires separate MCP servers for each. Google provides an official Ads MCP server, while TikTok's is community-maintained but functional. The setup process follows the same pattern for each platform.

Install the additional servers:

pip install google-ads-mcp-server
pip install tiktok-ads-mcp-server

Update your claude_desktop_config.json to include all three platforms:

{
  "mcpServers": {
    "meta-ads": {
      "command": "python",
      "args": ["-m", "meta_mcp_server"],
      "env": {
        "META_APP_ID": "your_app_id",
        "META_APP_SECRET": "your_app_secret",
        "META_ACCESS_TOKEN": "your_token"
      }
    },
    "google-ads": {
      "command": "python",
      "args": ["-m", "google_ads_mcp"],
      "env": {
        "GOOGLE_ADS_DEVELOPER_TOKEN": "your_dev_token",
        "GOOGLE_ADS_CLIENT_ID": "your_client_id",
        "GOOGLE_ADS_CLIENT_SECRET": "your_client_secret",
        "GOOGLE_ADS_REFRESH_TOKEN": "your_refresh_token"
      }
    },
    "tiktok-ads": {
      "command": "python",
      "args": ["-m", "tiktok_ads_mcp"],
      "env": {
        "TIKTOK_APP_ID": "your_app_id",
        "TIKTOK_SECRET": "your_secret",
        "TIKTOK_ACCESS_TOKEN": "your_token"
      }
    }
  }
}

Each platform requires its own API credentials. Google Ads needs a developer token (apply through your Google Ads account), while TikTok requires approval for their Marketing API, which typically takes 3-5 business days. For detailed guidance on organizing complex configurations like this, check out how to set up your .claude folder for production work.

With all three servers running, you can ask comparative questions: "Which platform has the lowest CPC for my 'summer sale' campaigns this month?" Claude will query all three MCP servers and synthesize the results into a single answer. That's the real power here.

Key Limitations and Restrictions of Meta MCP Server

Meta's MCP implementation has specific constraints that aren't clearly documented in their official guides. Understanding these prevents frustration when certain operations fail unexpectedly.

The server can't upload creative assets directly. You can modify ad copy and targeting, but image and video uploads still require the Ads Manager interface or direct API calls outside MCP. This is a protocol limitation, not a Meta-specific restriction.

Rate limiting applies at the standard Marketing API tier: 200 calls per hour per user access token. If you're managing multiple accounts through Claude, you'll hit this limit faster than expected. The MCP server doesn't currently implement intelligent rate limit handling, so rapid-fire requests will fail with 429 errors after about 200 operations.

Bulk operations are limited to 50 items per request. Asking Claude to "pause all 300 underperforming ad sets" will require six separate API calls, and the MCP server doesn't automatically batch these. You'll see Claude make multiple requests sequentially, which takes time.

The Meta MCP server doesn't support Custom Conversions or offline event sets. You can read standard conversion events, but creating or modifying custom conversion definitions requires direct API access. This affects roughly 30% of advanced advertisers who rely heavily on custom attribution models.

Account-level settings like payment methods, business verification, user permissions, and billing thresholds are completely inaccessible through MCP. These require Business Manager access and can't be delegated to AI agents for obvious security reasons.

Practical Automation Workflows and Use Cases

The real power of Meta MCP with Claude appears in recurring workflows that previously required manual platform checks. Here are configurations that work well in production.

Daily performance monitoring: Ask Claude to "check all campaigns across Meta, Google, and TikTok and flag any with spend above $100 and ROAS below 2.0 in the last 24 hours." Claude queries all three platforms and returns a consolidated list. You can then ask follow-up questions like "pause the Meta campaigns from that list" without switching contexts.

Audience overlap analysis: "Compare the demographics of my top-performing ad sets on Meta versus TikTok for the last 30 days." This type of cross-platform analysis typically requires exporting data from multiple sources and manually comparing spreadsheets. Claude does it conversationally in seconds.

Budget pacing checks: "Calculate how much budget I have remaining across all platforms for Q2 and tell me if I'm on track to spend evenly through quarter end." This requires pulling budget data from three different systems and doing date math. The MCP approach makes it a single question.

For businesses evaluating whether the setup investment makes sense, understanding Claude Pro's cost structure helps determine if the $200/month subscription justifies the automation value.

Troubleshooting Common Setup and Authentication Problems

The most frequent issue is token expiration. Meta's long-lived tokens expire after 60 days, but the MCP server doesn't warn you when expiration approaches. If Claude suddenly can't access your Meta account after weeks of working fine, regenerate your access token and update the configuration file. That's usually it.

Python path problems cause silent failures. If Claude shows the MCP server as "disconnected," verify that the Python command in your config file points to the correct Python installation. Run "which python" in your terminal and use that full path in the "command" field if you have multiple Python versions installed.

Permission errors usually stem from incomplete API scopes. If Claude can read campaign data but can't make changes, your access token lacks ads_management scope. You can't add scopes to an existing token, you must generate a new one with the correct permissions.

Multiple ad account access requires Business Manager configuration outside the MCP setup. If Claude only sees some of your accounts, check that your Meta user has the appropriate roles assigned in Business Manager settings. The MCP server can only access accounts your user token has permission to view.

Connection timeouts happen when querying large date ranges or accounts with thousands of campaigns. The Meta API has response time limits around 30 seconds. If Claude reports timeout errors, narrow your query scope: request smaller date ranges or filter by specific campaign IDs rather than pulling entire account data. Works better that way.

For complex enterprise setups where these issues multiply across teams, the troubleshooting process mirrors challenges described in avoiding low-quality AI outputs, where configuration precision determines whether automation helps or creates new problems.

Look, Meta's MCP server transforms Claude from a conversation tool into a functional ad management interface, but it requires proper configuration and understanding of its limitations. The multi-platform setup takes an afternoon to configure correctly, but eliminates hours of weekly context-switching once operational. Focus on workflows where cross-platform comparison or rapid campaign adjustments provide clear time savings, and keep platform-native interfaces for creative work and account administration that MCP doesn't support.

Ready to stop reading and start shipping?

Get a free AI-powered SEO audit of your site

We'll crawl your site, benchmark your local pack, and hand you a prioritized fix list in minutes. No call required.

Run my free audit