What it does?
A Python script pulls month-to-date spend from Meta and Google via GoMarble MCP and reconciles it into one view — flagging budget variance, run rate, and the Meta/Google split before month-end.
What you need
- → Meta ad account ID (act_...) and/or Google Ads customer ID
- → Optional: monthly budget targets for Meta and/or Google (--meta-budget, --google-budget)
- → GoMarble API key
- → Anthropic API key
First, connect Claude Code to your ad accounts
Set up GoMarble MCP once, then paste the build prompt below into Claude Code.
Install Claude Code and Python
Download Claude Code and Python if you don't already have them installed.
Connect your ad accounts on GoMarble
Go to apps.gomarble.ai, sign up, and connect your Meta Ads and/or Google Ads account in the Integrations page.
Get your GoMarble API key
In GoMarble, go to Settings → API Key, copy it, and save it somewhere safe.
Add GoMarble MCP to Claude Code
Run the command below in your terminal to connect Claude Code to your GoMarble MCP server.
Claude Pro or Max is recommended for higher usage limits.
The script
Paste this into Claude Code — it will write the Python CLI script for you, based on this spec.
What you get back
-
→
Format: Running the generated script (e.g. `python spend_reconciliation.py --meta act_123456 --google 1234567890 --meta-budget 50000 --google-budget 30000`) writes two files:
- – reconciliation.csv — daily/campaign-level spend rows
- – reconciliation_brief.txt — an AI-written brief covering MTD-vs-budget variance, daily run rate, projected month-end spend, and the Meta% vs Google% split
Want this automated?
Run the prompt above every Monday morning automatically. GoMarble Agents don't just deliver the report (Slack / email / in-app) — they can execute the recommended changes directly in your ad account, too. Offload the whole recurring task and stop doing it manually.
Try GoMarble Agents free →FAQ
Does this script work if I only advertise on one platform?
What data does it pull?
Do I need to know Python to use this?
What's in the output files?
Are the budget targets required?
Does it modify my campaigns?
Skip the prompt — let GoMarble do this for you.
Sign up, connect your ad accounts, and cross-channel spend reconciliation runs on every account, every week, automatically.