September 2026

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.

01

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.
02

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.

03

How it works

Scroll to see the full diagram

Cursor Control A marketer asks in Cursor Plain English, in the editor the team already uses. Signal A visitor lands on the page Consent first, then the tag library loads. Meta Agent access Meta's ads MCP server Authorized through our own developer app. Google Tag Manager Tags Tag Manager picks the IDs An exact-match lookup on the page hostname. Guardrail Business Suite rules + Skills Seven action types, allowed or blocked per account. HubSpot Form The form reports itself A listener turns its success message into an event. Meta One account The B2B ad account and its pixel Changes arrive on the left path. Page views and form fills arrive on the right. reads results
Two paths meet at one account.
04

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

Top level context/marketing/ README.md the folder's rules platforms/ platform requirements meta-ad-specs.md safe zones, ratios, text caps campaigns/ one folder per campaign <channel>-<theme>-<period>/ one run, dated in the name A campaign folder, one file per stage campaigns/<name>/ every file starts with its name <name>.md overview, links, open blockers <name>-brief.md objective, phases, budget, rules <name>-audience.md titles, ad sets, exclusions <name>-creative.md angles, hooks, one ID per ad <name>-landing-page.md form, tracking, fixes, owners <name>-performance.md weekly readouts, figures cited <name>-learnings.md what worked, feeds the next brief The loop 01 Brief 02 Audience 03 Creative 04 Performance 05 Learnings Learnings start the next brief
Two views of one space. On the left, where things live. On the right, what each campaign folder holds: one file per stage, each named for its campaign. Underneath, the loop those files make. The next brief starts by reading the last campaign’s learnings.
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

05

The first campaign

The first campaign has launched.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

06

How it came together

The work, step by step.

  1. 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.

  2. 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.

  3. Audited the pixel

    I reviewed the pixel to make sure it fires all the events we need to track.

  4. 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.

  5. 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.

  6. 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.

07

Where it stands

3 daysfrom no agent access to a B2B landing page tracked end to end
5stages in every campaign’s loop, from brief to learnings
18static ads in the first campaign: six designs, three ratios each
4audiences built by the agent, from customer list to exclusion
1,000+decision makers in the customer list, from 300+ target companies