Agent-run Meta campaigns
Meta now lets an AI agent work directly inside an ad account, through the Meta ads MCP server. We set one up to automate our B2B Meta ads. The agent works from Cursor and can read and change our campaigns. B2B campaigns get their own ad account, and visits and form fills on the landing page reach Meta intact.
Most of the work was not the agent. It was the tracking underneath it. An agent optimizes on whatever the tracking reports. If the tracking is broken, it makes wrong decisions faster.
Every campaign also gets its own folder in our Second Brain, with one file per stage from brief to learnings. The next brief starts from the last campaign's learnings, so each run picks up where the previous one ended.


At a glance
- Role
- AI Martech Manager. I owned it end to end, from the Meta developer app to the tag changes and ad launching, with an AI agent in Cursor doing most of the job.
- Timeframe
- It took three days to connect the agent and fix the tracking. By the end of the week, the first campaign was staged, with audiences built and creative made. It launched in October as a traffic campaign, and a lead campaign followed.
- Surface
- Cursor, connected to Meta’s official ads MCP server. No custom integration code.
- Guardrails
- Meta’s own rules, set per ad account in Business Suite, design skills and campaign briefs.
- Measured with
- Google Tag Manager, the Meta pixel, and the HubSpot form on the landing page.
- Recorded in
- A campaign space of its own in the Second Brain. One folder per campaign, one file per stage, every figure cited to its source.
What was built
Three pieces, built in this order.
Access. An agent in Cursor, connected directly to our Facebook and Instagram ads through the official Meta ads MCP server. It can list accounts and read campaigns, audiences and pixel data. It can also create and edit campaigns, ad sets and ads when a person asks it to.
Measurement. The landing page launched on a company subdomain, and it started with no tracking at all. We installed every pixel and tag on the page from scratch. Meta receives four events, which roll up to two top-level numbers: page visits and form submissions.
Memory. A campaign space in the Second Brain. We record every campaign there from brief to learnings, and the next brief starts from those learnings.
How it works
Scroll to see the full diagram
Where the campaign lives
Campaign work needed one place to live.
It used to sit in loose exports and slide decks. What one campaign learned never made it into the next. So we set up a space for campaigns in the Second Brain, with its own rules.
Scroll to see the full diagram
The learnings start the next loop
Every campaign folder holds the brief, audience, creative, performance and learnings. There’s also an overview on top and a file for the landing page the ads send people to. The next brief starts by reading the learnings before it. The learnings that hold up feed back into positioning. So each campaign starts where the last one ended, not from a blank page.
One folder per campaign, not a summary
Each campaign keeps its own folder instead of being merged into one marketing overview. A campaign has a lifecycle. A summary would lose track of which run said what and what came back.
Every file starts with the campaign’s name, because the index lists files by name only. A file called just “brief” would get lost among every other campaign’s briefs.
The period is part of the name
We name folders by channel, theme and period. Campaigns come back under the same theme, and without the period the second run would overwrite the first.
Every figure carries its source and its date
Performance goes in as dated snapshots, newest last, and nothing gets overwritten. Every number cites the export it came from. A figure with no date or source can’t be read a month later.
The account sees the campaign too
The audience file links every account the campaign targeted. Each of those accounts gets a dated entry on its own timeline. A seller opening the account sees the campaign there and doesn’t have to ask marketing.
Platform rules live in one place
Meta’s placement specs sit on one shared page: safe zones, ratios and text caps. We copied them from Meta’s own guide and noted the date we read it. Meta changes them without notice, so the date tells you whether to trust the page. Brand rules stay in their own place. What a campaign actually shipped goes in its creative file.
The first campaign
The first campaign has launched.
A brief that tests before it builds
The test runs in two phases. The first sends low-cost traffic to the landing page and reads which angle, image and format land. The second asks for the lead, with full production on what won.
Four audiences, built by the agent
A customer list of decision makers at the target companies, taken from the team’s own sheets and filled out through Apollo. A 1% lookalike of that list. Visitors to the landing page in the last 30 days, for retargeting. And an exclusion of anyone who became a lead in the last 180 days, so no budget goes on people who have already asked.
Alongside them, we built a control audience to compare against, from the ideal customer profile (ICP) and the interest settings Meta makes available.
Creative built by Cursor with design skills
We built the creative in Cursor with brand skills created by our designer. They carry the fonts, colors, layouts and photo rules. The creative covers single image and carousel: six statics, two hooks for each of three angles, each in 4:5, 1:1 and 9:16. A six-card carousel and a storyboard for a 15-second video are ready for the second phase.
A landing page ready for paid traffic
An audit scored the page five out of ten as a paid landing page. We optimized the images, simplified the user journey and the form, and reviewed the content. That improved the score.
The launch is a config file
The campaign is defined in a launch config. It sets a leads objective that optimizes for the standard lead event, plus a location radius. Each hook gets its own ad set, with its own budget and its own readout. Every ad carries a tag naming the creative it came from.
The decisions that belong to people were left as placeholders: the legal category (whether Meta’s employment ad rules apply), the Page the ads run from, the dates and the budget. Once people made those calls, the campaign launched.
What we tested
Imagery: generated brand images vs stock photography
Every static came in two versions. One used imagery generated with the designer’s brand skills, the other used stock photography. On the same audience, stock cost about a third more per landing page view and got about 12% fewer clicks per impression. Wherever one concept ran in both versions to the same audience, the generated version won.
Format: carousel vs single image
The carousel was the best ad in the account. It cost about 14% less per landing page view than the best single-image ad set, and its click-through rate was about 43% higher. It ran on Feeds only while the statics ran everywhere, so placement is part of that win.
Placements: Advantage+ vs Feeds
On Advantage+ placements, Meta sent 95% of the early traffic spend to Reels and Stories. That is cheap reach. On the lead campaign, though, every unusable lead came from Reels and Stories. The Facebook and Instagram feeds took about a fifth of the lead spend and produced no leads at all, good or bad.
Lookalike vs customer list only
The first lead ad set paired the customer list with a 1% lookalike. Its seed list was below the size Meta suggests, so in practice the lookalike was close to a broad UK audience. We paused it and ran the customer list alone. That swapped one problem for another. The list was so small that the ad set spent less than 1% of its daily budget.
Landing page vs instant form
The ads worked. The ask didn’t, in two opposite ways.
The same ads ran through two journeys. One sent people to the landing page. The other kept them inside Meta with an instant form. Both failed at first, for opposite reasons.
Scroll to see the full diagram
Journey A: the landing page
Phase 1 sent people to the landing page and optimized for page views. Around 90% of link clicks loaded the page, so the visitors were real. But 0% of them filled in the form. It had too many required fields, a checkbox that grayed out the button until it was ticked, and consent copy with an old company name, on a mostly mobile audience. We cut the fields, but with no lead events coming in, Meta had nothing to optimize leads against.
A new campaign for leads
Meta won’t change a published campaign’s objective, so moving from traffic to leads meant a new campaign. Phase 2 ran video ads with a Meta instant form that syncs to HubSpot, so people sign up without leaving Facebook or Instagram. The traffic campaign kept running alongside it.
Journey B: the instant form
Leads arrived within days, and cheaply. 100% of them were unusable: people looking for work, and email addresses that didn’t work. The ads show waiters and sommeliers, so to hospitality workers they can read as job ads. Meta optimizes for whoever submits, so it went looking for more of the same.
Why the junk got through
The form was already on Meta’s higher intent setting, with a review screen, so that alone didn’t stop it. Flexible form delivery was on, which lets Meta drop questions to get more submissions. Work email validation was off. And details came prefilled from the Facebook profile, which often holds an old personal address.
The fix: friction on purpose
The second form opens with a screening question. Anyone looking for work gets a link to the app and never becomes a lead. Then come business type, timing, and a company name typed by hand. Work email is validated on the form and again by the ad’s own quality filter, and flexible delivery is off.
It costs volume, and that is the point. A cheap instant form lead is not a lead.
What we judge it on now
Lead quality in HubSpot, read within the first few leads, not Meta’s cost per lead. If quality stays poor, the next lever is Feeds-only placements. The step after that is sending lead stages from HubSpot back to Meta, so it optimizes for qualified leads instead of raw form fills.
How it came together
The work, step by step.
Connected Cursor to the Meta ads MCP server
First I checked that the business portfolio had the ads MCP integration at all. Meta was rolling it out account by account. It works out of the box with Claude and ChatGPT, but not Cursor. So I registered as a Meta developer, created the app, added the ads MCP use case and allowed Cursor’s web callback.
Stood up the new ad account
I created the account in the business portfolio and confirmed the agent could see it. Meta allowed all seven action types by default. Anyone about to hand an agent a live budget should check this first.
Audited the pixel
I reviewed the pixel to make sure it fires all the events we need to track.
Found why the page sent nothing
The shared Google Tag Manager tag setup picks each platform’s ID from a lookup table, keyed on the exact hostname. When nothing matches, it falls back to a placeholder. The new subdomain matched nothing. One new row in each of six lookups fixed Meta, GA4, Google Ads, Microsoft Ads, LinkedIn and Criteo at once.
Wired the events
I added a trigger that fires the B2B page view on the landing page. For the form, a small listener catches the HubSpot form’s success message and passes it to Tag Manager.
Gave campaigns a home
We set up the campaign space in the Second Brain and wrote its rules down. One folder per campaign, with a file per stage. Every figure cited and dated. Every targeted account linked both ways. Meta’s placement specs kept on one dated reference page.
Diagnosed the bad leads
When the first leads came back unusable, the agent read the ad set setup through the MCP server and found the causes: the placements, the lookalike and the form settings. It drafted the stricter form in Ads Manager through the browser and left publishing to a person, because a published form can’t be edited.
Kept the record current
Every readout, test and form change went into the campaign’s folder in the Second Brain the same day, with its date and source. The tests on this page come from that record.