# Let your AI agent post to Discord

Source: https://staging.postgale.com/integrations/discord

Yes, an AI agent can post to a Discord channel through Postgale. A server admin adds Postgale’s bot on Discord’s own authorization screen and picks the channels, and the agent can publish messages with up to 10 attachments and 10 embeds, polls, forum posts and threads, edit or delete what it posted, and manage pins, roles and scheduled events.

## Can an AI agent post to Discord?

Postgale is the secure layer for AI agents on social media. This page covers Discord: what an agent can publish, what you need, the Discord rules Postgale applies, and how to connect a channel.

Postgale runs the Discord bot for you: a server admin adds it once and there is no bot to host and no token for you to keep. The agent sends one plain request (the text, the files, the embeds, when to post, which channel) and Postgale uploads the files, posts the message and reports the link back.

MCP (Model Context Protocol) is the open standard that lets AI assistants such as Claude and Cursor use outside tools. An MCP server is what they connect to. Postgale hosts one and a REST API, so ChatGPT, Claude, Cursor, VS Code, n8n or your own agent can post to Discord as a tool.

## What do you need?

- A Discord server where you have the Manage Server permission, to add Postgale’s bot.
- A Postgale workspace, and a sign-in or an API key for the agent.
- Optional files on a public HTTPS URL (upload them with `upload_media`): up to 10 MB each.
- An AI tool that can call Postgale: [ChatGPT](https://staging.postgale.com/guides/chatgpt), [Claude](https://staging.postgale.com/guides/claude), [Cursor](https://staging.postgale.com/guides/cursor), [n8n](https://staging.postgale.com/guides/n8n), VS Code, or your own code.

## What can the agent do on Discord?

| Task | What Postgale does |
| --- | --- |
| Publish | Text up to 2000 characters, up to 10 attachments and up to 10 rich embeds (title, description, fields, images, colors); native polls; forum posts with tags; a thread under the message; announcement crossposts; a custom name and avatar per message; silent delivery; scheduling. |
| Edit | Change the text of a message it posted. |
| Delete | Remove a message it posted, or any message in the channel. |
| Run the server | Pin messages, create and assign roles, list and search members, and create, update or cancel scheduled events. |
| Direct messages | Send a 1:1 DM from the bot to a member (replies do not come back). |

## Which Discord rules does Postgale enforce?

- Text is limited to 2000 characters, embeds to Discord’s field limits and 6000 characters in all; a post over a limit is refused before it reaches Discord.
- Files are uploaded by Postgale within Discord’s default limits: 10 MB per file, 10 files per message.
- @everyone and @here do not ping unless the post asks for it explicitly.
- When Discord asks to slow down, Postgale waits the time Discord gives before retrying.
- Roles follow Discord’s hierarchy: the bot only manages roles below its own, and never @everyone.
- If the channel’s webhook is deleted in Discord, the account is marked as needing reconnection and your webhook hears about it.

## How do I connect Discord to an AI agent with Postgale?

1. Create a Postgale workspace and open Dashboard → Accounts → Discord.
2. On Discord, pick the server and add Postgale’s bot.
3. Back in Postgale, pick the channels to post to. Each one is listed under Connected accounts, ready to publish.
4. Connect your AI tool: add `https://postgale.com/mcp` in [ChatGPT](https://staging.postgale.com/guides/chatgpt), [Claude](https://staging.postgale.com/guides/claude) or [Cursor](https://staging.postgale.com/guides/cursor) and sign in to Postgale, or create a key under Dashboard → API keys for [n8n](https://staging.postgale.com/guides/n8n) or your own code.

An agent can also start the connection itself: the `connect_account` tool (or `GET /api/v1/connect/discord`) returns a link for the server admin to open. The agent never gets a token.

## What does a Discord post from an agent look like?

> Ask your agent: “When we ship a release, post the changelog to #announcements on Discord as an embed with the version number and the screenshot attached.”

POST /api/v1/posts (Discord):
```json
{
  "content": "Release 2.4 is out",
  "platforms": [
    {
      "accountId": "acc_dc",
      "platformSpecificData": {
        "mediaUrl": "https://media.example.com/screenshot.png",
        "embeds": [
          {
            "title": "Changelog",
            "description": "Faster sync and dark mode.",
            "fields": [
              {
                "name": "Version",
                "value": "2.4",
                "inline": true
              }
            ],
            "image": {
              "url": "attachment://screenshot.png"
            }
          }
        ]
      }
    }
  ],
  "publishNow": true
}
```

Nothing has to go out unreviewed. Approval can be required per workspace, per connected account, per API key or per signed-in app; while it applies, posts wait as pending approval in the dashboard, and replies, direct messages and edits to live posts are queued for a person to approve, edit or reject there before anything is sent. Every write the agent makes is kept in the audit log.

## What can’t an agent do on Discord through Postgale?

- Read messages or DM replies, or react. Postgale never opens a gateway connection, so nothing comes back into the inbox.
- Read views or reactions. Discord gives bots no message analytics.
- Post files over 10 MB, even in boosted servers.

## Questions

### Can Claude post to a Discord channel?

Yes. Add Postgale as a connector in Claude, connect the channel in Postgale and ask Claude to post. See the Claude guide.

### Do I need to host a Discord bot?

No. A server admin adds Postgale’s bot once from Discord’s authorization screen; Postgale runs it, and you never handle its token.

### Can the agent post embeds?

Yes, up to 10 rich embeds per message with titles, descriptions, fields, colors and images, next to up to 10 attachments.

## Related

- [Discord developer guide](https://staging.postgale.com/docs/discord)
- [Telegram](https://staging.postgale.com/integrations/telegram)
- [Connect Claude](https://staging.postgale.com/guides/claude)
- [REST API reference](https://staging.postgale.com/docs/api)
