Hermoso is a marketing MCP server: 850+ tools over one OAuth’d endpoint that let an agent research the ads already running in a market, generate finished image and video ads, publish them, and build the paid campaigns behind them. Gemini CLI reaches all of it through one connection. This page is about one slice of that — what Gemini CLI can actually do on Facebook, and what Facebook will not let it do.
Connect Hermoso to Gemini CLI
- Install the extension.
It installs the latest release of Hermoso’s public repository: five skills (research, ad-from-brand, generate, product-photoshoot and marketing) plus agemini extensions install https://github.com/hermoso-ai/hermosoGEMINI.mdcontext file. The skills run thehermosocommand throughnpx, so nothing is added to Gemini CLI’s tool list and nothing costs context until a command runs.gemini extensions listshows them under Agent skills. - Sign in once.
It opens a browser sign-in and stores an owner-only credential innpx -y hermoso auth login~/.hermoso/config.json. Gemini CLI can run it for you the first time it needs Hermoso. No browser on that machine? Create a key under MCP & CLI → Terminal & API keys and runnpx -y hermoso auth login --token hmk_…. - Optional: the MCP server as well.
Gemini CLI finds Hermoso’s authorization server when the first connection answers 401 and registers itself, so no key goes ingemini mcp add --scope user --transport http hermoso https://app.hermoso.ai/mcpsettings.json;/mcp auth hermosoinside a session runs the sign-in. The skills reach every tool without it. - Ask Gemini CLI for something. “Pull my three closest competitors’ longest-running ads and remix the best hook into a 9:16 video,” or “post this render to the channel.” The agent picks the tools; you approve the spend.
We ran the install above on 2026-09-23 against Gemini CLI 0.60.0 in a clean home directory: it pulled the current release of hermoso-ai/hermoso, and gemini extensions list reported the five skills and the context file. The extension carries no MCP server of its own, which is deliberate: a tool list is loaded into every session, and skills cost nothing until they run. Hermoso is not affiliated with or endorsed by Google.
Then connect Facebook itself, once, under Settings → Connectors in Hermoso. That is an OAuth consent screen, so it is the one step that needs a browser — everything after it is a tool call.
The Facebook tools Gemini CLI gets
post_to_meta— publishes to the Page — text, an image, a video, or a multi-photo post — and takespageIdso it never has to guess which Page.schedule_post— queues the same post for a time you choose, on one calendar shared with every other channel.list_meta_pages— lists the Pages the account has connected, with their ids.manage_meta_post— edits the copy of a published post, or deletes it.list_meta_comments / reply_to_meta_comment / moderate_meta_comment— reads the comments under a post, replies as the Page, and hides or deletes what should not be there.meta_page_insights / meta_post_insights— Page-level and per-post reach, impressions and engagement.upload_meta_asset— puts a finished render into the ad account’s asset library.
Facebook is also the one channel with native remote scheduling — post_to_meta takes a scheduleAt between ten minutes and thirty days out and hands the timing to Meta itself. Instagram and Threads have no such thing in Meta’s API, and passing it for them is refused rather than quietly posted immediately.
Facebook limits worth knowing before you automate anything
| Text | A Facebook post can run to 63,206 characters, which is effectively no limit. It is enforced when the post is created or queued — refused while you are still there to fix it, rather than silently cut on the way out. |
|---|---|
| Visibility | Public or draft. A draft is a genuinely unpublished Page post, which is the useful one for review: it exists in Meta Business Suite and nobody outside can see it. There is no unlisted and no private — “a Facebook Page post is either published or held as an unpublished draft”. |
| Carousel | 2 slides and up, photos only. Meta publishes no maximum for attached_media that we could source, so Hermoso does not invent one and attribute it to Facebook — the only bound is ours, at 30 slides, and the refusal says whose it is: “Facebook publishes no documented maximum for attached_media, so this bound is ours, not theirs.” Video cannot ride in a Facebook photo carousel; that is a different edge on Meta’s API and Hermoso refuses rather than silently dropping the clip. |
| Which account | pageId. It matters the moment a brand connects more than one Page: the publish path refuses by name instead of picking one for you, and a schedule that could not carry the answer would turn that refusal into a failure hours later with nobody watching. |
Try it in Gemini CLI
Ask for it in ordinary language — these are sentences, not a DSL:
“Render a 4:5 image ad from our brand, post it to the Facebook Page as an unpublished draft, and write the post id to ./out/facebook.json.”
That walks find_competitors → search_meta_ads → plan_ad → render_ad → list_meta_pages → post_to_meta. Gemini CLI asks before it runs a shell command, and the skills act through the hermoso command, so a publish shows up as a line you can read before you say yes. For MCP tools it offers once, always for that tool, or always for the server.
Gemini CLI on Facebook: the part that bites
Facebook has the only real draft among these channels and the only native remote scheduling: post_to_meta takes a scheduleAt between ten minutes and thirty days out, so Meta holds the timing rather than a terminal session that has to stay open. With more than one Page connected, have Gemini CLI run list_meta_pages first; the publish path refuses to guess.
Two Gemini CLI details decide how safe this is. gemini mcp add writes to the project’s .gemini/settings.json unless you pass --scope user, which is useful when one repo should always run against one brand. And never add Hermoso with --trust: it skips every confirmation for the server, including the ones in front of a publish. MCP tools arrive named mcp_hermoso_ plus the tool name, and --exclude-tools keeps any of them out entirely.
Research Facebook before you post
The Meta Ad Library is the richest public creative archive there is, and search_meta_ads reads it — by keyword or by page — covering both Facebook and Instagram placements. pull_competitor_ads and competitor_teardown build on it, and find_competitors works out who to point them at.
The paid half
Facebook is the deepest paid surface Hermoso has. create_meta_campaign, create_meta_adset and create_meta_ad build the whole tree with real targeting — geography down to a city radius, interests, behaviours, custom audiences and lookalikes, placements, dayparting, bid and cost caps. Everything is created PAUSED with no caller override, and the summary your agent reports is built from a read-back of what Meta actually stored, never from what was requested. Before a budget is committed, preview_meta_ad renders the real ad per placement as a link you can look at and estimate_meta_reach says how many people the targeting actually reaches. One warning that saves money: an ad set created with no locations defaults to the United States only, and the read-back says so loudly.
What Gemini CLI cannot do on its own
An agent with a budget is only useful if the blast radius is bounded, so the fence is in the server rather than in a prompt. Every ad campaign, ad set, ad group and ad is created paused, and the status switches that arm real money refuse to run without an explicit confirmation flag. Every render is quoted first — hermoso_capabilities publishes each model’s exact credit cost before anything spends — and credits are reserved before the first provider call and settled at the exact cost afterwards, so a failed dispatch refunds rather than leaving you billed for nothing. Deletes are confirm-gated too, and every campaign tree is read back from the ad platform before your agent tells you what it built.
One step is deliberately not headless: linking an account is an OAuth consent screen, so you connect the channel once in a browser. Everything after that is a tool call.
The rest of the matrix
From Gemini CLI, post to: Instagram · Threads · TikTok · YouTube · X · LinkedIn · Pinterest · Bluesky · Telegram — or see everything Gemini CLI can publish to.
Post to Facebook from: Claude · ChatGPT · Claude Code · Cursor · Codex · Cline · OpenClaw · Grok Bot · Hermes · Perplexity · Le Chat
Frequently asked questions
Can Gemini CLI post to Facebook?
Yes, with Hermoso's Gemini CLI extension. Run gemini extensions install https://github.com/hermoso-ai/hermoso, which adds five Hermoso skills that drive the hermoso command, then sign in once with npx -y hermoso auth login. The sign-in opens a browser and stores the credential itself, so there is no key to create and none to paste. If you also want Hermoso's tools in Gemini CLI's own list, gemini mcp add --scope user --transport http hermoso https://app.hermoso.ai/mcp adds the hosted server, which signs in with OAuth. Gemini CLI then has 850+ tools, including the ones that publish to Facebook — and the ones that research the ads already running in your market and render the creative in the first place.
How do I connect Facebook to Gemini CLI?
Two steps, once each. Run gemini extensions install https://github.com/hermoso-ai/hermoso, which adds five Hermoso skills that drive the hermoso command, then sign in once with npx -y hermoso auth login. The sign-in opens a browser and stores the credential itself, so there is no key to create and none to paste. If you also want Hermoso's tools in Gemini CLI's own list, gemini mcp add --scope user --transport http hermoso https://app.hermoso.ai/mcp adds the hosted server, which signs in with OAuth. Then connect Facebook inside Hermoso under Settings → Connectors, which is an OAuth consent screen in a browser. After that Gemini CLI publishes to Facebook as an ordinary tool call.
Can Gemini CLI post a carousel to Facebook?
Yes — a Facebook multi-photo post, two slides and up, photos only. Meta publishes no maximum for it that we could source, so Hermoso applies its own bound of 30 slides and says the bound is ours rather than attributing it to Facebook. Gemini CLI calls the same publish tool either way, and a channel that cannot carry a carousel is refused with the real reason attached.
Can Gemini CLI run Facebook ads as well as posting?
Yes. The full Meta campaign tree is buildable — campaign, ad set, ad, targeting, audiences, budgets — with preview and reach-estimate tools before a budget is committed.
Start free — 30 credits at signup and 250+ more to earn, and every feature on every plan. Credits are spent only on AI models and Ad Spy research; posting, scheduling, ads management and analytics are free.
Start free → See pricing