mcp-discord-mod
Provides tools for moderating a Discord server, including kicking, banning, timing out members, managing roles, channels, permissions, and audit logs.
Click on "Deploy 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., "@mcp-discord-mod kick @user123 for spamming"
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.
mcp-discord-mod
A lightweight Model Context Protocol server for Discord server moderation. Built with discord.js v14 and TypeScript.
Focused on what matters: kick, ban, timeout, roles, channels, audit logs, and member management. No bloat.
Setup
1. Create a Discord Bot
Go to Discord Developer Portal
Create a new application → Bot
Under Privileged Gateway Intents, enable:
Server Members Intent
Message Content Intent
Copy the bot token
2. Install
git clone https://github.com/YOUR_USERNAME/mcp-discord-mod.git
cd mcp-discord-mod
npm install
npm run build3. Configure
Set your bot token as an environment variable:
export DISCORD_TOKEN="your_bot_token_here"Or create a .env file:
DISCORD_TOKEN=your_bot_token_here4. Add to your MCP client
Add to your MCP config (e.g. opencode.json, claude_desktop_config.json, etc.):
{
"discord-mod": {
"type": "local",
"command": ["node", "/path/to/mcp-discord-mod/build/index.js"],
"env": {
"DISCORD_TOKEN": "your_bot_token_here"
}
}
}Related MCP server: Discord MCP Server
Tools
Tool | Description |
| Login to Discord (auto-logins if DISCORD_TOKEN is set) |
| Kick a member from a server |
| Ban a member (optionally delete recent messages) |
| Unban a user |
| Timeout (mute) a member for a duration |
| Send a warning DM to a member |
| List all banned users |
| Set or clear a member's nickname |
| List all roles in a server |
| Create a new role |
| Edit role properties |
| Delete a role |
| Assign a role to a member |
| Remove a role from a member |
| Create a channel category |
| Create a text or voice channel |
| Delete a channel |
| Edit channel name, topic, slowmode |
| Set role/user permissions on a channel |
| Remove permission overrides |
| List server members |
| Get detailed member info |
| List all bot servers |
| Get server details and channels |
| View the server audit log |
| Send a direct message to a user |
| Bulk delete messages with filters |
| Delete up to 100 messages by ID |
| Pin a message |
| Unpin a message |
Bot Permissions
Your bot needs these permissions in the server:
Kick Members
Ban Members
Moderate Members (for timeouts)
Manage Roles
Manage Channels
View Audit Log
Send Messages
Read Message History
Manage Messages (for purge)
License
MIT
Available Tools
29 toolsdiscord_mod_assign_roleB
Assigns a role to a member in a Discord server.
Inputs: roleId (required), userId (required), guildId (required).
discord_mod_ban_memberB
Ban a member from a Discord server. Optionally deletes their recent messages.
Inputs: userId (required), guildId (required), reason, deleteMessageSeconds.
discord_mod_bulk_delete_messagesB
Bulk deletes up to 100 messages in a channel. Messages must be less than 14 days old.
Inputs: channelId (required), messageIds (required), reason.
discord_mod_create_categoryB
Creates a new category in a Discord server.
Inputs: name (required), guildId (required), position.
discord_mod_create_channelB
Creates a new text or voice channel in a Discord server.
Inputs: guildId (required), channelName (required), topic, categoryId.
discord_mod_create_roleC
Creates a new role in a Discord server.
Inputs: name (required), guildId (required), color, hoist, +2 more.
discord_mod_delete_channelB
Deletes a Discord channel.
Inputs: channelId (required), reason.
discord_mod_delete_roleB
Deletes a role from a Discord server.
Inputs: roleId (required), guildId (required), reason.
discord_mod_edit_channelA
Edits a Discord channel's name, topic, parent category, position, or slowmode.
Inputs: channelId (required), name, topic, parentId, +2 more.
discord_mod_edit_roleC
Edits an existing role in a Discord server.
Inputs: roleId (required), guildId (required), name, color, +4 more.
discord_mod_get_audit_logB
Fetches the audit log for a server. Shows who did what, when, and why.
Inputs: guildId (required), limit, before, userId, +1 more.
discord_mod_get_memberA
Gets detailed information about a specific member in a Discord server.
Inputs: userId (required), guildId (required).
discord_mod_get_server_infoA
Retrieves detailed information about a Discord server including channels and member count.
Inputs: guildId (required).
discord_mod_kick_memberA
Kick a member from a Discord server. The member can rejoin with an invite.
Inputs: userId (required), guildId (required), reason.
discord_mod_list_bansB
Lists all banned users in a Discord server with their reasons.
Inputs: guildId (required), after, limit.
discord_mod_list_membersA
Lists members in a Discord server with their roles.
Inputs: guildId (required), after, limit.
discord_mod_list_rolesB
Lists all roles in a Discord server with their properties.
Inputs: guildId (required).
discord_mod_list_serversA
Lists all Discord servers the bot is a member of.
Inputs: no named parameters.
discord_mod_pin_messageB
Pins a message in a channel.
Inputs: channelId (required), messageId (required).
discord_mod_purge_messagesB
Purges messages from a channel with filters (by user, content, attachments). Scans and bulk-deletes matching messages.
Inputs: channelId (required), after, limit, before, +3 more.
discord_mod_remove_permissionsA
Removes all permission overrides for a role or user on a channel or category.
Inputs: roleId (required), channelId (required), reason.
discord_mod_remove_roleC
Removes a role from a member in a Discord server.
Inputs: roleId (required), userId (required), guildId (required), reason.
discord_mod_send_dmA
Sends a direct message to a user by their user ID. Automatically creates a DM channel if one doesn't exist.
Inputs: userId (required), message (required).
discord_mod_set_nicknameB
Sets or clears a member's nickname in a server.
Inputs: userId (required), guildId (required), reason, nickname.
discord_mod_set_permissionsC
Sets permission overrides for a role or user on a channel or category.
Inputs: roleId (required), channelId (required), deny, allow, +1 more.
discord_mod_timeout_memberA
Timeout (server mute) a member for a specified duration. Use durationSeconds=0 to clear a timeout.
Inputs: userId (required), guildId (required), durationSeconds (required), reason.
discord_mod_unban_memberB
Unban a user from a Discord server.
Inputs: userId (required), guildId (required), reason.
discord_mod_unpin_messageB
Unpins a message from a channel.
Inputs: channelId (required), messageId (required).
discord_mod_warn_memberA
Warn a member by sending them a DM with the warning reason. Optionally logs to a mod channel.
Inputs: reason (required), userId (required), guildId (required), channelId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Each tool targets a distinct moderation action or resource (e.g., kick vs. ban, role vs. channel, permissions vs. messages), with no overlapping responsibilities. The descriptions clearly differentiate similar tools like purge_messages and bulk_delete_messages.
All tools follow the 'discord_mod_verb_noun' pattern with snake_case, but there is minor inconsistency between 'list_' and 'get_' prefixes (e.g., list_members vs. get_member) and between single verb vs. compound verbs (purge_messages vs. bulk_delete_messages). Overall, the pattern is clear and predictable.
With 29 tools, the set covers a broad range of moderation tasks without being excessive. It is slightly heavy but each tool fills a specific need; no tool feels redundant. The count is appropriate for a comprehensive Discord moderation server.
The set covers essential moderation operations (kick, ban, timeout, warn) and channel/role management. However, notable gaps exist: no tool to edit role permissions globally, no single message deletion tool, and no voice channel member management (e.g., move member). These gaps may cause agent failures in some scenarios.
Related MCP Connectors
- Discortics - Discord BotDeprecatedcom.discortics
Set up and manage your Discord server from MCP: channels, roles, verification, tickets and security.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Official MCP server for subfeed.app — the cloud for agents. 15+ tools for AI agents to register, build, and deploy other agents. Zero human required. Start here: subfeed.app/skill.md
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables 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.1919MIT
- AlicenseBqualityDmaintenanceEnables Discord bot integration through MCP, allowing users to manage servers, channels, roles, members, and messages including moderation actions like bans, timeouts, and bulk deletions through natural language.33MIT
- FlicenseNot gradedqualityDmaintenanceComprehensive Discord server management through MCP, enabling channel, role, permission, message, moderation, and automation tasks via natural language.4-
- FlicenseBqualityDmaintenanceEnables Discord server administration through MCP, providing tools for role management, member moderation, channel operations, and message purging.17-