More articles 11 min read

Gemini CLI MCP: connect Apogee in two commands

Gemini CLI MCP setup: add Apogee with gemini mcp add and /mcp auth, then launch and run your Meta, TikTok and Snapchat ads from the terminal, after your yes.

Mathieu Malige Founder, Apogee Published
Contents
  1. Before you start: plans and sign-in mode
  2. Gemini CLI MCP: adding Apogee step by step
  3. Check the connection
  4. Gemini CLI on Meta Ads: launch a folder of creatives
  5. Gemini CLI on TikTok Ads and Snapchat Ads
  6. The morning brief and the Monday review in the terminal
  7. Limits and safety
  8. Common problems
  9. Going further

Gemini CLI MCP setup takes two commands with Apogee. gemini mcp add adds the server https://app.apogee.ad/mcp, then /mcp auth apogee signs you in to Apogee in your browser. From the terminal, Gemini CLI then reads your Meta, TikTok and Snapchat accounts, launches your creatives and prepares pauses and budgets, always after your yes. You need a plan that still includes Gemini CLI, and Apogee from the Pro plan.

Gemini CLI launches a folder of creatives on Meta with Apogee: files uploaded, ads proposed, the recap, then the yes
One folder, one recap, one yes: the ads go out paused in the testing campaign.

Before you start: plans and sign-in mode

Check your Google plan first. On May 19, 2026, Google announced that Gemini CLI would stop serving Google AI Pro and Ultra subscribers and free users on June 18, 2026, in favor of Antigravity CLI (Google’s announcement).

Your situationWhat applies
Gemini Code Assist Standard or Enterprise licenseGemini CLI stays open: follow the steps below
Paid Gemini API keyGemini CLI stays open: follow the steps below
Google AI Pro, Ultra or a free accountMoved to Antigravity CLI since June 18, 2026
ApogeePro, Growth or Scale, MCP server included; 7-day trial for €1

We have not tested Apogee in Antigravity CLI yet, so this page does not describe it. The server URL stays the same. To see where Apogee stands among the other options, Meta’s official MCP included, read the Meta Ads MCP guide.

Two ways to sign in:

  • OAuth, the default: you log in to Apogee in your browser and pick the access. It needs a browser on the same computer.
  • An Apogee API key, for a machine without a browser (remote server, container).

Gemini CLI MCP: adding Apogee step by step

These steps follow Apogee’s connection guide and the Gemini CLI MCP documentation, read again on November 3, 2026.

  1. In your terminal, add the server:

    gemini mcp add --transport http apogee https://app.apogee.ad/mcp
  2. Open Gemini CLI and run /mcp auth apogee.

  3. Your browser shows Apogee’s sign-in page: log in, pick the access, click Authorize.

  4. Go back to Gemini CLI and ask your first question.

By default, the server is only added to the current project. Add --scope user to the command to have Apogee in every project, including the folder where your creatives land.

Apogee's MCP settings with Gemini CLI selected: the gemini mcp add command to copy and the /mcp auth apogee step
In Apogee, Settings → MCP gives you the command with the server URL already filled in.

The access you grant

Gemini CLI runs on your computer and comes back to a localhost address after the sign-in. Apogee’s page therefore reads An app on this computer wants to access your Apogee account and shows the declared name, “Gemini CLI”. Only authorize it if you just ran /mcp auth apogee yourself; otherwise click Cancel.

AccessWhat it allowsFor which task
ReadRead accounts, campaigns, ads and statisticsReview, report
LaunchImport creatives, prepare and launch adsLaunches, Bridge
ManagePauses, budgets, targeting, duplicatesCutting an ad, adjusting a budget

Read-only use only needs Read. Untick whatever Gemini CLI does not need.

Apogee consent page for Gemini CLI, titled An app on this computer, with the Read, Launch and Manage access and the Authorize button
The name shown is the one the app declares: only authorize the connection you just started.

Without a browser: the API key

  1. In Apogee, open Settings → API and click Create an API key.

  2. Give it a Name (for instance “Gemini CLI”), tick only the Scopes it needs and pick Expires: 30 days, 90 days by default, 1 year or a date.

  3. Click Create key, copy the key right away (Apogee shows it only once), then I saved it.

  4. Add the server with the key:

    gemini mcp add --transport http \
      --header "Authorization: Bearer apk_…" apogee https://app.apogee.ad/mcp

Replace apk_… with your key. On a key, the Manage access is called Actions.

Check the connection

In Gemini CLI, /mcp shows the status of each server: Apogee should be CONNECTED, with its tools. From your shell, gemini mcp list gives the same information. Then the first request, read-only:

Prompt to copy
Using Apogee, tell me which Apogee account and which access you are working with, then list my Meta, TikTok and Snapchat ad accounts with their currency. Don’t change anything.

Gemini CLI calls whoami, then list_ad_accounts. On Apogee’s side, Settings → MCP lists Gemini CLI under Connected assistants, with its access, its connection date and when it was last used.

Apogee's Connected assistants list with Gemini CLI connected, its Read, Launch and Actions access and the Disconnect button
Gemini CLI gets its own row: cutting it leaves the other assistants untouched.

Gemini CLI on Meta Ads: launch a folder of creatives

This is what a terminal tool does better than a chat: send the creatives in a folder on your computer, without going through Drive.

Prompt to copy
Take every creative in [folder] on my computer and launch them in a NEW ad set in my [testing campaign] campaign of [ad account]. Reuse the settings of the latest ad set and the latest ad launched in that campaign. Create everything paused, and show me the full recap before you create anything.

What Gemini CLI does, with Apogee’s tools:

  1. The account: list_ad_accounts, and it asks which one when there are several.
  2. The files: get_upload_urls gives one upload link per file (50 files per call, 500 MB at most each), Gemini CLI uploads each file, then confirm_uploads checks it arrived. Nothing is on Meta at this stage.
  3. The settings: get_latest_in_campaign picks up the latest ad set and ad of the campaign.
  4. The interview: get_launch_questions returns the Apogee app’s questions, in its order, with a recommended answer. Gemini CLI asks them one topic at a time and never answers for you.
  5. Ads and texts: one creative in 9:16, 4:5 and 1:1 makes a single ad; one primary text, one headline and one description per ad, in the market’s language, for you to validate.
  6. The recap, then the launch: prepare_launch creates nothing. After your yes, launch, then launch_status until it is done.

In the recap, check the ads and their files, the new ad set’s name and settings, the texts, the Advantage+ enhancements (the ones you did not pick stay off) and the defaults applied. Want to change a detail? Say so, and Gemini CLI prepares a new recap.

File names that mean nothing

IMG_4512.mp4, final_v3_OK(1).mov: Apogee then groups the files by hand, like the app’s Group by hand. The formats of one creative are linked when their names differ only by the format, every other file becomes its own ad, and two files of the same length in different formats are put to you before they are linked.

Prompt to copy
Launch the videos in [folder] in my [campaign] campaign of [ad account]. The file names mean nothing: group the formats of each creative, show me the ads, let me rename them and put them in groups, one ad set per group. Reuse the settings of the latest ad set and ad of that campaign. Create everything paused, and show me the full recap before you create anything.

No file is renamed on your disk: you rename the ads in the conversation.

Gemini CLI on TikTok Ads and Snapchat Ads

Send Meta winners over with the Bridge

Apogee’s Bridge relaunches a Meta ad on TikTok or Snapchat, paused, with texts adapted to the platform, without touching the original ad:

Prompt to copy
Send my 10 best Meta ads of the week to TikTok and Snapchat, in a new ad group and a new ad squad of my testing campaigns. Create everything paused, and show me the full recap before you create anything.
Gemini CLI sends the top 10 Meta ads to TikTok and Snapchat with Apogee's Bridge, after the recap
The Meta top 10 heads to TikTok and Snapchat: the original ads stay intact.

In the terminal, you see every call: get_top_performers for the ranking, list_bridge_transfers to skip what already went over, prepare_bridge_transfer for the recap, bridge_transfer after your yes. On the first transfer, Gemini CLI asks for the TikTok identity and the call to action, which Meta does not provide. Only videos make the trip.

Launch straight on TikTok and Snapchat

The flow is the Meta one, with the TikTok or Snapchat account named in the request. TikTok creates an ad group, where an image becomes a carousel; Snapchat creates an ad squad. With a template saved in the app:

Prompt to copy
Launch the videos in [link] on TikTok ([TikTok ad account]) in a NEW ad group of my [campaign] campaign, with my saved template [template]. Create everything paused, and show me the full recap before you create anything.

Each platform gets its own recap and waits for its own yes. What each platform accepts is on the Meta, TikTok and Snapchat in Apogee page.

The morning brief and the Monday review in the terminal

Gemini CLI only works when you open it. In the morning, one request is enough:

Prompt to copy
Give me yesterday on Meta ([Meta ad account]), TikTok ([TikTok ad account]) and Snapchat ([Snapchat ad account]), each platform on its own: spend, CPA, ROAS, and the 3 best and 3 worst ads. Never add the platforms together. Don’t change anything.
The morning brief asked of Gemini CLI with Apogee: Meta, TikTok and Snapchat shown platform by platform
The brief only reads: each platform keeps its own currency and attribution.

On Monday, the review that decides what to scale and what to cut:

Prompt to copy
Look at [ad account] over the last 7 days. Which ads should I scale and which should I cut, judged on [ROAS or CPA]? Show me the numbers, then propose the changes. Show me each change and wait for my yes before you make it.

On Meta, pauses go through pause_ad or pause_adset and budgets through update_budget or scale_budget; on TikTok and Snapchat, through set_platform_status and set_platform_daily_budget. These tools only prepare: execute_action acts after your yes. They need the Manage access. For a brief that lands every morning without you opening the terminal, you need a personal agent: Claude Duet, ChatGPT dots, Grok Bot or Muse, each with its own guide.

Limits and safety

Gemini CLI reads freely. For everything else, Apogee prepares a plan, returns a recap and waits for your yes:

GuardrailValue
Before any launch or changeA full recap and your yes
Status of created adsPaused by default
Prepared planValid 24 hours, runs only once
Daily budgetRefused above the cap, 500 in the account’s currency by default
Launches and Bridge transfers25 per ad account over 24 hours

Each uploaded file weighs 500 MB at most; on Pro, an account takes up to 2,000 files and 100 GB a day. Reads are free within your plan’s daily limit (5,000 a day on Pro). A created ad costs 15 credits and a change 2, counted only when they succeed. Apogee never adds up Meta, TikTok and Snapchat: each platform keeps its own currency and attribution.

To cut access: Settings → MCP, Disconnect next to Gemini CLI. With an API key: Settings → API, Revoke.

Common problems

  • 401: the sign-in expired, or the key is wrong, revoked or expired. Run /mcp auth apogee again, or create a new key.
  • 403: your Apogee plan does not include the MCP server. It is included from the Pro plan.
  • No browser opens: the OAuth sign-in needs one on the same computer. Use the API key.
  • Apogee only shows in one project: add --scope user to the add command.
  • A tool refuses for lack of access: the connection does not have the access it needs (Launch to launch, Manage for pauses). Disconnect Gemini CLI in Settings → MCP, run /mcp auth apogee again and tick the missing access.
  • Gemini CLI no longer answers with your Google account: you are on Google AI Pro, Ultra or a free account, moved to Antigravity CLI on June 18, 2026.

Going further

The feature Bridge An ad live on one platform goes live on another, with its video; copy, CTA and tracking rewritten for the destination platform. See the feature

Frequently asked questions

How do I add an MCP server to Gemini CLI with gemini mcp add?

In your terminal, run gemini mcp add --transport http apogee https://app.apogee.ad/mcp. Then open Gemini CLI and run /mcp auth apogee: your browser shows Apogee's sign-in page, where you pick the access and click Authorize. Add --scope user to have Apogee in all your projects.

Can Gemini CLI manage my Facebook ads?

Yes, with Apogee connected as an MCP server. Gemini CLI reads your Meta accounts, launches creatives from a folder on your computer or a link, and prepares pauses and budget changes. Apogee shows a recap and waits for your yes before it touches the account, and creates ads paused by default.

Does Gemini CLI still work with Google AI Pro?

No. According to Google, Gemini CLI stopped serving Google AI Pro and Ultra subscribers and free users on June 18, 2026: they moved to Antigravity CLI. Gemini CLI stays open with a Gemini Code Assist Standard or Enterprise license and with a paid Gemini API key.

What if /mcp auth apogee does not open a browser?

Gemini CLI's OAuth sign-in needs a browser on the same computer. On a remote server or in a container, create an API key in Apogee (Settings → API) and add the server with gemini mcp add and the --header option, which sends the key in the Authorization header.

Can Gemini CLI launch TikTok and Snapchat ads?

Yes, through Apogee, which connects TikTok and Snapchat accounts on top of Meta. Gemini CLI launches ads there in a TikTok ad group or a Snapchat ad squad, and sends your best Meta videos over with the Bridge. Each platform gets its own recap, its own yes and its own currency.

How do I remove Gemini CLI's access to Apogee?

In Apogee, open Settings → MCP and click Disconnect next to Gemini CLI in the Connected assistants list: access stops at once. If you connected it with an API key, revoke the key in Settings → API with Revoke.

Book a demo

Pick the time that suits you.

Open in a new tab

Loading the calendar…

Talk to Founder