ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Attach Meta Ads MCP to Claude Code (Terminal)
Tutorial

How to Attach Meta Ads MCP to Claude Code (Terminal)

An r/ClaudeCode post asked how to wire Meta Ads MCP into Claude Code in the terminal. Walk-through with Scavio for competitor SERP context.

Get Free API KeyAPI Docs

An r/ClaudeCode thread asked how to wire Meta Ads MCP into Claude Code (terminal) — most tutorials show the claude.ai connector path only. This walks the CLI path, plus Scavio for live competitor SERP context.

Prerequisites

  • Claude Code CLI
  • Meta Business account with ads_management scope access
  • Scavio API key
  • (Optional) Google Ads MCP

Walkthrough

Step 1: Find a maintained Meta Ads MCP repo

Several exist; pick by recent commits + scope.

Bash
# Search GitHub for 'meta-ads-mcp' or 'facebook-ads-mcp'. Verify:
# - active commits in the last 90 days
# - explicit scope handling
# - reasonable license

Step 2: Install per the repo's README and run the auth flow

OAuth or token in env var.

Bash
export META_ACCESS_TOKEN=...
claude mcp add meta-ads <node-or-python-cmd-from-repo>

Step 3: Add Scavio MCP for competitor SERP context

Live ad-copy and competitor signal.

Bash
claude mcp add scavio https://mcp.scavio.dev/mcp --header 'x-api-key: $SCAVIO_API_KEY'

Step 4: Set routing rules in Claude Code system prompt

Each MCP has a clear job.

Text
// 'For account/campaign/ad performance lookups, call meta-ads. For competitor ad copy, recent SERP for keywords, or Reddit signal on ad creative, call scavio.'

Step 5: Run a daily ad-account audit

End-to-end pattern.

Text
// 'Pull the last 7 days of campaign performance from meta-ads. For each underperforming campaign, run scavio competitor SERP for the campaign keyword. Suggest 3 creative variations.'

Step 6: OAuth scope warning

Read scopes before approval.

Text
// 'ads_management' lets the agent edit/spend. Use a sandbox account first; gate edits behind explicit user confirmation.

Python Example

Python
# Per-account-month: 50 reports + 30 competitor SERP = ~80 calls × $0.0043 = $0.34.

JavaScript Example

JavaScript
// CLI MCP setup; no JS application code.

Expected Output

JSON
Claude Code (terminal) with Meta Ads MCP attached + Scavio for competitor SERP context. Daily ad audits + creative suggestions in one session.

Related Tutorials

  • How to Run Claude Code Sessions on Linear Tickets

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Claude Code CLI. Meta Business account with ads_management scope access. Scavio API key. (Optional) Google Ads MCP. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Use Case

Paid Ads via MCP (Claude Code CLI)

Read more
Best Of

Best MCP Servers for Paid Ads in Claude Code (2026)

Read more
Solution

Paid Ads MCP Stack (Claude Code, CLI)

Read more
Use Case

Weekly SEO Reporting with Claude Code

Read more
Best Of

Best Search API for Claude Code in 2026

Read more
Workflow

Claude Code Web Search via Scavio MCP

Read more

Start Building

An r/ClaudeCode post asked how to wire Meta Ads MCP into Claude Code in the terminal. Walk-through with Scavio for competitor SERP context.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy