Two agents, one limit, one refused.

Messaging integration

Discord, in your agent's hands and under your limits.

Give an agent a voice in your server with a ceiling on how often it speaks. It reads channels and threads, posts, replies, reacts and starts threads as your bot, and an edit or a delete can wait for a person.

Connect

API key

bound to discord.com

What you create

  • A bot token from an application you create
  • View Channel, Send Messages, Read Message History
  • Create Public Threads, Send Messages in Threads, Add Reactions and Pin Messages
  1. 01In the Discord Developer Portal, create an application, add a bot and copy its token.
  2. 02Invite the bot to your server with View Channel, Send Messages, Read Message History and Create Public Threads.
  3. 03In Anlyon, open Actions, then Integrations, choose Discord and paste the token.
  4. 04Anlyon checks the token with Discord before storing it. It becomes a secret named DISCORD, bound to discord.com.

Connecting allows nothing by itself. No API returns the credential afterwards, to you, to the console or to an agent, and Anlyon refuses to send it anywhere but discord.com.

Operations

Each one is a named tool, off until you switch it on, and Anlyon makes every call with the credential your agent never sees. Reads return what Discord answers and change nothing. Writes count against a limit you set, can wait for a person, and are read back from Discord wherever it allows.

Reads

List channels

discord-list-channels

List the channels of one server (text, announcement, voice, forum and categories; threads are not included, use list-active-threads). Discord returns every channel in one response and has no paging, so a very large server's list can be cut at 64 KB.

Get channel

discord-get-channel

Get one channel or thread by id: its name, type, topic, parent and, for a thread, its archived state and whether the bot has joined it.

List messages

discord-list-messages

List 20 messages in a channel, newest first. For older messages pass before = the id of the oldest message you have; for newer ones pass after = the id of the newest. Pass at most one of before and after. Discord returns an empty list when the bot lacks Read Message History.

Get message

discord-get-message

Get one message by id: its text, author, reactions, pinned state, reply reference and the thread started from it, if any.

List pinned messages

discord-list-pinned-messages

List up to 20 pinned messages in a channel, most recently pinned first, each with its pinned_at time. When has_more is true, pass before = the pinned_at of the last item for the next page.

List active threads

discord-list-active-threads

List every active (not archived) thread in a server, newest first, with a member entry for each thread the bot has joined. Discord returns them all in one response and has no paging, so a very large server's list can be cut at 64 KB.

List archived threads

discord-list-archived-threads

List up to 20 archived public threads of one channel, most recently archived first. When has_more is true, pass before = the thread_metadata.archive_timestamp of the last thread for the next page.

List thread messages

discord-list-thread-messages

List 20 messages in a thread, newest first (a thread is a channel, so this is the channel messages call with the thread's id). For older messages pass before = the id of the oldest message you have; for newer ones pass after. Pass at most one of before and after.

Writes

Post message

discord-post-message

Post one message to a channel the bot can see.

channel_idcontent

Read back

Read back by message id; the text must match.

Edit message

discord-edit-message

Replace the text of one message the bot posted.

channel_idmessage_idcontent

Read back

Read back from the message; the text must match.

Start thread

discord-start-thread

Start one thread from a message.

channel_idmessage_idname

Read back

Read back by the thread's id; its name must match.

Reply to message

discord-reply-to-message

Post one message as a reply to another message in the same channel. Discord refuses the reply if the original message no longer exists, rather than posting it unattached.

channel_idmessage_idcontent

Read back

Read back by the reply's id; its text and the message it replies to must match.

Post thread message

discord-post-thread-message

Post one message in a thread. Posting in an archived (not locked) thread unarchives it. Needs Send Messages in Threads.

thread_idcontent

Read back

Read back by message id; the text must match.

Delete message

discord-delete-message

Delete one message. The bot can delete its own messages; deleting anyone else's needs Manage Messages, which Discord otherwise refuses. Deleting a message in an archived thread is refused.

channel_idmessage_id

Acknowledged

Sent once and acknowledged; not read back: Discord does not document what reading a deleted message returns, so the receipt is acknowledged, not confirmed.

Add reaction

discord-add-reaction

Add the bot's reaction to a message. Adding an emoji nobody has used on that message yet needs Add Reactions.

channel_idmessage_idemoji

Acknowledged

Sent once and acknowledged; not read back: Discord answers with no body; a message's reactions do not tie an emoji to the bot's own reaction, and the list of who reacted names the bot by a user id no input gives, so the receipt is acknowledged, not confirmed. Adding a reaction the bot already has changes nothing.

Remove reaction

discord-remove-reaction

Remove the bot's own reaction from a message; other people's reactions are left alone.

channel_idmessage_idemoji

Acknowledged

Sent once and acknowledged; not read back: Discord answers with no body; a message's reactions do not tie an emoji to the bot's own reaction, and the list of who reacted names the bot by a user id no input gives, so the receipt is acknowledged, not confirmed.

Pin message

discord-pin-message

Pin one message in its channel. Needs the Pin Messages permission.

channel_idmessage_id

Read back

Read back from the message; it must show as pinned.

Unpin message

discord-unpin-message

Unpin one message in its channel. Needs the Pin Messages permission.

channel_idmessage_id

Read back

Read back from the message; it must show as not pinned.

Join thread

discord-join-thread

Add the bot to a thread so it receives the thread's messages. The thread must not be archived.

thread_id

Read back

Read back from the thread; it must list the bot as a member.

Archive thread

discord-archive-thread

Archive one thread: it leaves the channel's thread list and stays readable. Discord lets the thread's creator archive it; any other thread needs Manage Threads. A later message in the thread unarchives it unless it is locked.

thread_id

Read back

Read back from the thread; it must show as archived.

The brake

Suggested limits

  • 200 messages a day
  • 100 edits a day
  • 50 threads started a day
  • 200 replies a day
  • 200 thread messages a day
  • 50 deletions a day
  • 200 reactions added a day
  • 200 reactions removed a day
  • 30 pins a day
  • 30 unpins a day
  • 50 threads joined a day
  • 30 threads archived a day

Shared by every agent, session and key in the environment. You set the number.

Suggested approvals

  • A person approves editing a message
  • A person approves deleting a message
  • A person approves archiving a thread

Installed turned off. The reviewer sees the exact request, and the approved request is the one that runs.

Before you rely on it

  • Without Read Message History the post still goes out, but it cannot be read back and its receipt stays acknowledged.
  • A bot can edit only its own messages.

Use it

1. Connect, from a terminal
npm install -g @anlyonhq/cli
anlyon auth login

# Shows where to create the key, then asks for it without echoing
anlyon connections add discord --secret DISCORD

# From a clone of github.com/AnlyonHQ/anlyon-platform:
# see what would be installed, then switch on one operation
anlyon packs plan ./packs/discord
anlyon packs install ./packs/discord --action post-message --yes
2. Call it from your agent, TypeScript
import { Client } from "@anlyonhq/sdk";

const anlyon = new Client({ apiKey: process.env.ANLYON_AGENT_KEY! });

const { data } = await anlyon.actions.invoke(
  "discord-post-message",
  {
    "channel_id": "1100000000000000001",
    "content": "Deploy finished."
  },
);

if (data?.pendingApproval) {
  console.log("Waiting for a person", data.approvalId);
} else {
  console.log(data?.status, data?.responseStatus);
}
Or hand it to Claude Code over MCP
# Claude Code. Sign in with the browser, no key to paste.
claude mcp add --transport http anlyon https://api.anlyon.com/mcp

# Then ask in plain words. Each operation you switched on is a tool.

Prefer to click?

The console does all of it: connect, switch operations on, set the limit, and copy the setup for your agent.

Free tier, no credit card. One command if you use Claude or Cursor.

$ claude mcp add anlyon -- npx -y @anlyonhq/mcp-server