AdStack Setup Guide

Go from a fresh install to a fully built (and safely PAUSED) Meta campaign in about 30 minutes. AdStack runs end-to-end inside Claude Code: buyer research, audience personas, copy, funnel design, image and video creative, campaign build, optimization.

See the live EMBR demo dashboard
Prerequisites Install Connect MCPs Meta Token First Campaign Commands

1 Prerequisites

AdStack runs inside Claude Code. If you already have Claude Code installed, skip to Step 2.

New to Claude Code? Start here.

What is Claude Code?

Claude Code is Anthropic's AI assistant that runs in your terminal (or desktop app). It can read files, write code, call MCP servers, and run scripts. AdStack is a "skill" that tells Claude Code how to plan, build, launch, and optimize Meta campaigns end-to-end.

Install Claude Code

  1. Sign up for an Anthropic account if you don't have one
  2. Subscribe to a plan that includes Claude Code (Pro or Team)
  3. Install Claude Code:
    npm install -g @anthropic-ai/claude-code
    Or download the desktop app.
  4. Verify it works:
    claude --version

System Requirements

  • Node.js 18+ (required for Claude Code CLI install)
    # Download from nodejs.org if not installed
    node --version
  • Claude Code (Anthropic subscription required)
  • Python 3.8+ (for the dashboard server and helper scripts)
    # Mac / Linux:
    python3 --version
    # Windows:
    python --version
  • PyYAML (for the local dashboard server)
    # Mac / Linux:
    pip3 install pyyaml
    # Windows:
    pip install pyyaml
  • curl (preinstalled on macOS/Linux; on Windows use Git Bash or WSL)

Accounts you'll need

  • A Meta ad account you admin (Business Manager) plus a Facebook Page attached to it. Meta requires both for any ad.
  • A Higgsfield account on the Plus plan or higher. AdStack uses Higgsfield for image and video creative generation. Sign up at higgsfield.ai.
No third-party tokens up front. Both MCPs handle their own OAuth. The only optional secret is a Meta access token (covered in Step 4), and only if you want to upload videos until Meta ships video upload to its MCP.

Windows users

AdStack works on Windows, Mac, and Linux. A few Windows notes:

  • Use python instead of python3 and pip instead of pip3
  • The helper scripts use curl against the Meta Graph API. Use Git Bash or WSL so curl is on your PATH.
  • The Claude Code desktop app handles shell compatibility automatically if you'd rather skip the terminal config.

2 Install AdStack

Drop the AdStack folder into your Claude Code project's .claude/skills/ directory.

Extract and place the skill

  1. Download and unzip adstack-template.zip from your Skool delivery email
  2. Move the folder into your project's skills directory:
    # Mac / Linux:
    mv adstack-template ~/your-project/.claude/skills/adstack
    # Windows:
    move adstack-template C:\Users\you\your-project\.claude\skills\adstack
  3. The final path should look like your-project/.claude/skills/adstack/SKILL.md
Don't have a project yet? Make a new folder anywhere (mkdir ~/adstack-work && cd ~/adstack-work), run claude in it, and put the skill at ./.claude/skills/adstack/. The folder becomes your AdStack workspace.

Open the project in Claude Code

# Mac / Linux:
cd ~/your-project
claude
# Windows:
cd C:\Users\you\your-project
claude

Or in the desktop app: File > Open Folder > select your project folder.

Verify the skill is registered

Inside Claude Code, type:

/ads

You should see AdStack's command list appear. If nothing happens, double-check the folder path and that SKILL.md exists at the root of the skill folder.

3 Connect Your MCPs

AdStack uses two MCP servers. Connect both before running any /ads command other than setup.

Meta Ads MCP
Higgsfield MCP

1. Add the official Meta Ads MCP

Meta ships an official, free MCP server. From your terminal (or Claude Code's built-in shell) run:

claude mcp add --transport http meta-ads https://mcp.facebook.com/ads

This registers the MCP endpoint with Claude Code. The server itself handles auth via OAuth.

2. Authenticate

  1. Restart Claude Code so it picks up the new MCP
  2. Inside Claude Code, run /mcp to view connected servers
  3. Select meta-ads and follow the OAuth prompt — it opens a browser window where you log into Facebook and authorize the app
  4. After authorizing, you'll be redirected back. The status should flip to connected.

3. Verify it works

Ask Claude:

list my Meta ad accounts

If the MCP is wired up, you'll see your ad accounts and pages.

What this MCP gives you: 29 tools covering campaigns, ad sets, ads, insights, audience targeting, catalogs, page lookup, and entity activation. It does NOT yet cover video upload or Custom Audience creation — see Step 4 for the optional workaround.

1. Add Higgsfield as a custom connector

Higgsfield runs its MCP as a custom connector accessible through the Claude.ai web UI.

  1. Go to claude.ai and sign in
  2. Open Settings > Connectors (also reachable from the chat sidebar)
  3. Click Add custom connector
  4. Name: higgsfield
  5. For the endpoint URL, check higgsfield.ai for the current MCP URL (it's listed in their developer/MCP section). Paste it into the connector form.
  6. Click Connect and authorize with your Higgsfield login

2. Confirm it's available in Claude Code

Once connected on the web side, Claude Code picks it up automatically. Run /mcp inside Claude Code — you should see higgsfield listed.

Ask Claude:

show my higgsfield workspaces

You should see your workspace list. AdStack will use this in /ads setup to wire one workspace to each business config.

On the wrong plan? Higgsfield's Plus plan or higher is recommended. Free tier credits run out quickly once you start generating a full campaign's worth of creative (typically 50–100 credits per campaign).

Run the AdStack setup command

Once both MCPs are connected, in Claude Code run:

/ads setup --business yourbrand

The setup module verifies both MCPs are responding, lets you pick the right Meta ad account + Facebook Page, picks a Higgsfield workspace, and creates configs/yourbrand.yaml from the brand template. After this you can start running the rest of the /ads commands.

4 Optional: Meta Access Token

Only needed if you want to push video ads to Meta or create Meta Custom Audiences from inside the skill. Image-only campaigns work without it.

Why this exists: The official Meta Ads MCP shipped April 29, 2026 with 29 tools, but it doesn't yet expose POST /act_<id>/advideos (video upload) or POST /act_<id>/customaudiences (Custom Audience create). AdStack bridges those two gaps via direct Graph API calls in scripts/upload-meta-videos.py and scripts/manage-audiences.py. When Meta ships these to the MCP, the helper scripts become obsolete and AdStack will auto-detect the new tools.
Show me the full token setup (≈5 minutes)

1. Open the Graph API Explorer

Go to developers.facebook.com/tools/explorer and sign in with the Facebook account that admins your Business Manager.

2. Create a Meta App (Development mode)

  1. If you don't already have a Meta App, click Create app (top right of the Explorer)
  2. Pick the Business use case
  3. Name it anything (e.g., "AdStack Helpers")
  4. Keep it in Development mode — you don't need app review for your own ad accounts

3. Generate a User Access Token

  1. Back in the Graph API Explorer, pick your new app from the Meta App dropdown
  2. Click Generate Access Token
  3. When asked for permissions, enable:
    • ads_management
    • ads_read
    • business_management
  4. Authorize in the popup
  5. Copy the generated token (starts with EAA...)

4. Extend to ~60 days

  1. Open the Access Token Debugger
  2. Paste your token and click Debug
  3. Click Extend Access Token at the bottom — this swaps your short-lived token for a ~60-day one
  4. Copy the extended token
Tokens expire. Set a calendar reminder for ~50 days from now to refresh. When AdStack hits an auth error on a Graph API call it tells you to refresh and shows the steps.

5. Save it to .env

In the root of your project (not the skill folder), create or edit .env:

META_ACCESS_TOKEN=EAAxxx...

The helper scripts (upload-meta-videos.py, manage-audiences.py) read this single env var. Both scripts run via Claude Code's Bash tool — you never paste the token into chat.

6. Validate

In Claude Code:

/ads setup --business yourbrand

The setup module detects META_ACCESS_TOKEN in your .env, runs a quick read-only call against the Graph API, and confirms the token is valid + which ad accounts it can reach. If the token works you'll see a green "video upload + audience CRUD enabled" line in the output.

Skipping this step

If you're running image-only campaigns or you're fine creating Custom Audiences manually in Ads Manager, you can skip this entirely. AdStack runs all of /ads research, /ads audience, /ads copy, /ads funnel, /ads creative, and /ads launch with image creative through the MCPs alone.

5 Your First Campaign

Here's the full flow from blank business to fully built (and PAUSED) Meta campaign.

1. Set up the business

/ads setup --business yourbrand

Walks you through brand name, colors, voice, the Meta ad account + Page to use, and the Higgsfield workspace. Creates configs/yourbrand.yaml and starts the local dashboard at http://localhost:8080/preview/.

2. Mine real buyer voice

/ads research --business yourbrand

Claude pulls verbatim language from Reddit, reviews, and forums for your category. Output: a buyer-voice document with pain points, objections, desire statements, and source citations. This feeds copy and personas later.

3. Build personas

/ads audience --business yourbrand

3–5 personas built from the research, plus an exclusion strategy: which Custom Audiences (purchasers, current subscribers, refund requesters, etc.) to recommend excluding per campaign goal. You confirm or override at launch time.

4. Generate ad copy

/ads copy --business yourbrand

12 ads × A/B variants across four frameworks (PAS, AIDA, BAB, 4Ps) using language pulled straight from research. Output: a copy markdown file plus headline + hook bank.

5. Design the funnel

/ads funnel --business yourbrand

Campaign structure (acquisition + retargeting), budget split, KPIs, and the exclusion logic per ad set. The dashboard preview updates so you can review before generating creative.

6. Generate creative

/ads creative --business yourbrand

Higgsfield generates ad images and videos (UGC-style, product hero, Marketing Studio presets) referenced to your product or brand. AdStack writes a creative manifest mapping each asset to a planned ad slot.

Credits used. A full campaign typically burns 50–100 Higgsfield credits. AdStack checks your balance before kicking off the batch and confirms with you if it'll exceed a sensible threshold.

7. Build the campaign in Meta — PAUSED

/ads launch --business yourbrand

AdStack shows you the campaign dashboard preview (everything in one screen: structure, ads, copy, creative, audiences, exclusions), waits for your explicit approval, then creates the entire campaign / ad set / ad tree in your real Meta ad account — all in PAUSED state. Nothing activates without you saying go.

8. Activate when you're ready

Open Meta Ads Manager, do a final visual review of each ad in preview mode, then flip the toggle to ACTIVE. Or ask Claude:

activate the yourbrand acquisition campaign

AdStack confirms the entity, double-checks the budget and ad set details, and asks for explicit approval before flipping anything live.

9. Optimize over time

/ads optimize --business yourbrand

Pulls live performance from ads_insights_*, applies industry benchmarks, surfaces winners + losers, and recommends actions (scale, kill, refresh). You approve every change before it runs.

10. Report

/ads report --business yourbrand

Performance report with industry-benchmark context. Good for weekly check-ins or client reviews.

6 Command Reference

Everything you can say to Claude with AdStack installed.

Setup & orchestration

/ads setupOne-time business config: connect MCPs, validate token, set up the live dashboard
/ads previewOpen the local dashboard at http://localhost:8080/preview/
/ads publishGenerate a deployable demo dashboard with CDN-hosted assets (for marketing pages)

Research & planning

/ads researchMine Reddit, reviews, and forums for verbatim buyer voice
/ads audienceBuild 3–5 personas + recommend Custom Audience exclusions per goal
/ads copyGenerate ad copy variations using real buyer language (PAS / AIDA / BAB / 4Ps)
/ads funnelDesign campaign architecture, budget split, KPIs

Creative & launch

/ads creativeGenerate ad images + videos via Higgsfield
/ads launchBuild the full campaign in Meta — always PAUSED — with a dashboard preview first
/ads audiencesCreate or list Meta Custom Audiences for exclusion-aware retargeting (requires Meta token)

Optimize & report

/ads optimizePull live performance, surface winners + losers, execute approved changes
/ads reportPerformance report with industry benchmark context
/ads statusQuick performance snapshot
/ads pause <name>Pause a campaign, ad set, or ad
/ads scale <name>Increase budget on a winner (default +20%, you confirm)

Natural language works too

You don't have to use slash commands. Any of these route to the right module automatically:

  • "launch a campaign for yourbrand"
  • "generate ad creative for the new launch"
  • "check my ad performance for the last 7 days"
  • "pause campaign cold-acquisition"
  • "scale my best ad set"

Safety: nothing activates without your approval

AdStack is designed to never spend a dollar without an explicit "go" from you.

AdStack ALWAYS

  • Creates campaigns, ad sets, and ads in PAUSED state
  • Shows the dashboard preview before any activation
  • Asks for explicit confirmation before flipping anything to ACTIVE
  • Surfaces every exclusion/audience decision per ad set so you can override
  • Asks before uploading creative, creating audiences, or changing budgets

AdStack NEVER

  • Activates ads automatically
  • Spends money without you saying "go"
  • Modifies your existing live campaigns without explicit instruction
  • Uploads videos or creates audiences without permission

Troubleshooting

Meta Ads MCP shows as disconnected
  • Run claude mcp list and confirm meta-ads is in the list pointing at https://mcp.facebook.com/ads
  • If missing, re-add: claude mcp add --transport http meta-ads https://mcp.facebook.com/ads
  • Restart Claude Code and re-run the OAuth flow via /mcp
  • Confirm the Facebook account you authorized has admin access to the Business Manager you want to use
Higgsfield generation seems stuck

A few known Higgsfield quirks AdStack handles automatically — but if you're poking manually:

  • 5xx errors that succeeded server-side. If a video generation call returns 500, always check show_generations before retrying. The job often completed and a retry burns credits.
  • Stale job_display. Job status from job_display can lag. Use show_generations for the source of truth.
  • Concurrency cap. The Plus plan caps concurrent jobs at 6. AdStack batches in waves and waits for each batch to drain.
Video upload fails with subcode 1443226

Meta requires every video ad to include an image_url thumbnail when the creative is built. AdStack pulls a thumbnail from the matching Higgsfield CDN image automatically — but if you're constructing creative manually, make sure video_data.image_url is set.

Meta token expired

User access tokens last about 60 days. To refresh:

  1. Go back to Graph API Explorer
  2. Click Generate Access Token with the same permissions (ads_management, ads_read, business_management)
  3. Extend it via the Token Debugger
  4. Replace META_ACCESS_TOKEN in .env with the new token
The dashboard isn't loading at localhost:8080
  • Check that scripts/generate-preview.py is running. /ads setup starts it; you can also start it manually with python3 .claude/skills/adstack/scripts/generate-preview.py
  • Make sure port 8080 isn't in use by another local server. If it is, kill the conflicting process or change the port at the top of the script.
  • Confirm PyYAML is installed: pip3 install pyyaml