Discord

The Discord connector allows AI agents to read server messages, search conversation history, and post messages or reactions — all through the Discord API using OAuth 2.0. Your credentials are stored encrypted in MCPGate's vault and are never exposed to the AI client.

User OAuth token

MCPGate uses a user OAuth token, not a bot token. Actions appear as coming from your Discord account. The connector can only access servers and channels your account is a member of.

Tool reference#

The Discord connector exposes 7 tools: 5 read and 2 write.

ToolCategoryDescription
discord_list_guildsreadList servers the user is a member of
discord_list_channelsreadList channels in a server
discord_read_messagesreadRead messages from a channel
discord_search_messagesreadSearch messages in a guild or channel
discord_get_userreadGet information about a Discord user
discord_send_messagewriteSend a message to a channel
discord_add_reactionwriteAdd a reaction emoji to a message

Common guardrail recipes#

Read-only access#

Enable only the five read tools and deny discord_send_message and discord_add_reaction. This is safe for agents that monitor or summarise Discord conversations without posting anything.

Restrict to specific channels#

Apply the allow_values template to discord_send_message and target the channel_id field. Provide a list of channel IDs the agent is permitted to post to. Any attempt to post to other channels will be denied.

Block mass pings#

Apply the keyword_block template to discord_send_message and add @everyone and @here to the blocked keyword list. This prevents the AI from triggering notifications for the entire server.

Troubleshooting#

  • Channel not accessible — The agent can only read channels that your Discord account has permission to view. Private channels require an explicit role assignment.
  • Search returns no results — Discord message search is only available in servers where you have the correct permissions. Community servers may restrict search.
  • Send message fails in read-only channels — Some channels are configured as announcement or read-only channels. discord_send_message will fail if your account does not have the Send Messages permission in that channel.