Automate

Automate Instagram with Gemini CLI

Instagram is one of only two places here where images and video can share a post, and the only one that will not take a PNG.

One command
$ gemini mcp add --transport http antwork https://api.antwork.io/mcp

Gemini CLI adds Antwork over HTTP with one command, then authorizes with its own slash command. Two lines and you are posting from the terminal.

Connect it

  1. 01Authorize with /mcp authRun /mcp auth antwork inside the Gemini CLI. It opens an OAuth consent screen in your browser; there is no key to paste into a config file.
  2. 02Connect the social accountAsk it to connect your account and it returns a connect link per platform. Authorize once and Antwork refreshes that token for you.
  3. 03Draft, then publish as a second stepDrafting and publishing are separate tool calls. The agent writes first and only publishes when you say so, which matters more in a terminal where there is no card to review.

What you can say once Instagram is connected

Draft an Instagram caption for this photo in my voice, with three hashtags at the end.

Turn this carousel of five images into an Instagram post and schedule it for Saturday.

Rewrite my last Instagram caption with a stronger first line.

Which of my Instagram posts got the most engagement this month?

What is different about Instagram

Only here

JPEG only

Instagram accepts .jpg and .jpeg and nothing else. A PNG, which is what most design tools export by default, is refused. Antwork checks the extension when you attach rather than letting you find out at publish.

A carousel does not have to be all one thing

Up to ten items in a post, and they can be images and video together. Most platforms here force you to pick one kind; this is not one of them.

There is no landscape

Image ratios are 4:5, 1:1 and 1.91:1, and video is 9:16, 1:1 or 4:5. Nothing 16:9 fits, so a cut made for YouTube needs recutting before it comes here.

Fifteen minutes, ten times over

Each video can run fifteen minutes at 300 MB, and ten of them can sit in one post. The limit you will hit first is almost never the length.

Questions

Do I need an API key to connect Gemini CLI?
No. Antwork connects over OAuth — you approve a consent screen in the browser and you are done. There is no key to generate or paste into a URL, which is how most social MCP servers handle it.
Do I need a paid account?
No. Your first two connected accounts are free forever, with unlimited posts and workspaces, and there is no plan gate on MCP access.
Will Gemini CLI post without showing me first?
Not unless you ask it to. Drafting and publishing are two separate steps: the agent writes, renders the post card, and only publishes when you confirm.
Does the writing sound like AI?
Antwork hands the agent that account's recent posts, along with how each performed, and the agent writes to match them. On Instagram that includes writing to the length the format rewards, up to 2,200 characters.

Never leave Gemini CLI to post again.

One command, one consent screen, and Instagram is something you can just ask for.

Connect your AI