Skip to main content
Glama

Discord MCP Server

Discord MCP Server

⚠️ SECURITY WARNING: This project handles Discord bot tokens and server access. Please read our Security Policy before using or contributing.

A comprehensive Model Context Protocol (MCP) server for Discord API integration, providing powerful Discord bot management capabilities through a standardized interface.

Features

This server provides 93 Discord tools organized into the following categories:

CategoryTools CountDescription
Message Management18 toolsSend, edit, delete, reactions, pin, bulk operations
Channel Management25 toolsCreate/edit/delete all channel types, positions, privacy
Member & Role Management12 toolsAdd/remove roles, edit members, search, info retrieval
Voice & Audio6 toolsJoin/leave voice, play audio, volume control
Webhooks4 toolsCreate, delete, list, send webhook messages
Events & Scheduling4 toolsCreate, edit, delete, list server events
Emoji & Stickers6 toolsManage custom emojis and stickers
Privacy & Security7 toolsAuto-moderation, privacy controls, bulk settings
Server Administration6 toolsServer settings, welcome screen, widget management
Analytics & Export5 toolsStatistics, message history, chat log export

Key Tools

  • discord_manage - Unified tool that handles all 93 operations through one interface
  • comprehensive_channel_management - Multi-operation channel orchestrator
  • bulk_set_privacy - Mass privacy control across channels/categories
  • organize_channels - Advanced channel/category positioning system
  • export_chat_log - Professional chat export in JSON/CSV/TXT formats

Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Discord bot token (see setup below)

Installation

# Clone the repository git clone https://github.com/sashathelambo/discord-mcp.git cd discord-mcp # Install dependencies npm install # Build the project npm run build # Start the server npm start

Development Mode

npm run dev

Configuration

Discord Bot Setup

  1. Go to Discord Developer Portal
  2. Create a new application and bot
  3. Copy the bot token to your .env file
  4. IMPORTANT: Regenerate your token if you suspect it's been exposed

Environment Variables

Create a .env file:

# Your Discord bot token (KEEP SECRET!) DISCORD_TOKEN=your_bot_token_here # Default Discord server ID (optional) DISCORD_GUILD_ID=your_guild_id_here

Required Bot Permissions

Manage Server Manage Roles Manage Channels Manage Messages View Channels Send Messages Connect (for voice) Speak (for voice)

Usage

MCP Integration

Use with MCP-compatible clients:

# Via stdio npx discord-mcp # Via HTTP (port 3001) HTTP_PORT=3001 npx discord-mcp

Examples

Using the Master Control Tool
// All operations through one unified interface await discord_manage({ action: 'send_message', channelId: '123', message: 'Hello World!' }); await discord_manage({ action: 'create_text_channel', guildId: '456', name: 'new-channel' }); await discord_manage({ action: 'comprehensive_channel_management', guildId: '456', operations: [ { action: 'create_category', name: 'New Category' }, { action: 'create_text_channel', name: 'general', categoryId: 'cat_id' }, { action: 'set_channel_private', channelId: 'chan_id', isPrivate: true } ] });
Using Individual Tools
// Server information await discord.getServerInfo(guildId); // Advanced channel creation await discord.createForumChannel(guildId, "discussions", categoryId, { topic: "Community discussions", slowmode: 30, isPrivate: true, allowedRoles: ["member_role_id"] }); // Bulk privacy management await discord.bulkSetPrivacy(guildId, { targets: [ { id: "channel1", type: "channel", isPrivate: true }, { id: "category1", type: "category", isPrivate: false } ] }); // Export chat logs await discord.exportChatLog(channelId, "JSON", { limit: 1000, dateRange: { start: "2024-01-01", end: "2024-12-31" } });

Security

For Users

  • Keep your Discord bot token secret
  • Regularly rotate your tokens
  • Monitor bot activity
  • Use minimal required permissions

For Contributors

  • Never commit tokens or secrets
  • Validate all user inputs
  • Review dependencies for vulnerabilities
  • Follow secure coding practices

Tool Reference

Message Management Tools (18)

Tool NameDescription
send_messageSend messages to channels
edit_messageEdit existing messages
delete_messageDelete specific messages
read_messagesRead message history from channels
send_private_messageSend DMs to users
edit_private_messageEdit private messages
delete_private_messageDelete private messages
read_private_messagesRead DM history
add_reactionAdd emoji reactions
remove_reactionRemove emoji reactions
pin_messagePin messages in channels
unpin_messageUnpin messages
get_pinned_messagesList pinned messages
bulk_delete_messagesDelete multiple messages
crosspost_messageCrosspost announcements
get_message_historyAdvanced message history with pagination
get_message_attachmentsExtract message attachments
read_imagesRead and analyze images from messages

Channel Management Tools (25)

Tool NameDescription
create_text_channelCreate text channels
create_voice_channelCreate voice channels
create_forum_channelCreate forum channels
create_announcement_channelCreate announcement channels
create_stage_channelCreate stage channels
edit_channel_advancedEdit any channel with advanced settings
delete_channelDelete channels
find_channelFind channels by name
list_channelsList all server channels
create_categoryCreate channel categories
delete_categoryDelete categories
find_categoryFind categories by name
list_channels_in_categoryList channels in specific category
set_channel_positionMove channel position
set_channel_positionsMove multiple channels
set_category_positionMove category position
move_channel_to_categoryMove channels between categories
organize_channelsComprehensive channel organization
get_channel_structureGet complete channel hierarchy
set_channel_privateSet channel privacy settings
set_category_privateSet category privacy settings
bulk_set_privacyBulk privacy management
comprehensive_channel_managementAll-in-one channel operations
upload_fileUpload files to channels
export_chat_logExport chat logs (JSON/CSV/TXT)

Member & Role Management Tools (12)

Tool NameDescription
get_user_id_by_nameFind user IDs by username
get_membersList server members with pagination
search_membersSearch members by name
edit_memberEdit member properties
get_member_infoGet detailed member information
create_roleCreate new server roles
delete_roleDelete server roles
edit_roleModify role properties
add_role_to_memberAssign roles to members
remove_role_from_memberRemove roles from members
get_rolesList all server roles
set_role_positionsReorder role hierarchy

Voice & Audio Tools (6)

Tool NameDescription
join_voice_channelConnect bot to voice channels
leave_voice_channelDisconnect from voice channels
play_audioStream audio in voice channels
stop_audioStop audio playback
set_volumeControl audio volume
get_voice_connectionsList active voice connections

Webhook Tools (4)

Tool NameDescription
create_webhookCreate channel webhooks
delete_webhookDelete webhooks
list_webhooksList channel webhooks
send_webhook_messageSend messages via webhooks

Events & Scheduling Tools (4)

Tool NameDescription
create_eventCreate scheduled server events
edit_eventEdit existing events
delete_eventDelete server events
get_eventsList all scheduled events

Emoji & Sticker Tools (6)

Tool NameDescription
create_emojiCreate custom server emojis
delete_emojiDelete custom emojis
get_emojisList all server emojis
create_stickerCreate custom server stickers
delete_stickerDelete custom stickers
get_stickersList all server stickers

Privacy & Security Tools (7)

Tool NameDescription
create_automod_ruleCreate automoderation rules
edit_automod_ruleEdit automod rules
delete_automod_ruleDelete automod rules
get_automod_rulesList all automod rules
create_inviteCreate server invites
delete_inviteDelete/revoke invites
get_invitesList all server invites

Server Administration Tools (6)

Tool NameDescription
get_server_infoGet comprehensive server information
edit_serverEdit server settings
get_server_widgetGet server widget information
get_welcome_screenGet welcome screen settings
edit_welcome_screenConfigure welcome screen
get_server_statsGet comprehensive server statistics

Interactive Components Tools (4)

Tool NameDescription
send_embedSend rich embed messages
send_buttonSend messages with interactive buttons
send_select_menuSend messages with select menus
send_modalSend modal dialogs (interaction context)

Master Control Tool (1)

Tool NameDescription
discord_manageUnified tool - access ALL 93 operations through one interface

Contributing

Project Creator & Lead Developer: @sashathelambo (Dr. Vova)

This project is primarily developed and maintained by sashathelambo. For contributions:

  1. Read our Contributing Guidelines
  2. Follow our Security Policy
  3. Use the PR template
  4. Test thoroughly before submitting
  5. Discuss major changes with @sashathelambo first

Development Guidelines

  • Use TypeScript for all code
  • Follow existing code style
  • Add tests for new features
  • Never commit sensitive data
  • Update documentation

Troubleshooting

Common Issues

  • Token Invalid: Regenerate your Discord bot token
  • Permission Denied: Check bot permissions in Discord server
  • Build Errors: Ensure Node.js 18+ and TypeScript are installed

Getting Help

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This software is provided "as-is" without warranty. Users are responsible for:

  • Complying with Discord's Terms of Service
  • Securing their bot tokens and credentials
  • Using appropriate permissions and rate limiting
  • Monitoring and maintaining their Discord bots

Acknowledgments

  • @sashathelambo (Dr. Vova) - Project creator, lead developer, and architect of all 93 Discord tools
  • Discord.js team for the excellent Discord API wrapper
  • Model Context Protocol community for the standardized protocol
  • Everyone who uses and supports this project
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables comprehensive Discord bot management and server operations through MCP, including channel management, message handling, member moderation, role management, and voice operations. Provides secure Discord API integration with built-in permission controls and audit logging capabilities.

  1. Features
    1. Key Tools
  2. Quick Start
    1. Prerequisites
    2. Installation
    3. Development Mode
  3. Configuration
    1. Discord Bot Setup
    2. Environment Variables
    3. Required Bot Permissions
  4. Usage
    1. MCP Integration
    2. Examples
  5. Security
    1. For Users
    2. For Contributors
  6. Tool Reference
    1. Message Management Tools (18)
    2. Channel Management Tools (25)
    3. Member & Role Management Tools (12)
    4. Voice & Audio Tools (6)
    5. Webhook Tools (4)
    6. Events & Scheduling Tools (4)
    7. Emoji & Sticker Tools (6)
    8. Privacy & Security Tools (7)
    9. Server Administration Tools (6)
    10. Interactive Components Tools (4)
    11. Master Control Tool (1)
  7. Contributing
    1. Development Guidelines
  8. Troubleshooting
    1. Common Issues
    2. Getting Help
  9. License
    1. Disclaimer
      1. Acknowledgments

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          An MCP server that enables communication with users through Telegram. This server provides a tool to ask questions to users and receive their responses via a Telegram bot.
          Last updated -
          1
          38
          JavaScript
        • A
          security
          A
          license
          A
          quality
          Provides Discord integration capabilities to MCP clients like Claude Desktop.
          Last updated -
          15
          118
          Python
          MIT License
          • Apple
        • A
          security
          A
          license
          A
          quality
          An MCP server that enables posting messages to Discord webhooks, allowing customization of content, username, and avatar URL.
          Last updated -
          1
          0
          JavaScript
          MIT License
        • A
          security
          F
          license
          A
          quality
          An MCP server that allows Claude to interact with Discord by providing tools for sending/reading messages and managing server resources through Discord's API.
          Last updated -
          19
          33
          JavaScript

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/sashathelambo/discord-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server