Post to Instagram from Gemini CLI
Kreatix's MCP server (https://api.kreatix.cc/mcp) lets Gemini CLI schedule posts on every Instagram account you connect, move or cancel them and read their stats. Plans start at $13 a month after a 7-day free trial with a card.
Gemini CLI is Google's AI agent for the terminal. Developers use it to work on code with Gemini models, and it can call MCP tools such as Kreatix. A video from your Kreatix library or a public link, posted as a Reel; Instagram takes no text-only post.
Run once in a terminal
gemini mcp add --transport http --scope user kreatix https://api.kreatix.cc/mcpThen start gemini and type /mcp auth kreatix. Your browser opens: sign in to Kreatix and press Allow. No Kreatix account yet? You create it on that sign-in page.
Connect Gemini CLI to Kreatix
Sign in with Kreatix
No key to copy: paste the address, sign in to Kreatix and press Allow.
- In Kreatix, connect the pages Gemini CLI should post to (kreatix.cc/pages).
- Run once: gemini mcp add --transport http --scope user kreatix https://api.kreatix.cc/mcp
- Start gemini and type /mcp auth kreatix. Your browser opens: sign in to Kreatix and press Allow.
- Check it with /mcp inside Gemini CLI, or run gemini mcp list in a terminal. kreatix should show as Connected.
gemini mcp add --transport http --scope user kreatix https://api.kreatix.cc/mcpWith a key
For setups without sign-in. The key works like a password, so keep it to yourself.
- In Kreatix, connect the pages Gemini CLI should post to (kreatix.cc/pages).
- In Kreatix, open Settings > AI agent and create a key. It is shown once.
- Run the gemini mcp add command from the snippet with your key in place of YOUR_KEY. It saves Kreatix with the key in the Authorization header.
- Check it with gemini mcp list. kreatix should show as Connected.
gemini mcp add --transport http --scope user --header "Authorization: Bearer YOUR_KEY" kreatix https://api.kreatix.cc/mcpWhat Gemini CLI can do on Instagram
A video from your Kreatix library or a public link, posted as a Reel; Instagram takes no text-only post.
| Setting | Values | Needed | What it does |
|---|---|---|---|
media_url | URL | Yes | One video: a link from your Kreatix library (list_posts shows it) or a public YouTube, TikTok, Instagram or Facebook post, which Kreatix imports first. Pictures and carousels are not scheduled. |
caption | string (max 5000) | No | The Reel's caption. At most 30 hashtags and 20 @mentions, or schedule_post refuses the post. |
cover_url | URL | No | The Reel's cover: a picture stored in Kreatix, such as a thumbnail_url from list_posts. With an imported link and no cover, the link's own thumbnail is used. |
Ask in plain words
Ask inside a Gemini CLI session, for example "Use Kreatix to move tonight's posts on my brand group to 21:00." For a one-off question from a script or the shell: gemini -p "Which of my Kreatix pages got the most views this week?"
gemini -p "Post this TikTok link as a Reel on all my Instagram pages tomorrow at 18:00."gemini -p "Schedule yesterday's video on my brand's Instagram for Friday 20:00 with the same cover."gemini -p "Do any of my Instagram pages have an alarm or need reconnecting?"
Instagram rules to know
- Every Instagram post needs a video, and it goes out as a Reel.
- A caption with more than 30 hashtags or 20 @mentions is refused before anything is scheduled.
- Instagram processes the video first; if it is not ready within 30 minutes, the post fails with Instagram's reason.
- Kreatix connects only professional Instagram accounts (Business or Creator).
- If Instagram locks an account, it wants the owner to finish a check on instagram.com; reconnecting does not help.
Tips for Gemini CLI
- --scope user saves Kreatix to ~/.gemini/settings.json, so it works in every folder. Without it, the entry goes to the current project's .gemini/settings.json.
- Gemini CLI asks before each MCP tool call. Choose "Always allow this tool" only for the reading tools, and don't add --trust: it skips every confirmation, also for posts.
- The command writes an mcpServers entry with httpUrl, the key Gemini CLI uses for a streamable HTTP server. The url key is for SSE servers, which Kreatix is not.
- For a setup that can only read, add --include-tools list_channels,list_groups,list_posts,get_stats to the command.
- Kreatix asks the agent to confirm the pages, caption and time with you before it schedules. It cannot delete pages, read messages or change your account, and you can remove it any time in Settings > AI agent.
Questions
How do I post to Instagram from Gemini CLI?
Connect Gemini CLI to Kreatix once, as shown above. Then ask it to post: name your Instagram pages or a page group, the video or text and the time. Kreatix asks Gemini CLI to confirm the pages, caption and time with you before it schedules.
Can my agent post photos or carousels to Instagram?
No. Through the agent, Kreatix schedules a video or a text post, and Instagram takes no text-only post. Photos and carousels go out from Kreatix with Publish now.
Why did the agent refuse my caption?
Instagram takes at most 30 hashtags and 20 @mentions in a caption. Kreatix counts them before scheduling, so the post is stopped up front instead of failing on Instagram later.
What if Instagram is slow to process my Reel?
Kreatix keeps checking for up to 30 minutes, and your other posts keep going out meanwhile. If Instagram still has not finished, the post fails with Instagram's own reason.
Will my agent know if an Instagram page is in trouble?
Yes. list_channels shows Kreatix's page alarm when several of the page's newest videos in a row stay under 50 views, and marks a page Instagram has locked or closed. Kreatix tells the agent to raise these with you before planning posts there.
The sign-in page did not open. What now?
Gemini CLI's sign-in needs a browser on the same computer, because the answer comes back to a localhost address. Type /mcp auth kreatix again from a local terminal. On a remote machine without a browser, use the key route instead.
How do I remove Kreatix from Gemini CLI?
Run gemini mcp remove --scope user kreatix. Gemini CLI keeps sign-in tokens in ~/.gemini/mcp-oauth-tokens.json. If you used a key, also delete it in Kreatix under Settings > AI agent.
Kreatix schedules one video to every page you run, each with its own platform settings.
Start your 7-day free trial