Schedule Discord posts from Gemini CLI

Add Hookpost to Gemini CLI as a remote MCP server in ~/.gemini/settings.json (httpUrl), with your API key. Then ask it for a Discord post: it saves a draft, schedules it, or publishes it now to a channel in your Discord server. If Discord is not connected yet, it gives you a link that connects it in about a minute.

By the Hookpost team ·

Set it up in 3 steps

  1. Copy your Hookpost API key. In Hookpost, open Settings → Developers → Reveal → Copy.
  2. Add the server. Paste the block below into ~/.gemini/settings.json with your key in place of YOUR_API_KEY.
  3. Connect Discord. Ask Gemini CLI to connect Discord. It replies with a link; open it, approve on Discord's screen, and the channel is in Hookpost. You can also use Add Channel in the app.

~/.gemini/settings.json

{
  "mcpServers": {
    "hookpost": {
      "httpUrl": "https://hookpost.hookstep.in/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Claude Code, Cursor, VS Code, Windsurf, Codex, Gemini CLI and the hookpost CLI use an API key, which comes with the Hookpost plan.

What Discord accepts

Text limit: 1,980 characters. Gemini CLI reads these from get_platform_post_rules before it writes, so the draft fits.

  • Posts to a channel in your server
  • Bot must be invited to the server

A first prompt

Paste this into Gemini CLI. It stops at a draft, so nothing goes out until you look at it.

Prompt

List my Hookpost channels. If Discord is not connected, give me the link to connect it and wait.
Then write one Discord announcement, based on README.md, within Discord's limits.
Save it as a draft in Hookpost. Do not schedule or publish anything.

What happens behind it

  1. list_channels finds your Discord channel and its id.
  2. If there is none, create_channel_connect_link returns a link: you open it, approve on Discord's own screen, and the channel is added. The link works for 24 hours.
  3. get_platform_post_rules returns Discord's limit and the settings a post takes.
  4. list_discord_channels lists where the post can go, for the setting it needs.
  5. create_post saves the post as a draft, schedules it for a time, or publishes it now.

Questions

Can Gemini CLI post to Discord on its own?
Yes, through Hookpost's create_post tool: as a draft, at a scheduled time, or right away. It posts to a channel in your Discord server only after you have connected it, and the prompt above keeps it to drafts until you review them in the Hookpost calendar.
Do I need my own Discord developer app or API key?
No. Hookpost holds the Discord app; you approve Hookpost once on Discord's sign-in screen, from the link Gemini CLI gives you or from Add Channel.
What does it need on the Hookpost side?
Claude Code, Cursor, VS Code, Windsurf, Codex, Gemini CLI and the hookpost CLI use an API key, which comes with the Hookpost plan.
What can Gemini CLI not do in Hookpost?
Delete posts, edit the text or date of a post, or read analytics. Do those in the Hookpost app.

Related