Gemini CLI + PostAxis

Schedule social media posts with Gemini CLI

Gemini CLI brings Google’s models to your terminal. Add PostAxis and Gemini can plan, write and schedule your social posts as part of the same session.

  • One block in settings.json
  • OAuth sign-in with /mcp auth
  • Plan and schedule from the terminal

Set up Gemini CLI with PostAxis

Plug PostAxis into Gemini CLI once, then talk to it like you would to whoever runs your accounts. Every click is in the full guide below.

Plug in about 2 minutes

Step 1 of 2

Add PostAxis to settings.json

Add one block to Gemini CLI’s settings, then run /mcp auth to sign in through your browser.

  • PostAxis account
  • A connected social account
  • Gemini CLI installed
~/.gemini/settings.json
{
  "mcpServers": {
    "postaxis": {
      "httpUrl": "https://postaxis.io/api/mcp"
    }
  }
}
Talk

Step 2 of 2

Then tell Gemini CLI what you need

Gemini CLI picks the PostAxis tools it needs. Scheduled posts go out on time whether or not the chat is still open.

Try asking

  • Which accounts can you post to?
  • What goes out this week?
  • Keep that one as a draft

Write a week of short product tips for X and Threads and schedule one per day at 11:00.

Scheduled 7 posts, one per day at 11:00, each going to X and Threads. All passed both networks’ rules.

via PostAxis

Example answer · lands in your PostAxis calendar

Full setup guide for Gemini CLI

Every step from a new PostAxis account to your first scheduled post. Takes about 2 minutes once your accounts are connected. Want ready-made workflows? Read the full Gemini CLI guide

  1. 1

    Create your PostAxis account

    Sign up at app.postaxis.io. Every plan starts with a 7-day free trial and includes MCP access with OAuth sign-in. Create an account

  2. 2

    Connect your social accounts

    Open Accounts in PostAxis and connect the networks you want to post to: Instagram, TikTok, YouTube, X, LinkedIn, Facebook, Threads or Telegram. Your agent can only post to accounts connected here, and it never sees your social media passwords. Open Accounts

  3. 3

    Open settings.json

    Edit ~/.gemini/settings.json for every project, or .gemini/settings.json in one project. Create the file if it doesn’t exist.

  4. 4

    Add the PostAxis block

    Paste this. Gemini CLI uses httpUrl for streamable HTTP servers. If mcpServers already exists, add only the "postaxis" entry.

    Copy this
    {
      "mcpServers": {
        "postaxis": {
          "httpUrl": "https://postaxis.io/api/mcp"
        }
      }
    }
  5. 5

    Sign in

    Start Gemini CLI and run the command below. Approve access on the PostAxis page that opens in your browser.

    Copy this
    /mcp auth postaxis
  6. 6

    Check it’s connected

    Run /mcp. postaxis should be listed as ready with its tools.

  7. 7

    Ask Gemini to post

    Ask in plain language. Gemini asks for confirmation before running each tool.

What can Gemini CLI do with PostAxis?

Everything PostAxis does in the dashboard that makes sense to do by asking: writing, scheduling, editing, publishing and checking your queue.

Sentences in, posts out

Describe the post in your own words. Gemini CLI turns it into posts and PostAxis handles the scheduling.

Every network you run

Instagram, TikTok, YouTube, X, LinkedIn, Facebook, Threads and Telegram, from a single message.

Checked before it’s saved

Caption length, media count, video length and format are checked for every network before anything is saved.

Weeks ahead in one go

Ask for a week or a month. Gemini CLI can dry-run up to 50 posts at once, show you the plan, then schedule it.

Your images and video

Attach images and videos from a link, or get a one-time upload link for files on your computer.

Your accounts, your call

Gemini CLI signs in as you and can only reach accounts connected in your workspace. Cut it off from Settings whenever you like.

What is Gemini CLI?

Gemini CLI is Google’s open-source AI agent for the terminal. It runs Gemini models and calls MCP servers listed in settings.json.

Add PostAxis and Gemini can plan, write and schedule posts in the same session where it works on your project.

What can you ask Gemini CLI to post?

Brief it like a person: what it’s about, where it goes, when. Four requests that work well with Gemini CLI:

  1. Release notes

    Turn a release into posts

    Read CHANGELOG.md, write an X post and a LinkedIn post about this release and schedule both for 17:00 today.

    To Gemini CLI
  2. Calendar

    Fill next week

    Next week is empty. Give me one post a day at 10:00 for X, LinkedIn and Threads, built around our pricing update. Let me see the list first.

    To Gemini CLI
  3. Weekly digest

    Post a weekly changelog

    Summarise this week’s commits as a “what’s new” post and publish it to Telegram and LinkedIn now.

    To Gemini CLI
  4. Check the queue

    Fix what won’t publish

    List my scheduled posts for this week and fix any that break Instagram’s or X’s rules.

    To Gemini CLI

How does Gemini CLI talk to PostAxis?

Through MCP, the Model Context Protocol: an open standard for giving AI apps tools. PostAxis runs an MCP server; Gemini CLI connects to it and gets 11 tools that work on your account, nothing more. Full MCP reference

From your message to a scheduled post

What happens between you hitting enter and the post showing up in your calendar.

  • You write one message: what, where, when
  • Gemini CLI looks up your accounts and the limits of each network you named
  • It drafts a version per network and sends them to PostAxis
  • PostAxis checks every version and saves it as scheduled, a draft or live
  • The post sits in your calendar, editable until it goes out
Gemini CLI + PostAxis
Server
https://postaxis.io/api/mcp
Transport
Streamable HTTP
Sign-in
OAuth 2.1

Tools Gemini CLI discovers

  • list_workspacesYour PostAxis workspaces
  • list_accountsConnected social accounts per workspace
  • get_platform_rulesCaption limits and media rules per network
  • upload_media_from_urlPull an image or video into your media library
  • create_upload_linkOne-time link for uploading a local file
  • create_postDraft, schedule or publish one post
  • create_posts_bulkSchedule up to 50 posts in one call
  • list_postsPosts by status or date range
  • get_postOne post with its per-network status
  • update_postEdit text, media or time before it goes out
  • delete_postRemove a draft or scheduled post

Why httpUrl and not url?

Gemini CLI uses httpUrl for Streamable HTTP servers like PostAxis; url is for the older SSE transport.

Can Gemini CLI schedule 30 days of posts at once?

Yes. Gemini CLI can send up to 50 posts in one bulk call. Ask it to validate first: PostAxis checks every post and saves nothing, so you can review the plan before it is scheduled.

Plan 30 days of posts for X and LinkedIn about our product, validate them, show me the calendar, then schedule.

Done. Here’s what I did:

  • Validated 30 posts, each going to X and LinkedIn, 0 problems
  • Showed the calendar and waited for approval
  • Scheduled all 30 for 10:00 each day
via PostAxis

Example conversation

How does Gemini CLI sign in to PostAxis?

Gemini CLI signs in to PostAxis, never to your social networks. Your Instagram, X or LinkedIn accounts stay connected to PostAxis, and you can revoke Gemini CLI’s access at any time.

Every plan✓ Used by Gemini CLI

OAuth sign-in

  1. Gemini CLI opens the PostAxis sign-in in your browser
  2. You log in and click Approve
  3. It gets access to your account only, until you revoke it

Best for apps you use yourself: ChatGPT, Claude, Cursor, Codex and most others

API add-on

API key

  1. Create a key under Settings → API keys
  2. Send it as Authorization: Bearer KEY, or in the URL for clients that only take a URL
  3. Revoke the key any time and access stops at once

Best for servers and automations with no browser: n8n, Grok, Manus, headless agents

If something doesn’t work

The most common problems when connecting Gemini CLI, and how to fix them.

The agent says no accounts are connected

Connect at least one social account under Accounts in PostAxis. If you use several workspaces, tell the agent which one, for example “use my Acme workspace”.

401 Unauthorized or “sign in again”

The sign-in expired or was revoked. Reconnect from your agent (it opens the PostAxis sign-in again). With an API key, check the key is still active under Settings → API keys.

A post was rejected before saving

PostAxis checks each network’s rules first: caption length, media count, video length and format. The error says what to change; ask the agent to fix it and try again.

Posts are scheduled at the wrong time

Say the timezone in your request, for example “9:00 Europe/Berlin”. Without one, the agent uses the timezone it was told or UTC.

I want to stop an agent from posting

Open Settings → API keys in PostAxis. Revoke the agent under Connected agents, or revoke its API key. It loses access immediately.

Gemini CLI and PostAxis: questions

Does this work in the Gemini web app?

This guide is for Gemini CLI, which supports remote MCP servers with OAuth. Support for custom connectors in the Gemini apps depends on Google’s rollout in your account and region.

Why httpUrl instead of url?

In Gemini CLI, httpUrl selects the Streamable HTTP transport that the PostAxis server uses.

What is the PostAxis MCP server?

It’s a remote Model Context Protocol server at https://postaxis.io/api/mcp that gives AI agents 11 tools to list your accounts, upload media and create, schedule, edit and delete posts in PostAxis.

Which social networks are supported?

Instagram (posts, Reels, carousels), TikTok (videos and photo posts), YouTube Shorts, X, LinkedIn, Facebook Pages, Threads and Telegram channels.

How much does it cost?

MCP access with OAuth is included in every PostAxis plan, and every plan starts with a 7-day free trial. API keys need the API add-on.

What stops an agent from posting something wrong?

PostAxis checks every post against each network’s rules before saving, the agent can preview bulk plans without saving them, everything shows up in your calendar, and you can revoke an agent at any time in Settings → API keys.

Other agents

Start posting with Gemini CLI

Connect PostAxis once and let Gemini CLI write, schedule and publish across all your channels.

Wide list of social channels
on one axis

Harness every network you need. Platforms orbit PostAxis; you stay at the center.

Browse all platform pages

Frequently asked questions

You get a 7-day free trial. A card is required to start. Cancel before the trial ends and you pay nothing. After that, you pick a Creator, Growth, or Pro plan.