Schedule social media posts from Gemini CLI
Gemini CLI can read your project files and run in scripts. With Postika's MCP server in settings.json, it can also write posts and put them on your social calendar, pending your approval.
Step by step
- 1
Open
~/.gemini/settings.json(create it if it does not exist). - 2
Add
{ "mcpServers": { "postika": { "httpUrl": "https://postika.app/api/mcp" } } }, merging with any servers you already have. - 3
Start Gemini CLI and run
/mcp auth postika. Sign in to Postika in the browser and click Allow. - 4
Run
/mcpto check that postika shows its five tools, then ask for your channel list.
Example prompts
- List my Postika projects and their time zones.
- Read docs/announcements/november.md and create one LinkedIn post per section, pending approval on weekdays at 09:00 starting Monday.
- Write an X post and a LinkedIn post about the new pricing page and leave them as drafts.
- Show the next 14 days of posts in my Studio project as a table: date, network, first 60 characters.
- Create a Facebook post with this week's opening hours and schedule it for Saturday at 08:00.
Why use a terminal agent for social media
Gemini CLI is handy when your content already lives in files: Markdown docs, release notes, a folder of blog drafts, a CSV exported from another tool. Instead of opening each file and copying text into a web form, you point Gemini at the folder and ask for posts. With Postika connected, the result is not a text file to paste later but real entries in your calendar.
Gemini calls list_channels to learn each network's limit and media rule, so it knows that X takes 280 characters and that a Pinterest pin needs an image. Then it calls create_post with a date in the project's own time zone. The protocol is explained in our MCP glossary entry.
A batch from a folder of drafts
Say you keep blog drafts in content/posts/. One prompt can do a week of promotion:
- "For each post in content/posts published this month, write a LinkedIn post and a Threads post."
- "Spread them over the next two weeks, one per weekday at 08:30, in approval mode."
- Gemini reads the files, checks your calendar with
list_poststo avoid doubles and creates the posts. - You open Postika, review the per-network previews and approve.
The same idea applied to a newsletter is what we call content repurposing. If you want this to run with no chat at all, an n8n workflow or a cron job calling the REST API is the better tool.
What stays in the app
Media cannot be passed through MCP. Instagram, TikTok and Pinterest posts need a photo or video and YouTube needs a video, so Gemini should leave those as draft or approval; you attach the file in Postika. Text-only networks (Facebook, X, LinkedIn, Threads) can be scheduled end to end.
Postika also does not do analytics or reply to comments; it is a calendar and a publisher. Plans are priced by connected channels, not by users or AI calls: Standard is €29/month for 5 channels, and every plan includes the MCP server (pricing). Other terminal agents work the same way, see Claude Code.
Running Gemini CLI non-interactively
Gemini CLI can also take a prompt as an argument, which makes it usable from a shell script or a scheduled job on your machine. A weekly script that asks "read this week's notes in notes/weekly.md and create a LinkedIn post pending approval for Monday at 09:00" gives you a recurring post without building a full automation. Keep the mode on approval for anything that runs unattended: the post appears in your calendar as pending, and you decide on Monday morning whether it goes out. If you manage several brands, name the Postika project in the prompt so Gemini does not have to guess.
Frequently asked questions
How do I add a remote MCP server to Gemini CLI?
Add an entry under mcpServers in ~/.gemini/settings.json with httpUrl set to the server URL. For Postika that is https://postika.app/api/mcp. Then run /mcp auth postika to sign in.
Is the setting httpUrl or url?
For Postika's streamable HTTP server, use httpUrl, as shown in Postika's MCP docs.
Can Gemini CLI publish posts immediately?
Yes, if you ask for it: create_post has a now mode. By default Postika tells it to use approval mode so you review first.
Can Gemini upload images to my posts?
No. Files cannot be sent over MCP. Gemini creates the post as a draft or pending approval and you add the image or video in Postika.
Keep reading
- Connect your AI to your social media calendarConnect Claude, ChatGPT, Cursor or Claude Code to your social media calendar with Postika's MCP server. Draft and schedule posts, approval first.
- Let GitHub Copilot in VS Code schedule your postsAdd Postika to VS Code with MCP: Add Server or .vscode/mcp.json, then let Copilot agent mode draft and schedule posts that wait for your approval.
- Automate social media posting with n8n and PostikaPost from n8n to Instagram, LinkedIn, X and 6 more networks with one HTTP Request node, or give an n8n AI Agent Postika's MCP tools.
- Schedule social media posts from Make scenariosSchedule posts from Make scenarios with the HTTP Make a request module and a Postika API key. 8 networks, approval mode, clear error messages.
- MCP (Model Context Protocol)MCP, the Model Context Protocol, is an open standard that lets AI assistants like Claude and ChatGPT use outside tools and data. How it works, simply.