Open-source Claude Code kit
“What's my cost per lead this month?” Claude pulls the real number straight from the Meta Marketing API and answers. No dashboards, no CSV exports, no MCP server to run. Just your own Meta account, one access token, and curl.
Meta's Ads Manager is built for people who live in it. Most firm owners do not. They want three numbers and a straight answer, and instead they get a reporting UI with forty column options.
Nexus for Meta removes the UI. You clone the repo, paste one Meta system-user token, and then talk to Claude about your marketing the way you would talk to an analyst who already has the tab open. Claude calls the Graph API directly and answers from live data.
It reads by default. It only creates, edits or pauses anything when you ask for that specific change, and it tells you the exact action and dollar amounts before it runs.
How did my ads perform last month? Spend, leads, cost per lead.
Break performance down by campaign, then by ad.
Which ad is my best? Give me the Instagram link.
How many leads came in this week, and from which form?
How are my Page and Instagram accounts growing?
Draft a new campaign for X. Build it paused so nothing spends.
You need the Claude Code CLI or the Claude desktop app, and a Meta system-user access token for your business. Getting the token takes a few minutes and it never expires. SETUP.md walks through two ways to create one.
Then paste this to Claude:
Clone https://github.com/redwoodmeridian/nexus-for-meta, open it, read its README and follow the setup to connect my Meta account. I already have my system-user token ready to paste.
Claude clones the repo, creates your .env, asks for the token, writes it for you, and runs the connection check. If your ad account and Page come back, you are live.
Prefer to drive it yourself?
git clone https://github.com/redwoodmeridian/nexus-for-meta cd nexus-for-meta cp .env.example .env # paste your token after META_TOKEN= ./scripts/verify
| File | What it does |
|---|---|
CLAUDE.md | Tells Claude how to operate the kit and stay inside the safety rules. |
.claude/skills/nexus-for-meta/ | The recipe library Claude reads for every request. |
scripts/meta | Authenticated Graph API caller — loads your token, handles nested fields, pretty-prints. |
scripts/verify | Token health check. Shows exactly which accounts and Pages the token can reach. |
scripts/doctor | Diagnoses a broken connection and tells you which fix applies. |
SETUP.md | Two ways to get a Meta system-user token. |
examples/ | Real transcripts of the kit answering real questions. |
.env.example | Where your token goes. Copy to .env, which is git-ignored. |
Create a Meta system-user token in Business Settings with your ad account, Page and Instagram assigned, then clone Nexus for Meta in Claude Code and paste the token into the chat. Claude writes it to a local .env file and verifies the connection. Setup takes about ten minutes and the token does not expire.
Nexus for Meta deliberately does not use MCP. There is no server to install, run or keep alive. Claude calls the Meta Graph API directly with curl using your access token. That means nothing to maintain, no extra process, and no third party sitting between your ad data and Claude.
You can, but you do not have to. Nexus for Meta supports two paths: request access to an existing shared app, or create your own Business-type app in the Meta developer console. Your own app stays in Development mode and needs no App Review, because you are only ever accessing accounts you own.
Yes, but only when you explicitly ask for that specific change. The kit defaults to read-only. Every write is described in plain language with the exact dollar amounts before it runs, and new campaigns are always created paused so nothing can start spending by accident.
The token is stored only in a local .env file that is git-ignored and never leaves your machine. Requests go straight from your computer to graph.facebook.com. Nothing routes through any third-party server. The token does carry ads_management, so it can spend money, which is why the kit defaults to read-only and confirms every write.
ads_read, ads_management, pages_show_list, pages_read_engagement, pages_manage_metadata, pages_manage_posts, instagram_basic, instagram_manage_insights, leads_retrieval and business_management. Grant only the ones you need; ads_read alone is enough for reporting.
Page-level endpoints need a Page access token, not the user token. Fetch it with me/accounts?fields=name,access_token and use the token belonging to the Page you want. Ad-account reads do not need this. Claude already knows the rule and handles it for you.
v25.0, the current version, set in .env as META_API_VERSION so you can pin a different one without touching any code.
Nothing. It is open source under the MIT License. You need a Claude subscription and your own Meta ad account; there are no other costs and no hosted service.
Irfad Imtiaz, Director of Technology at My Legal Academy, built and maintains it. My Legal Academy publishes it.