Coding agents and editors

Post to social media from Gemini CLI

Setup checked September 22, 2026Google

Gemini CLI reaches iHatePosting's hosted server from a short block in settings.json. type: http tells Gemini CLI to use Streamable HTTP, the only kind of server ours is. Gemini CLI's own docs still call url an SSE address, but since version 0.21 the code reads url with type http as Streamable HTTP.

Set it up

  1. 1. Create an iHatePosting API key

    Sign in, open Settings → Developers and create a key. It starts with pk_live_ and is shown in full only once, so copy it before you leave the page.

  2. 2. Add iHatePosting to Gemini CLI

    Add to ~/.gemini/settings.json. Replace YOUR_API_KEY with your key.

    {
      "mcpServers": {
        "ihateposting": {
          "url": "https://ihateposting.com/mcp",
          "type": "http",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    }
  3. 3. Ask it to post

    Tell Gemini CLI what you want to say and where. It saves a draft in iHatePosting unless you ask for the post to go out now or at a set time.

What is different about Gemini CLI

  • Keep the type line. From version 0.21 Gemini CLI reads url with type http as Streamable HTTP, which is the only kind of server ours is. On 0.20 or older, type is ignored and url means SSE, which never connects — there, write httpUrl in place of url and drop the type line. httpUrl still works on current versions; the code calls it deprecated but shows no warning unless url is set as well.
  • Restart Gemini CLI after editing settings.json — it reads MCP servers only at start-up.
  • Folder trust is on by default. The first time you run gemini in a folder it asks whether you trust its files — choose Trust folder. To change it later, run /permissions trust in a session, choose Trust this folder and press r to restart. Until a folder is trusted, no MCP server loads there, not even one from your user settings: /mcp shows No MCP servers configured, gemini mcp list shows it as Disabled, and gemini -p runs without it.
  • There is a one-command route too: gemini mcp add --scope user --transport http --header "Authorization: Bearer YOUR_API_KEY" ihateposting https://ihateposting.com/mcp — then run gemini mcp list in a folder you trust to see whether it connected (in any other folder it shows Disabled). Connected only means the server answered, not that the key is right; ask Gemini which iHatePosting account it is using to check the key.
  • Since 18 June 2026 Gemini CLI no longer serves Google AI Pro and Ultra subscribers or free Gemini Code Assist for individuals — Google points them to Antigravity CLI. It keeps working with paid Gemini API keys and Code Assist Standard or Enterprise licences.

Google's own documentation: MCP servers with Gemini CLI

Nothing goes out unless you say so

Every post Gemini CLI writes is saved as a draft in iHatePosting unless you ask for it to be published now or at a set time. Publishing, rescheduling, retrying and deleting are marked as actions that change things, so clients that honour those markings ask you before they run them. Deleting a post in iHatePosting never removes one that is already live on a network.

Frequently asked questions

Why does /mcp say No MCP servers configured?

The folder is not trusted yet. Until it is, no MCP server loads there, not even one from your user settings. Run /permissions trust in a session, choose Trust this folder and press r to restart.

Do I need the type line?

Yes. From version 0.21 Gemini CLI reads url with type http as Streamable HTTP, the only kind of server ours is. On 0.20 or older, write httpUrl in place of url and drop the type line.

Can I use Gemini CLI with a Google AI Pro or Ultra subscription?

Not since 18 June 2026, when Google stopped serving those subscribers in Gemini CLI and pointed them to Antigravity CLI. Gemini CLI keeps working with paid Gemini API keys and Code Assist Standard or Enterprise licences.

Ready to post everywhere from Gemini CLI?

Start your 90-day free trial — no credit card, about a minute to your first post.

Sign Up

Other AI agents

See every AI agent