Discord

{/* Generated by scripts/generate-integration-catalog.mjs. Do not edit by hand. */}

At a glance

  • Availability: Experimental (how to enable).
  • Authentication: API key.
  • Connection: The key from DISCORD_BOT_TOKEN is sent as the Bot prefixed Authorization header.
  • Provider documentation: Authentication reference.

Credentials

Set these per environment. See Connect an integration.

VariableRequiredDescription
DISCORD_BOT_TOKENYesDiscord bot token from the Bot tab of your application in the Discord Developer Portal Docs.

Setup

  1. Create a Discord application: Go to https://discord.com/developers/applications, sign in with any Discord account (free), and click New Application. For testing, create your own free Discord server first so you have a safe place to invite the bot.
  2. Get the bot token: Open your application's Bot tab and click Reset Token to reveal the bot token. Copy it immediately (it is shown once) and set it as DISCORD_BOT_TOKEN. Resetting again invalidates the previous token.
  3. Enable privileged intents: On the Bot tab, under Privileged Gateway Intents, enable Message Content Intent. Without it, the content field of most messages returned by the API is empty for the bot. Enable Server Members Intent too if you need member data.
  4. Invite the bot to your server: In OAuth2 > URL Generator, select the bot scope, then grant permissions such as View Channels, Send Messages, Read Message History, Add Reactions, and Create Public Threads. Open the generated URL in a browser and add the bot to your server (requires Manage Server permission there).

Provider notes

  • The bot can only see and post in servers it has been invited to and channels its role can access.
  • Message content in API responses is empty unless the Message Content privileged intent is enabled (bots in fewer than 100 servers can enable it directly in the portal).
  • Discord rate limits per route; bulk reads should page with before/after cursors rather than tight loops.

Provider API reference.

Tools

ToolAccessDescription
Get Bot User<br /><code className="reference-identifier">discord__get_bot_user</code>ReadGet bot user
List Guilds<br /><code className="reference-identifier">discord__list_guilds</code>ReadList guilds
List Guild Channels<br /><code className="reference-identifier">discord__list_guild_channels</code>ReadList guild channels
Get Channel Messages<br /><code className="reference-identifier">discord__get_channel_messages</code>ReadGet channel messages
Send Message<br /><code className="reference-identifier">discord__send_message</code>WriteSend message
Create DM Channel<br /><code className="reference-identifier">discord__create_dm</code>WriteCreate DM channel
Edit Message<br /><code className="reference-identifier">discord__edit_message</code>WriteEdit message
Search Guild Members<br /><code className="reference-identifier">discord__search_guild_members</code>ReadSearch guild members
Add Reaction<br /><code className="reference-identifier">discord__add_reaction</code>WriteAdd reaction
Create Thread<br /><code className="reference-identifier">discord__create_thread</code>WriteCreate thread

Verify the connection

Call a read tool such as discord__get_bot_user with arguments for your account. Confirm that the result comes from the intended account or workspace before enabling write tools.