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
- One week in September 2026. 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 has since launched.
- 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: low-cost statics first to find which angle lands, then full production on the winner.
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.
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 B2B 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.