跳到正文
FunCoding

meta-ads-analyzer

Meta Ads Analyzer skill + MCP server for Claude Code. Breakdown Effect, Learning Phase, and expert-level campaign diagnosis.

Star
476
许可证
MIT
最近提交
2026年2月27日

Meta Ads Analyzer for Claude Code

A Claude Code skill + MCP server setup for expert-level Meta Ads campaign analysis. Includes the Breakdown Effect framework, Learning Phase diagnostics, and 9 reference documents from Meta's official documentation.

What It Does

When installed, Claude Code can:

  • Analyze campaign, ad set, and ad-level performance data
  • Identify root causes of performance issues using Meta's system mechanics
  • Explain the Breakdown Effect (why Meta allocates budget to seemingly "worse" segments)
  • Diagnose Learning Phase, Auction Overlap, Pacing, and Creative Fatigue issues
  • Generate structured analysis reports with actionable recommendations
  • Connect directly to Meta's API to pull live campaign data (via MCP)

Components

ComponentWhat it does
Skill (skill/)Analysis framework with 9 reference docs that Claude loads as context
MCP Server (mcp/)Connects Claude Code to Meta's Marketing API for live data
Scripts (scripts/)Setup and token refresh helpers

Prerequisites

Installation

1. Install the Skill

Copy the skill/ folder into your Claude Code project:

# From your Claude Code project root
mkdir -p .claude/skills/meta-ads-analyzer
cp -r skill/* .claude/skills/meta-ads-analyzer/

The skill is now active. Claude will automatically use it when you ask about Meta Ads analysis.

2. Set Up the MCP Server (optional, for live data)

The MCP server lets Claude pull live campaign data from Meta's API. Skip this if you only want to analyze exported data (CSV, screenshots).

a) Create a Meta App
  1. Go to developers.facebook.com
  2. Create a new app (type: Business)
  3. Add the Marketing API product
  4. Note your App ID and App Secret
b) Generate an Access Token
  1. Go to Graph API Explorer
  2. Select your app
  3. Add permissions: ads_read, ads_management, business_management
  4. Click Generate Access Token and authorize
  5. Exchange for a long-lived token (60 days) using the setup script:
bash scripts/setup.sh
c) Configure Claude Code

Copy the MCP config template and add your credentials:

cp mcp/mcp.json.example .mcp.json

Edit .mcp.json and replace the placeholders with your actual token and app secret.

Then restart Claude Code for the MCP server to connect.

3. Verify

Ask Claude: "Analyze my Meta Ads campaigns" — it should connect to your ad account and start analyzing.

Token Refresh

Meta long-lived tokens expire after ~60 days. To refresh:

bash scripts/refresh_token.sh

If the token already expired, generate a new one from the Graph API Explorer and run scripts/setup.sh again.

Usage Examples

Once installed, you can ask Claude things like:

  • "Analyze my campaigns from the last 7 days"
  • "Why is my CPA increasing on this campaign?"
  • "Compare performance across placements"
  • "Diagnose why this ad set is in Learning Limited"
  • "Export a full analysis report for [campaign name]"

You can also paste CSV exports or screenshots from Meta Ads Manager — the skill works with any data format.

What's in the Reference Docs

DocumentCovers
breakdown_effect.mdWhy Meta allocates budget to "expensive" segments
core_concepts.mdAd Auction, Pacing, Learning Phase overview
learning_phase.mdHow learning works, when it resets
ad_relevance_diagnostics.mdQuality, Engagement, Conversion rankings
auction_overlap.mdWhen your ads compete against each other
pacing.mdBudget and bid pacing mechanics
bid_strategies.mdSpend-based, goal-based, manual bidding
ad_auctions.mdHow auction winners are determined
performance_fluctuations.mdNormal vs. concerning performance changes

License

MIT

同类 MCP Server

官方

Git

Read, search and manipulate Git repositories: status, diff, log, commit, branch and more

MOmodelcontextprotocol/servers92k近 7 天新增 200 个 star

精选

headroom

压缩工具输出、日志和文件,减少 20%-95% token,答案不变。

HEheadroomlabs-ai/headroom81k近 7 天新增 538 个 star

精选

Codebase Memory

把代码库索引成知识图谱,查询代码结构时少读文件、省 token。

DEDeusData/codebase-memory-mcp49k近 7 天新增 309 个 star

精选

GitHub

管理仓库、Issue、Pull Request 和 Actions。

GIgithub/github-mcp-server35k近 7 天新增 181 个 star

精选

serena

基于语言服务器的语义检索与编辑,按符号查找和修改代码。

ORoraios/serena32k近 7 天新增 209 个 star

Compiler Explorer

Compile code with thousands of compilers, inspect the assembly, and share godbolt.org links

COcompiler-explorer/compiler-explorer19k近 7 天新增 7 个 star