How to run Meta ads from Gemini CLI

Gemini CLI runs Meta ads once you add an ad-running MCP (Model Context Protocol) server and sign in with /mcp auth. Every paid call and the launch itself wait for your confirmation, and a saved slash command makes each new test one line.

By Grace Kong·Updated ·5 min read

Test Meta ad hooks from your agent

TL;DR

  • Since June 18, 2026, Gemini CLI serves paid Gemini API keys and Code Assist Standard and Enterprise; free, Google AI Pro and Ultra users moved to Antigravity CLI, which takes the server as serverUrl (Google).

  • A .toml file in ~/.gemini/commands turns the request into a reusable command such as /meta-test, with {{args}} standing in for the product URL.

  • Choose proceed once for anything that spends, and leave trust off: trust: true skips every confirmation.

  • $10 a day buys about 14,400 US views a month at November 2026 prices (US benchmarks), enough to compare hooks but not to optimize for purchases.

Set up Hypesonic in Gemini CLI

One command adds the server; one more signs you in.

gemini mcp add --transport http hypesonic https://www.hypesonic.com/mcp

Restart Gemini CLI, then run /mcp auth hypesonic. The default scope is the current project; add -s user to use Hypesonic everywhere. Sign-in opens a browser and stores tokens in ~/.gemini/mcp-oauth-tokens.json, so it does not work in a headless container. Full setup: hypesonic.com/agents/gemini.

The command writes this entry, which you can also add by hand. httpUrl means Streamable HTTP; url means SSE (server-sent events):

// ~/.gemini/settings.json
{
  "mcpServers": {
    "hypesonic": { "httpUrl": "https://www.hypesonic.com/mcp" }
  }
}

Leave trust off: trust: true skips every tool confirmation, which you do not want on a server that spends money. You sign in to your Meta ad account through Hypesonic, with no developer app of your own.

Source: Gemini CLI docs, MCP servers.

Gemini CLI or Antigravity CLI?

Which one you use depends on how you pay Google.

You haveUseHypesonic config
A paid Gemini API key or Gemini Enterprise Agent Platform keyGemini CLI~/.gemini/settings.json, httpUrl
Gemini Code Assist Standard or EnterpriseGemini CLI (access unchanged)Same as above
Free, Google AI Pro or Google AI UltraAntigravity CLI since June 18, 2026~/.gemini/config/mcp_config.json, serverUrl

Sources: Google Developers Blog, May 19, 2026, Antigravity docs, MCP.

// ~/.gemini/config/mcp_config.json (Antigravity)
{ "mcpServers": { "hypesonic": { "serverUrl": "https://www.hypesonic.com/mcp" } } }

Antigravity does not accept httpUrl and handles OAuth for you; a workspace can carry its own .agents/mcp_config.json.

The exact command to save

Gemini CLI turns a .toml file into a slash command, so a good request becomes reusable.

# ~/.gemini/commands/meta-test.toml
description = "Make 6 Meta ads with Hypesonic and draft a test campaign"
prompt = """
Use Hypesonic. Read {{args}}.
Write 3 angles x 2 hooks. Make 6 ads, 4:5 for Feed and 9:16 for Stories and Reels.
Draft one sales campaign, broad US audience, $30 a day.
Quote the creative and show the campaign. Do not launch until I confirm.
"""

Run it with /meta-test https://example.com/product. {{args}} is replaced with what you type after the command; a file in <project>/.gemini/commands/ overrides a global one with the same name (Gemini CLI docs, custom commands).

What Gemini CLI does, step by step

Every Hypesonic tool call passes through Gemini CLI's confirmation.

  1. Finds the recipe with playbook_search and reads inputs with model_get.
  2. Quotes the ads with run and estimate: true.
  3. Asks you to confirm the paid call. Gemini CLI offers: proceed once, always allow this tool, always allow this server, or cancel. Choose "proceed once" for anything that spends.
  4. Generates and saves the ads to your working folder; with a shell it can finish Hypesonic's Meta playbooks: the static one renders headlines in a headless browser (about $0.20 to $0.75 per ad), the video one edits with ffmpeg (about $4 to $15 per ad at 480p).
  5. Drafts the campaign in your Meta ad account and launches after a second confirmation.

The 10-minute default timeout means long jobs rarely time out; run_wait also returns within 45 seconds per call.

What a daily budget buys on Meta

Start from the budget you can hold for a month, not from a goal.

Daily budgetMonthViews at $20.85 per 1,000Clicks at $1.09Leads at $27.39
$10$30014,40027511
$30$90043,20082633
$50$1,50071,9001,37655
$100$3,000143,9002,752110

Our math from Birch (US cost per 1,000 views, Nov 2026), Shopify citing Birch (US cost per click, Oct 2026) and LocaliQ (cost per lead, Sep 2026).

Season matters: US cost per 1,000 views went from $18.20 in October to $20.85 in November 2026, about 15% (our math), as holiday advertisers joined the auction. Meta recommends starting with at least $5 and running more than six days (Meta). If an ad shows a photorealistic AI-generated person, Meta moves its "AI info" label next to "Sponsored" (Meta).

Where Gemini CLI is strong and weak for Meta ads

A good terminal agent with an uncertain future for free users.

  • Strong: custom slash commands make a repeatable test one line; the shell finishes playbooks that chat apps cannot.
  • Strong: fine-grained confirmations per call, per tool or per server.
  • Weak: free, AI Pro and Ultra users lost Gemini CLI on June 18, 2026 and need Antigravity CLI, with a different config file.
  • Weak: OAuth needs a local browser, so it does not sign in inside a headless server.

Questions

Can Gemini run Facebook ads?

Gemini CLI can, with an MCP server that launches Meta campaigns, such as Hypesonic or Meta's own Ads MCP. It asks you to confirm each tool call unless you set the server to trusted.

How do I add an MCP server to Gemini CLI?

Add it under mcpServers in ~/.gemini/settings.json with httpUrl for Streamable HTTP, or run gemini mcp add --transport http with a name and URL. Then run /mcp auth with the server name.

Is Gemini CLI still available?

Google stopped serving free, Google AI Pro and Ultra users on June 18, 2026 and moved them to Antigravity CLI. Paid Gemini API keys and Code Assist Standard and Enterprise keep Gemini CLI.

What does $10 a day get on Facebook?

About 14,400 views or 275 clicks a month at late-2026 US averages (our math). Enough to compare hooks, not enough to optimize for purchases.

Sources

  1. 1Gemini CLI docs, MCP servers · accessed Nov 30, 2026
  2. 2Gemini CLI docs, custom commands · accessed Nov 30, 2026
  3. 3Google Developers Blog, Transitioning Gemini CLI to Antigravity CLI · May 19, 2026
  4. 4Google Antigravity docs, MCP · accessed Nov 30, 2026
  5. 5Birch, Facebook advertising costs · Nov 2026
  6. 6Shopify, how much do Facebook ads cost · Nov 2026
  7. 7LocaliQ, Facebook advertising benchmarks · Sep 2026
  8. 8Meta, ad pricing · accessed Nov 30, 2026
  9. 9Meta, GenAI transparency for ads · Feb 2025, updated Jun 2026

Test Meta ad hooks from your agent

Keep reading