Skip to content

Moonya AI / Integrations / Gemini CLI

Moonya for Gemini CLI: manage Instagram, Facebook and more from the terminal

Gemini CLI brings an agent into your terminal. Add Moonya to its settings file and that agent can work on your social media too: write posts from files, upload your media, check what is scheduled and report on results.

By the Moonya team · Updated

Try Moonya 7 days for $1
In short
  • Works in: the Gemini CLI terminal.
  • Connection: A Moonya API key, sent as an Authorization header (up to 10 keys per workspace).
  • Server address: https://moonya.ai/mcp
  • Files from your computer: Yes: local photos and videos up to 95 MB through a one-time upload link.
  • Nothing is published without your approval, and anything that costs credits asks first.

Why use Moonya from Gemini CLI

Terminal agents are good at batches. Instead of creating posts one by one in a browser, you can ask for a week of drafts from a folder of notes, or upload a whole photo shoot in one go, and then review the results.

One detail trips people up: Gemini CLI expects the server address in a field called httpUrl, not url. The ready-made block below already uses the right field.

Moonya is a social media autopilot for small businesses and agencies. It learns your brand from your website, creates carousels, single image posts, Stories and short videos in your brand colors and fonts, and publishes them to Instagram, Facebook, LinkedIn, TikTok, Threads, YouTube, Pinterest and Google Business, plus X as a paid add-on.

What you can do from Gemini CLI

These are the things the Moonya connector actually exposes to Gemini CLI. Every tool is listed in plain language in the MCP documentation.

  • Brand Brain. Read and update what Moonya knows about your brand, analyse your website, add a PDF or DOCX brand document and save rules every future post follows.
  • Posts and drafts. Get topic ideas, then create carousels, single image posts and Stories from a topic or from your own text. The slides come back as images.
  • Review and schedule. Edit captions, hashtags and slide text, rewrite a draft from a plain instruction, change a slide photo, then approve, schedule, skip or move posts, up to 30 at once.
  • Your own photos and videos. Use your Gallery, schedule up to 10 of your own photos at once and invite up to 3 Instagram collaborators on a feed post, carousel or Reel.
  • Automations. Recurring post automations that create drafts on a schedule, plus comment-to-DM automations for Instagram and Facebook with results.
  • Inbox and analytics. Read messages, comments and reviews, reply as the brand after you approve the exact text, and see reach, engagement, best time and top posts.
  • Video. Reels from your clips or photos with a voiceover, a talking AI presenter and animated explainers: you see the script and the credit price before anything renders. Video tools appear when video is enabled for your workspace.
  • Agencies. On the Agency plan one connection can cover all client brands. Say which brand you mean and Moonya switches, keeping brands strictly separate.

Connect Moonya to Gemini CLI in 3 steps

Before you start

  • A Moonya account with an active plan or the 7-day trial for $1. Every plan includes the AI assistant connector.
  • A Moonya API key. In Moonya open Settings, AI assistants (MCP), click Create key, give it a name and pick Gemini CLI as the tool. The key is shown once, and Moonya shows the ready-made setting for Gemini CLI with the key already filled in. Only the workspace owner can create keys.
  • To publish, at least one social network connected in Moonya. Drafts work without one.

Gemini CLI

  1. Open the file ~/.gemini/settings.json
  2. Paste the block below (the field is httpUrl, not url)
  3. Start gemini and check with /mcp

Configuration (replace <KEY> with your key):

{
  "mcpServers": {
    "moonya": {
      "httpUrl": "https://moonya.ai/mcp",
      "headers": {
        "Authorization": "Bearer <KEY>"
      }
    }
  }
}

To check that it works, ask: “What do you know about my brand?” Gemini CLI should answer with what Moonya has in your Brand Brain. Moonya's tools load when a session starts, so new features show up in a new session.

Things to ask in Gemini CLI

Write in your own words, in English or Serbian. Here is what happens behind each request.

“Read the notes in ./content/week-45 and create one Moonya draft per file.”

Moonya confirms the total credit cost, then creates the drafts from your text and returns the slides.

“Upload ./photos/team.jpg to Moonya and schedule it for Monday at 8 am with a caption about our team.”

The photo goes to your Gallery through a one-time link, then Moonya schedules it at the time you agreed.

“Which of my posts got the most reach in the last 30 days?”

Moonya returns reach and engagement per network and your top posts.

“Pause the Friday promo automation until next month.”

Moonya turns that post automation off. Its existing drafts stay.

Your photos and videos

Because Gemini CLI runs in your terminal, it can upload local photos and videos (up to 95 MB) through a one-time Moonya upload link that is valid for 15 minutes. The file appears in your Gallery like any app upload.

Good to know

  • Nothing is published without your approval. New posts and videos are drafts. They go out only after you approve or schedule them, in Gemini CLI or in the Moonya app.
  • Credits are confirmed first. Tools that cost credits tell you the exact cost and wait for your yes. A repeated request never charges twice. Drafts take 2 to 4 minutes, and Gemini CLI checks back until the draft is ready.
  • Irreversible actions ask first. Publishing right now, deleting and replying to a message, comment or review need your confirmation.
  • Posting limits protect your accounts. Moonya spaces out posts on the same network and moves a post to the nearest safe time when needed, and tells you why.
  • Plans. The connector is included in Starter ($29), Pro ($79) and Agency ($199) per month, each with a 7-day trial for $1. Some video formats unlock once the trial ends and the plan is paid. See pricing.
  • You stay in control of access. Revoke a key at any time in Moonya under Settings, AI assistants (MCP); it stops working immediately. Moonya does not read your chat history.

Troubleshooting

  • Moonya does not show in /mcp. Check that ~/.gemini/settings.json is valid JSON, the field is httpUrl and <KEY> is replaced with your key, then restart gemini.
  • Calls fail with an authorization error. Create a new key in Moonya and replace the old one; a revoked key stops working immediately.
  • A tool returns an error. Moonya explains the fix in plain words and gives a link when the fix needs the browser, for example connecting a network or billing.

FAQ

How do I check that Moonya is connected in Gemini CLI?

Start gemini and run /mcp. Moonya should be listed with its tools.

Why httpUrl and not url?

Gemini CLI uses the httpUrl field for servers that speak Streamable HTTP, which is what Moonya uses. The block on this page is ready to paste.

Can Gemini CLI upload files from my computer?

Yes. It uses a one-time upload link (15 minutes, up to 95 MB per file) and the file lands in your Moonya Gallery.

Does anything get published without my approval?

No. Moonya creates drafts, and publishing happens only after you approve or schedule them.

Other AI tools

See all AI assistant integrations, the full tool list in the MCP documentation, or the guide how to manage your Instagram and Facebook from ChatGPT or Claude.

Your social media, on autopilot. You just approve.

Moonya learns your business from your website, then creates posts, Reels and DM automations you can run from Gemini CLI. Nothing goes out until you approve it.

Try Moonya 7 days for $1 Cancel anytime.