How to post to a Facebook Page from Gemini CLI

To post to Facebook from Gemini, add PostWire to Gemini CLI with gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp, type /mcp auth postwire to sign in, tick your Facebook Page once on Facebook's own screen, and ask "post the open day announcement from NOTES.md to our Facebook Page". Gemini writes the post with generate_posts (short, with the hook in the first 125 characters), shows it to you, and publishes it with post_to_social or queues it with schedule_post, as text, a photo or a video. You create no Meta developer app and hold no Page token: PostWire posts through Facebook's Graph API with its own approved app. The free plan includes Facebook Pages: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card.

Gemini CLI asks before it runs each PostWire tool, so nothing reaches your Page until you say yes. A scheduled post goes out from PostWire's servers with your terminal closed, and the same request can carry the Instagram, LinkedIn or Bluesky version of the news.

Updated . Written from PostWire's own code; vendor prices read on Nov 10, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.

Set it up and post, step by step

Prompt to copy once your Page is connected: Read NOTES.md, write a Facebook post for our Saturday open day with the time and the address, show it to me, and schedule it for Friday at 9am with ./assets/open-day.jpg.

  1. Add PostWire to Gemini CLI

    In your terminal (not inside Gemini) run gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp. -s user saves it in ~/.gemini/settings.json for every folder; without it Gemini CLI saves it for the current project only. The URL is PostWire's hosted MCP server: there is nothing to install.

  2. Sign in

    Start gemini and type /mcp auth postwire. Your browser opens PostWire's sign-in: your email and a 6-digit code, which also creates a free PostWire account if you have none, with no password and no card. PostWire's sign-in returns the iss value Gemini CLI checks, so the browser step completes. /mcp then lists postwire as connected.

  3. Connect your Facebook Page

    Ask "connect my Facebook Page". Gemini calls create_connect_link and prints a one-hour link; open it and choose Facebook. Facebook shows "Continue as <your name>", then asks which Pages PostWire may use: tick the Page and press Save. Pages you manage directly and Pages inside a Business Portfolio both appear. PostWire never sees your Facebook password.

  4. Ask for the post and approve it

    "Write the Facebook post for the open day." generate_posts returns a draft and publishes nothing. It is written for Facebook: 40 to 80 characters when the idea allows and under 250 otherwise, the hook in the first 125 characters (where the mobile feed cuts), 1 to 3 hashtags, and a link can stay in the body. Ask for the Instagram or LinkedIn version in the same sentence and each comes back written for its own network.

  5. Add a photo or a video

    A public https link goes straight into photo_url or video_url. A file on your computer goes through an upload page: ask for one (create_upload_link), pick the file there, up to 100 MB on the free plan and 1 GB on paid plans, and Gemini gets its link.

  6. Post now, or schedule it

    Say "post it" and Gemini calls post_to_social. Say "schedule it for Friday at 9am" and it calls schedule_post, up to 365 days ahead, or with run_at: "next_slot" for your next free posting hour. Gemini CLI shows the call and waits for you to allow it. This is the call:

    {
      "name": "schedule_post",
      "arguments": {
        "platforms": ["facebook"],
        "per_platform": { "facebook": {
          "text": "Open day this Saturday, 10 to 2, at 41 Main St. Coffee is on us ☕ #openday"
        } },
        "photo_url": "https://postwire.io/m/…/open-day.jpg",
        "run_at": "2026-11-13T09:00:00-05:00"
      }
    }
  7. Check that it went out

    The result lists Facebook with ok, the Page it went to and the post's link (https://facebook.com/…); get_post_status returns it later too. If Facebook refuses it, the result carries what happened and the fix.

"What's scheduled on Facebook?" calls list_scheduled_posts and "cancel Friday's post" calls cancel_scheduled_post; the same queue is on the dashboard's Queue page. Prefer to set it up by hand? Open the dashboard, connect your Page under Accounts and copy your key under API & MCP. All Gemini CLI clients: Gemini CLI setup.

Ways to post to Facebook from Gemini, side by side

How each service plugs into Gemini and what it costs to start, read on its own Gemini and pricing pages on Nov 10, 2026.

ServiceHow it plugs into Gemini CLISign-inFacebook on the free startCheapest paid plan
PostWiregemini mcp add with https://postwire.io/api/mcp/mcp auth postwire in the browser, or a key headerYes — free plan: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card$19/mo — 3 businesses, every network in each post
Postizgemini extensions install with its GitHub extensionBrowser sign-in on the first call7-day free trial$29/mo — 5 channels
Upload-PostA block in ~/.gemini/settings.json with its MCP URLAn API key in a headerFree plan of 10 uploads a month; its free-plan network list names Facebook$24/mo — 5 profiles

Checked on Nov 10, 2026 (2026-11-10) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.

Where PostWire is ahead

  • A free plan with no time limit: 10 posts a month, no card. Postiz starts with a 7-day trial.
  • The cheapest paid plan here: $19 a month for 3 businesses, each with its own Page. Upload-Post $24 for 5 profiles, Postiz $29 for 5 channels.
  • Sign in without pasting a key into a config file: /mcp auth postwire opens the browser, and the key is there for scripts that need it.
  • The post is written for Facebook: generate_posts writes the short Page post with its hook in the first 125 characters and, from the same news, the Instagram caption and the LinkedIn post in one call.
  • A person approves what Gemini queued: on paid plans, approval rules hold the post until you approve it from an emailed link.
Sources, all read on Nov 10, 2026:
  • Postiz — Schedule Social Media Posts with Gemini ("One command installs the Postiz extension in Gemini CLI": gemini extensions install https://github.com/gitroomhq/postiz-agent; "Also works as a custom app in the Gemini web app"; Facebook in its channel list): postiz.com/gemini
  • Postiz pricing ("Start with a 7-day free trial"; Standard $29 a month, 5 channels): postiz.com/pricing
  • Upload-Post — Post to Social Media with Gemini ("Add one block to ~/.gemini/settings.json" with httpUrl https://mcp.upload-post.com/mcp and an ApiKey header; "Start free, no card"): www.upload-post.com/gemini-social-media/
  • Upload-Post llms-full.txt (Free plan: 10 uploads a month, no credit card, "platforms without TikTok (Instagram, LinkedIn, YouTube, Facebook, …)"; Basic $24 a month, 5 profiles): www.upload-post.com/llms-full.txt
  • Gemini CLI docs — MCP servers (gemini mcp add, --scope, --header, /mcp auth, httpUrl, trust): github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md

From a script: Facebook posts with Gemini CLI headless

Gemini CLI also runs without its chat screen: gemini -p "…" answers one prompt and exits, which fits a cron job or a CI step. Two things change there:

  • Sign-in by key instead of the browser: copy your key in the dashboard under API & MCP and add the server with a header: gemini mcp add -s user --transport http --header "Authorization: Bearer YOUR_KEY" postwire https://postwire.io/api/mcp.
  • No one to press "allow": set "trust": true on the postwire entry in ~/.gemini/settings.json, which lets that server's tools run without asking and leaves every other tool asking as before.

Then gemini -p "Read hours.md and post this week's opening hours to our Facebook Page" publishes from a script. Without Gemini at all, the same post is POST /api/post with {"platforms": ["facebook"], "text": "…"} and your key: see the API docs.

Source: Gemini CLI's MCP docs, read Nov 10, 2026.

Facebook's rules Gemini works within

  • Pages, not personal profiles: Facebook lets no app post to a personal profile, so Gemini posts to a Page you manage. No Page yet? Create one at facebook.com/pages/create, then connect it.
  • What a post can be: text alone, a photo with its caption, or a video with its description, up to 2,000 characters in PostWire's Facebook writer.
  • Reels and Stories go through PostWire's REST API with options.facebook.post_type set to "reel" or "story", with the same connected Page: see network options.
  • What Facebook asks you to allow: listing your Pages, creating posts on them and reading their engagement (pages_show_list, pages_manage_posts, pages_read_engagement), plus business_management so a Page inside a Business Portfolio can be found.

What Starter ($19 a month) adds for a Facebook Page

  • No limit on the queue: ask Gemini to schedule a month of Page posts in one go, instead of 3 at a time.
  • 25 recurring posts: create_recurring_post posts "this week's specials" every Monday, with versions of the text used in turn.
  • 3 businesses, each with its own Facebook Page and its own networks: name the business in the request and Gemini posts to that Page.
  • Every network in each post: Facebook, Instagram, LinkedIn and the rest from one request, and files up to 1 GB.

Plans and prices: pricing. Paid plans have a 14-day refund.

What it does not do

Gemini with PostWire publishes and schedules posts on your Facebook Page. It does not post to personal profiles or Groups, it does not read or answer comments or Messenger conversations, and it does not create or manage ads. Reels and Stories are a REST option today, not a field of the MCP tools. This guide is for Gemini CLI, Google's terminal agent; PostWire has not been tested as a custom app in the Gemini web app at gemini.google.com, so this page makes no claim about it.

Questions people ask

Can Gemini post to a Facebook Page?

Yes, from Gemini CLI with an MCP server. Gemini has no Facebook access of its own; with PostWire added (gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp), a sign-in with /mcp auth postwire and your Page ticked once on Facebook's screen, it writes the post and publishes or schedules it when you ask.

Do I need a Meta developer app or a Page access token?

No. You approve PostWire's app on Facebook's own screen and tick the Page it may use. There is no developer app to create, no App Review and no token to copy or refresh.

Can Gemini CLI schedule Facebook posts?

Yes. It calls schedule_post with a time up to 365 days ahead, or "next_slot" for your next free posting hour, and PostWire publishes it at that time with Gemini closed. The free plan keeps 3 posts waiting at once; paid plans have no such limit.

Does it work in the Gemini app at gemini.google.com?

This guide covers Gemini CLI, where PostWire's sign-in was checked. PostWire has not been tested as a custom app in the Gemini web app. In the browser, Claude and ChatGPT have PostWire in their app directories: see the Claude and ChatGPT guides.

Can it post to my personal profile or a Facebook Group?

No. Facebook lets no app post to a personal profile, and PostWire does not post to Groups. Gemini posts to a Facebook Page you manage.

Can it run from a script without asking me?

Yes. Add the server with an Authorization header holding your key, set "trust": true on the postwire entry in ~/.gemini/settings.json, and run gemini -p with the request. Only PostWire's tools skip the confirmation; the others still ask.

How much does it cost?

The free plan includes Facebook Pages and the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card. Starter is $19 a month for 3 businesses, with no limit on the queue and 25 recurring posts; Pro is $29 for 10. Paid plans have a 14-day refund.