The Discord MCP server provides comprehensive Discord server management through 50+ tools organized into 12 categories, enabling programmatic control of nearly all Discord operations via HTTP or stdio transport.
Core Capabilities:
Server Management: List servers, view details, and modify settings (name, description, AFK settings, system channels)
Channel Management: Create, delete, modify, and list all channel types (text, voice, category, announcement, forum, stage) with full configuration control
Member Management: List up to 1000 members, view details, modify properties (nickname, roles, voice settings, timeout), kick, ban, unban, and list bans
Role Management: Create, delete, modify roles, configure properties (name, color, permissions, position, mentionability), and assign/remove roles from members
Permission Management: Get, set, delete channel permission overwrites, list available permissions, and sync channel permissions with parent categories
Message Management: Send, edit, delete (including bulk deletion up to 100 messages), retrieve history with filters, pin/unpin, reply, and manage reactions
Emoji & Sticker Management: List, create, delete, and modify custom emojis and stickers with role restrictions
Webhook Management: List, create, delete, modify webhooks, and send messages via webhooks with custom avatars and names
Invite Management: List, create (with max uses, expiration, temporary membership), delete, and get invite information
Event Management: List, create (voice, stage, or external), modify, delete scheduled events, view subscribers, and manage event status
Thread Management: List (including archived), create threads and forum posts, modify settings (name, archive status, tags, slowmode), delete, join/leave, and manage thread members
Audit & Moderation: Retrieve audit logs with filters (by user or action type), list audit log types, and manage AutoMod rules (list, view, delete, toggle)
Additional Features:
10 MCP Prompts: Guided workflows for server audits, moderation reports, channel setup, role hierarchy review, permission troubleshooting, welcome messages, announcements, AutoMod configuration, webhook security audits, and member onboarding
Multiple Transport Modes: HTTP with SSE for real-time communication or stdio for desktop clients
Session Management: Support for concurrent MCP connections with comprehensive error handling
Integration Support: Pre-configured for VS Code, Claude Desktop, and Cline
Provides comprehensive Discord server management capabilities including server administration, channel operations, member and role management, message handling, webhooks, invites, scheduled events, threads, emoji/sticker management, and audit logs across 50+ tools.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@discord-mcplist all channels in the general server"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Discord MCP Server
A Model Context Protocol (MCP) server that provides comprehensive tools for managing Discord servers. This server uses HTTP transport with Server-Sent Events (SSE) for real-time communication.
Features
50+ Discord Management Tools across 12 categories
10 MCP Prompts for guided server management workflows
HTTP Transport with StreamableHTTPServerTransport for easy integration
Session Management for concurrent MCP connections
Comprehensive Error Handling with detailed error messages
Graceful Shutdown handling
Prerequisites
Node.js 18+
A Discord Bot Token with appropriate permissions
Discord bot added to your server(s)
Installation
Clone the repository:
git clone https://github.com/scarecr0w12/discord-mcp.git cd discord-mcpInstall dependencies:
npm installCreate a
.envfile from the example:cp .env.example .envConfigure your Discord bot token in
.env:DISCORD_BOT_TOKEN=your_bot_token_here PORT=3000Build the project:
npm run buildStart the server:
npm start
Discord Bot Setup
Your Discord bot requires the following Gateway Intents enabled in the Discord Developer Portal:
GUILDS - Access to guild information
GUILD_MEMBERS - Access to member information (Privileged)
GUILD_MODERATION - Access to moderation events
GUILD_MESSAGES - Access to messages
GUILD_PRESENCES - Access to presence information (Privileged)
MESSAGE_CONTENT - Access to message content (Privileged)
Configuration
Environment Variable | Description | Default |
| Your Discord bot token (required) | - |
| HTTP server port (HTTP mode only) |
|
| Transport mode ( |
|
Usage
The server supports two transport modes:
HTTP Mode (Default)
Start the server in HTTP mode:
HTTP Endpoints
POST /mcp- MCP requestsGET /mcp- SSE stream for server-initiated messagesDELETE /mcp- Session cleanupGET /health- Health check endpoint
VS Code MCP Configuration (HTTP)
Add to your .vscode/mcp.json:
Stdio Mode
For use with Claude Desktop, Cline, or other MCP clients that use stdio transport:
Claude Desktop Configuration
Add to your claude_desktop_config.json:
Cline Configuration
Add to your Cline MCP settings:
Available Tools
Server Management
list_servers- List all Discord servers the bot has access toget_server_info- Get detailed information about a specific servermodify_server- Modify server settings
Channel Management
list_channels- List all channels in a serverget_channel_info- Get detailed channel informationcreate_channel- Create a new channeldelete_channel- Delete a channelmodify_channel- Modify channel settings
Member Management
list_members- List server membersget_member_info- Get member detailsmodify_member- Modify member propertieskick_member- Kick a member from the serverban_member- Ban a memberunban_member- Unban a memberlist_bans- List all bans
Role Management
list_roles- List all rolesget_role_info- Get role detailscreate_role- Create a new roledelete_role- Delete a rolemodify_role- Modify role settingsassign_role- Assign a role to a memberremove_role- Remove a role from a member
Permission Management
get_channel_permissions- Get channel permission overwritesset_channel_permission- Set channel permissionsdelete_channel_permission- Delete permission overwriteslist_permissions- List available permissionssync_channel_permissions- Sync permissions with category
Message Management
send_message- Send a message to a channelget_messages- Retrieve messages from a channeledit_message- Edit a bot messagedelete_message- Delete a messagebulk_delete_messages- Bulk delete messages (up to 100)pin_message/unpin_message- Pin/unpin messagesget_pinned_messages- Get all pinned messagesadd_reaction/remove_reactions- Manage reactions
Emoji & Sticker Management
list_emojis- List server emojiscreate_emoji- Create a custom emojidelete_emoji- Delete an emojimodify_emoji- Modify emoji settingsSticker operations (list, create, delete, modify)
Webhook Management
list_channel_webhooks/list_guild_webhooks- List webhookscreate_webhook- Create a webhookdelete_webhook- Delete a webhookmodify_webhook- Modify webhook settingssend_webhook_message- Send a message via webhook
Invite Management
list_invites- List server invitesget_invite_info- Get invite detailscreate_invite- Create an invitedelete_invite- Delete an invite
Event Management
list_events- List scheduled eventsget_event_info- Get event detailscreate_event- Create a scheduled eventmodify_event- Modify an eventdelete_event- Delete an eventget_event_subscribers- Get event subscribers
Thread Management
list_threads- List threads in a channel or servercreate_thread- Create a new threadcreate_forum_post- Create a forum postmodify_thread- Modify thread settingsdelete_thread- Delete/archive a threadThread join/leave and member management operations
Audit & Moderation
get_audit_logs- Retrieve server audit logslist_audit_log_types- List available audit log action typeslist_automod_rules- List AutoMod rulesget_automod_rule- Get AutoMod rule detailsdelete_automod_rule- Delete an AutoMod ruletoggle_automod_rule- Enable/disable an AutoMod rule
Available Prompts
MCP Prompts provide guided workflows for complex server management tasks. Use these prompts to start structured conversations for common administrative operations.
Prompt | Description |
| Comprehensive security and configuration audit checklist |
| Generate moderation activity summaries from audit logs |
| Step-by-step guidance for setting up new channels |
| Analyze and suggest improvements to role hierarchy |
| Diagnose why a user cannot perform a specific action |
| Generate customized server welcome messages |
| Draft formatted server announcements |
| Guide for configuring Discord AutoMod rules |
| Audit webhooks for security concerns |
| Review and improve new member experience |
Using Prompts
Prompts can be invoked in MCP-compatible clients. Each prompt accepts arguments to customize the workflow:
Development
Attributions
This project is built with the following open-source libraries:
@modelcontextprotocol/sdk - Official MCP TypeScript SDK
discord.js - A powerful JavaScript library for interacting with the Discord API
Express - Fast, unopinionated, minimalist web framework for Node.js
Zod - TypeScript-first schema validation with static type inference
dotenv - Loads environment variables from .env file
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
ISC License - see the LICENSE file for details.
Author
Jacob Bowen - @scarecr0w12