Skip to main content
Glama

Discord MCP Server

A Model Context Protocol server that provides AI agents with secure access to Discord's REST API and Gateway events.

Features

🔧 120+ Discord API Tools - Complete coverage of Discord's REST API
🔒 Security First - Guild/channel allowlists, safe defaults, no accidental mentions
⚡ Real-time Events - Gateway integration for live Discord activity
🎯 Smart Routing - Auto-generated tools from declarative API catalog
📦 Modular Packs - Enable only the functionality you need

Related MCP server: discord-mcp

Quick Start

# Clone and install
git clone https://github.com/GustyCube/discord-mcp
cd discord-mcp
npm install

# Configure your bot
cp .env.example .env
# Add your DISCORD_BOT_TOKEN and other settings

# Build and run
npm run build
npm start

Documentation

📖 Complete documentation available at discord-mcp.gustycube.com

Example: Claude Desktop Integration

Add to your mcp.json:

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/path/to/discord-mcp/dist/index.js"],
      "env": {
        "DISCORD_BOT_TOKEN": "your_bot_token_here",
        "ALLOW_GUILD_IDS": "123456789,987654321",
        "ALLOW_CHANNEL_IDS": "111111111,222222222"
      }
    }
  }
}

What You Can Do

  • 📝 Message Management - Send, edit, delete messages and reactions

  • 👥 User & Guild Info - Get user profiles, guild details, member lists

  • 🔊 Channel Operations - List channels, manage permissions, create threads

  • 🎭 Rich Content - Send embeds, manage webhooks, upload files

  • ⚡ Live Events - Subscribe to message events, member joins, etc.

  • 🛡️ Moderation - Manage bans, kicks, roles (with appropriate permissions)

Contributing

See the full documentation for development setup, API reference, and contribution guidelines.

License

MIT License - see LICENSE file for details.

Available Tools

19 tools
discord_add_friendB

Send a friend request to a user

NameRequiredDescriptionDefault

No parameters

discord_add_reactionC

Add a reaction to a message

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
messageIdYesThe message ID to react to
emojiYesEmoji to react with (Unicode or custom emoji format)
discord_cleanup_downloadC

Clean up a previously downloaded Discord attachment file

NameRequiredDescriptionDefault
pathYesFile path to clean up
discord_clear_presenceB

Clear your Discord presence/activity

NameRequiredDescriptionDefault

No parameters

discord_create_dmC

Create or get existing DM channel with a user

NameRequiredDescriptionDefault
userIdYesThe user ID to create DM with
discord_delete_messageC

Delete a message

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
messageIdYesThe message ID to delete
discord_download_attachmentB

Download a Discord attachment and return it as MCP file reference

NameRequiredDescriptionDefault
urlYesDiscord CDN URL of the attachment to download
discord_edit_messageC

Edit a previously sent message

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
messageIdYesThe message ID to edit
contentYesNew message content
discord_get_channelB

Get information about a Discord channel

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
discord_get_dm_channelsB

Get list of DM channels for the current user

NameRequiredDescriptionDefault

No parameters

discord_get_friendsB

Get list of friends for the current user

NameRequiredDescriptionDefault

No parameters

discord_get_messageB

Get a specific message by ID with full attachment details

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
messageIdYesThe message ID to retrieve
discord_get_message_historyC

Get message history from a Discord channel with optional filtering

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
limitNoNumber of messages to retrieve (1-100, default: 50)
beforeNoGet messages before this message ID
afterNoGet messages after this message ID
aroundNoGet messages around this message ID
discord_list_attachmentsC

List all attachments in a Discord channel from recent messages

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
limitNoNumber of messages to scan for attachments (default: 50)
imageOnlyNoOnly show image attachments
minSizeNoMinimum file size in KB
maxSizeNoMaximum file size in KB
discord_remove_friendC

Remove a friend or cancel a friend request

NameRequiredDescriptionDefault
userIdYesUser ID to remove as friend
discord_remove_reactionC

Remove a reaction from a message

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
messageIdYesThe message ID to remove reaction from
emojiYesEmoji to remove (Unicode or custom emoji format)
userIdNoUser ID to remove reaction from (defaults to self)
discord_search_messagesC

Search for messages in a Discord channel with text query and filters

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
queryYesText to search for in messages
limitNoNumber of results to return (1-25, default: 25)
authorIdNoFilter by author user ID
hasAttachmentsNoFilter messages that have attachments
hasImagesNoFilter messages that have images
hasFilesNoFilter messages that have files
beforeNoSearch messages before this date (ISO format)
afterNoSearch messages after this date (ISO format)
discord_send_messageC

Send a message to a Discord channel, optionally with up to 10 files

NameRequiredDescriptionDefault
channelIdYesThe Discord channel ID
contentNoMessage content (max 2000 characters)
filesNoFiles to attach to the message
ttsNoSend as text-to-speech message
replyToNoMessage ID to reply to
discord_update_presenceB

Update your Discord presence/status

NameRequiredDescriptionDefault
statusNoYour status (online, dnd, idle, invisible, offline)
activityNoActivity to display
afkNoWhether you are AFK

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • Changeddiscord_clear_presence1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changeddiscord_get_dm_channels1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changeddiscord_get_friends1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 19 tool updates
    • First observeddiscord_add_friend
    • First observeddiscord_add_reaction
    • First observeddiscord_cleanup_download
    • First observeddiscord_clear_presence
    • First observeddiscord_create_dm
    • First observeddiscord_delete_message
    • First observeddiscord_download_attachment
    • First observeddiscord_edit_message
    • First observeddiscord_get_channel
    • First observeddiscord_get_dm_channels
    • First observeddiscord_get_friends
    • First observeddiscord_get_message
    • First observeddiscord_get_message_history
    • First observeddiscord_list_attachments
    • First observeddiscord_remove_friend
    • First observeddiscord_remove_reaction
    • First observeddiscord_search_messages
    • First observeddiscord_send_message
    • First observeddiscord_update_presence

TDQS

A3.6/5.0

Scored across 19 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity, as they target specific Discord actions like friend management, message handling, channel operations, and presence updates. The descriptions clearly differentiate between similar actions, such as discord_add_friend vs discord_remove_friend or discord_send_message vs discord_edit_message, ensuring agents can easily select the correct tool.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with the prefix 'discord_', such as discord_add_friend, discord_edit_message, and discord_get_channel. This uniformity makes the tools predictable and easy to understand, with no deviations in naming conventions across the set.

Tool Count5/5

With 19 tools, the server is well-scoped for Discord interactions, covering a comprehensive range of actions from messaging and reactions to friend management and presence updates. Each tool earns its place by addressing specific needs without redundancy, making the count appropriate for the domain.

Completeness5/5

The tool set provides complete coverage for Discord operations, including CRUD actions for messages (send, edit, delete, get), friends (add, remove, list), channels (get, DM creation), and presence (update, clear). There are no obvious gaps, as it supports core workflows like attachment handling, message history, and search, ensuring agents can perform all essential tasks.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for interacting with Discord via REST API, enabling guild, channel, and message operations using a bot token.
    7
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for Discord communications, enabling listing guilds and channels, reading and sending messages, creating threads, and adding reactions.
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables MCP clients to interact with Discord servers, allowing operations such as sending messages and reading message history through the Discord API.
    23
    203 npm
    MIT