Discord MCP by Quadslab.io

Full-stack Discord server management via AI. 134 tools covering moderation, roles, channels, webhooks, and community features — with fuzzy name resolution and instant permission health checks.

@quadslab.io/discord-mcp

npm version npm downloads License: MIT Node.js Discord GitHub stars

Manage your entire Discord server from Claude Code, Claude Desktop, Cursor, or Windsurf. 134 admin tools across 20 categories — roles, channels, members, messages, moderation, forums, stages, webhooks, events, polls, DMs, and more. Just talk to your AI in plain English.

Built by QuadsLab.io | Discord | npm

If you find this useful, consider giving it a star on GitHub — it helps others discover the project!


Setup in 60 Seconds

One command. No manual config files. No copying IDs.

npx @quadslab.io/discord-mcp init

The interactive wizard walks you through everything:

It will:

  1. Guide you through creating a Discord bot (or use an existing one)
  2. Validate your bot token live
  3. Auto-generate the invite URL with all required permissions
  4. Let you pick which server to manage
  5. Auto-detect your installed MCP clients and write the config for you

Works With Every MCP Client

The wizard auto-detects which clients you have installed:

  Detected MCP clients:

  ● Claude Code      .mcp.json
  ● Claude Desktop   ~/Library/Application Support/Claude/claude_desktop_config.json
  ● Cursor           ~/.cursor/mcp.json
  ○ Windsurf         (not detected)

  ? Which client(s) to configure?
  1. Claude Code (detected)
  2. Claude Desktop (detected)
  3. Cursor (detected)
  4. Windsurf (not found)
  5. All detected (3 clients)
  6. Skip (show config to copy manually)

Select one, multiple, or "All detected" to configure everything at once.

Verify Your Setup

npx @quadslab.io/discord-mcp check
  QuadsLab.io [discord-mcp] — Health Check
  ────────────────────────────────────────────────────

  Token ............ present
  Bot .............. MyBot#1234
  Server ........... My Gaming Server (1,024 members)

  Permissions
  ────────────────────────────────────────────────────

  ✔ Manage Roles .............. yes
  ✔ Manage Channels ........... yes
  ✔ Kick Members .............. yes
  ✔ Ban Members ............... yes
  ...

  ██████████████████████████████  100% (24/24)

  ✔ All 24 permissions granted

  ┌──────────────────────────────────────────────────┐
  │ MCP server is ready!                             │
  │ Run discord-mcp or use via .mcp.json in Claude   │
  └──────────────────────────────────────────────────┘

What Can You Do With It?

Once connected to Claude Code, just ask in natural language:

  • "Send a welcome message in #general"
  • "Lock down the #announcements channel"
  • "Who reacted to the last message in #server-guide?"
  • "Create a role called VIP with a gold color and assign it to @john"
  • "Show me the audit log for the last 24 hours"
  • "Set up an automod rule to block links in #general"
  • "Create a forum post in #feedback titled Bug Reports"
  • "Timeout @spammer for 1 hour for spamming"
  • "List all webhooks and delete the unused ones"
  • "Schedule a community event for Friday at 8pm in the Stage channel"
  • "Bulk delete the last 50 messages in #bot-testing"
  • "Give everyone with the Member role access to #private-channel"
  • "Create a poll in #general asking which game to play Friday"
  • "DM all moderators about the upcoming server event"
  • "Set the bot's status to 'Watching over 500 members'"
  • "Show me who's in the Gaming voice channel right now"

Claude automatically resolves channel, role, and member names using fuzzy matching — no need to look up IDs.


Features

  • 134 tools across 20 categories — comprehensive Discord server administration without leaving the terminal
  • Interactive setup wizardnpx init walks you through bot creation, token validation, and config in under a minute
  • Health check & permission auditnpx check verifies your token, server access, and all 24 required permissions with a visual progress bar
  • Fuzzy name resolution — type "bot testing", "bot-testing", or "bottesting" and it resolves correctly; no need to look up IDs
  • Zero-config name matching — channels, roles, and members are all resolved by name, ID, or mention format automatically
  • Pre-cached server data — all channels, roles, and members are cached on startup for instant lookups without extra API calls
  • Structured JSON responses — every tool returns consistent, pretty-printed JSON
  • Audit log integration — all modifying operations accept a reason parameter that appears in the Discord audit log
  • Helpful error recovery — failed lookups return suggestions (e.g., "Did you mean: #general, #bot-testing?")
  • MCP resources — three read-only resources for server overview data

Alternative Setup (Manual)

If you prefer to configure things manually instead of using the wizard:

1. Create a Discord bot

Follow the Bot Setup Guide to create a bot in the Discord Developer Portal and get your token.

2. Add to your MCP config

Add the following discord entry to your client's config file:

{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": ["-y", "@quadslab.io/discord-mcp"],
      "env": {
        "DISCORD_TOKEN": "your-bot-token",
        "DISCORD_GUILD_ID": "your-server-id"
      }
    }
  }
}
ClientConfig file location
Claude Code.mcp.json in your project root
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Cursor~/.cursor/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json

3. Connect

  • Claude Code: Type /mcp to connect
  • Claude Desktop: Restart the app
  • Cursor / Windsurf: Reload the window
git clone https://github.com/HardHeadHackerHead/discord-mcp.git
cd discord-mcp
npm install
cp .env.example .env
# Edit .env with your DISCORD_TOKEN and DISCORD_GUILD_ID
npm run build
npm start

CLI Reference

$ npx @quadslab.io/discord-mcp [command]
CommandDescription
initInteractive setup wizard — creates bot, validates token, auto-configures Claude Code / Desktop / Cursor / Windsurf
checkHealth check — verifies token, server access, and permission audit
startStart the MCP server (default when no command given)
helpShow help message
versionShow version

When launched via .mcp.json (stdin is not a TTY), the server starts automatically — no subcommand needed.


Tools Overview

Summary

CategoryToolsDescription
Guild2Server information and metadata
Roles11Role creation, editing, permissions, and assignment
Channels20Channel creation, editing, permissions, and organization
Members15Member management, moderation, and bulk operations
Messages14Send, edit, delete, pin, and react to messages
Reactions1Detailed reaction data with reactor info
Server Admin16Server settings, invites, bans, audit log, and integrations
Threads10Thread creation, archiving, locking, and deletion
Forums5Forum posts and tag management
Emojis & Stickers7Custom emoji and sticker management
Webhooks4Webhook creation, deletion, and messaging
Scheduled Events5Event creation, editing, and deletion
Stage Instances3Stage channel management
Auto-Moderation4Automod rule creation, editing, and deletion
Polls3Create polls, get results, end polls early
Direct Messages2Send DMs and embed DMs to server members
Bot Presence2Set bot status/activity, get bot info
Server Templates4List, create, delete, sync server templates
Application Commands4Manage slash commands (CRUD)
Onboarding2Get and edit server onboarding configuration
Total134

Guild (2 tools)

ToolDescription
list_guildsList all servers the bot is a member of
get_guild_infoDetailed server info — member count, channels, roles, features, boost tier

Roles (11 tools)

ToolDescription
list_rolesList all roles sorted by position with colors and member counts
create_roleCreate a new role with name, color, hoist, and mentionable options
delete_roleDelete a role (with managed role protection)
modify_roleChange a role's name, color, hoist, mentionable, or position
get_role_permissionsView all permissions granted to a role
modify_role_permissionsGrant or revoke specific permissions on a role
set_role_iconSet a Unicode emoji or image as the role icon (requires boost level 2+)
assign_roleAdd a role to a member
remove_roleRemove a role from a member
get_role_membersList all members who have a specific role
clone_roleDuplicate a role with all its permissions and settings

Channels (20 tools)

ToolDescription
list_channelsList all channels organized by category
create_text_channelCreate a new text channel, optionally in a category
create_voice_channelCreate a new voice channel with bitrate and user limit
create_categoryCreate a new channel category
create_forum_channelCreate a new forum channel with optional tags and default settings
delete_channelDelete any channel type
modify_channelChange name, topic, category, NSFW, position, user limit
set_channel_permissionsSet permission overwrites for a role or user on a channel
view_channel_permissionsView all permission overwrites on a channel
lock_channelDeny SendMessages for @everyone (quick lock)
unlock_channelRemove SendMessages deny for @everyone
set_slowmodeSet rate limit (0–21600 seconds) on a text channel
clone_channelDuplicate a channel with all permissions and settings
reorder_channelsReorder channels by specifying new positions
set_voice_regionSet the RTC region for a voice channel
follow_announcement_channelFollow an announcement channel to cross-post into another channel
create_stage_channelCreate a new stage channel
get_channel_invitesList all invites for a specific channel
set_channel_topicSet or clear a channel's topic/description
get_voice_membersList all members currently in a voice or stage channel

Members (15 tools)

ToolDescription
list_membersList members with optional role and search filters
get_memberDetailed member info — roles, join date, account age, permissions
kick_memberKick a member from the server
ban_memberBan a member with optional message deletion (0–7 days)
unban_memberRemove a ban by username or user ID
timeout_memberApply a timeout (10m, 1h, 1d, 1w) or remove one
prune_membersRemove inactive members (supports dry run and role filtering)
bulk_assign_roleAssign a role to multiple members at once
bulk_remove_roleRemove a role from multiple members at once
set_nicknameChange a member's nickname or reset it
move_to_voiceMove a member to a different voice channel
disconnect_from_voiceDisconnect a member from their voice channel
get_member_permissionsGet a member's effective permissions in a specific channel
search_membersSearch members by username, nickname, or role with advanced filters
bulk_timeout_membersApply a timeout to multiple members at once

Messages (14 tools)

ToolDescription
get_messagesFetch recent messages from a text or voice channel
get_messageFetch a single message by ID with full details
send_messageSend a text message, optionally as a reply
send_embedSend a rich embed with title, fields, images, and footer
edit_messageEdit a message previously sent by the bot
delete_messageDelete a single message by ID
bulk_delete_messagesDelete 2–100 messages at once (< 14 days old), optionally filtered by user
crosspost_messagePublish a message in an announcement channel to all following channels
pin_messagePin a message
unpin_messageUnpin a message
list_pinned_messagesGet all pinned messages in a channel
add_reactionAdd a reaction from the bot to a message
remove_reactionRemove the bot's reaction from a message
search_messagesSearch messages in a channel by content, author, or date range

Reactions (1 tool)

ToolDescription
get_reactionsGet all reactions on a message with full reactor details — account creation date, server join date, roles, avatar, boost status. Optionally filter by emoji.

Server Admin (16 tools)

ToolDescription
edit_serverModify server name, description, verification level, notification defaults
list_invitesList all active invite links with usage stats and expiration
create_inviteGenerate a new invite with configurable max age, uses, and temporary flag
delete_inviteRevoke an invite by code
get_audit_logFetch audit log entries, optionally filtered by action type or user
list_bansView all banned users with reasons
get_welcome_screenGet the server welcome screen configuration
set_welcome_screenConfigure the welcome screen with description and featured channels
get_widgetGet the server widget settings
set_widgetConfigure the server widget (enable/disable, set channel)
get_vanity_urlGet the server vanity URL (requires VANITY_URL feature)
list_integrationsList all integrations (bots, apps) connected to the server
delete_integrationRemove an integration from the server
get_server_previewGet the server's public preview information
set_server_iconSet or remove the server icon from a URL
set_server_bannerSet or remove the server banner image (requires boost level 2+)

Threads (10 tools)

ToolDescription
list_threadsList active threads, optionally filtered to a channel
create_threadStart a thread from a message or as a standalone public thread
archive_threadArchive a thread
unarchive_threadUnarchive a thread
delete_threadDelete a thread
lock_threadLock a thread (prevent new messages without archiving)
unlock_threadUnlock a thread
get_thread_membersList all members of a thread
add_thread_memberAdd a member to a thread
remove_thread_memberRemove a member from a thread

Forums (5 tools)

ToolDescription
create_forum_postCreate a new post (thread) in a forum channel with optional tags
list_forum_tagsList all available tags on a forum channel
create_forum_tagAdd a new tag to a forum channel (max 20 per channel)
edit_forum_tagEdit an existing forum tag's name, emoji, or moderated status
delete_forum_tagRemove a tag from a forum channel

Emojis & Stickers (7 tools)

ToolDescription
list_emojisList all custom emojis with names, IDs, animated status, and URLs
create_emojiUpload a new custom emoji from a URL
delete_emojiRemove a custom emoji by name or ID
rename_emojiRename a custom emoji
list_stickersList all custom stickers with descriptions and format info
create_stickerUpload a new custom sticker from a URL
delete_stickerRemove a custom sticker by name or ID

Webhooks (4 tools)

ToolDescription
list_webhooksList all webhooks, optionally filtered to a channel
create_webhookCreate a webhook on a channel with name and optional avatar
delete_webhookDelete a webhook by ID
send_webhook_messageSend a message via webhook with optional name/avatar override

Scheduled Events (5 tools)

ToolDescription
list_eventsList all scheduled events with times, status, type, and attendee count
create_eventCreate a voice, stage, or external event with start/end times
edit_eventModify an event's name, description, times, or status
delete_eventDelete a scheduled event
get_event_usersList users who have expressed interest in an event

Stage Instances (3 tools)

ToolDescription
list_stage_instancesList all active stage instances with topic and channel info
start_stageStart a new stage instance on a stage channel with a topic
end_stageEnd an active stage instance

Auto-Moderation (4 tools)

ToolDescription
list_automod_rulesList all automod rules with triggers, actions, and exemptions
create_automod_ruleCreate a rule — keyword filter, spam detection, keyword presets, or mention spam
edit_automod_ruleModify a rule's keywords, actions, exemptions, or enabled state
delete_automod_ruleDelete an automod rule

Polls (3 tools)

ToolDescription
create_pollCreate a poll in a channel with multiple choice options and duration
get_poll_resultsGet the current results and vote counts for a poll
end_pollEnd a poll early and finalize the results

Direct Messages (2 tools)

ToolDescription
send_dmSend a direct message to a server member
send_dm_embedSend a rich embed as a direct message to a server member

Bot Presence (2 tools)

ToolDescription
set_bot_presenceSet the bot's status and activity (playing, watching, listening, etc.)
get_bot_infoGet the bot's current user info, status, and connection details

Server Templates (4 tools)

ToolDescription
list_templatesList all templates for the server
create_templateCreate a new server template from the current server configuration
delete_templateDelete a server template by code
sync_templateSync a server template with the current server state

Application Commands (4 tools)

ToolDescription
list_commandsList all registered application (slash) commands
create_commandRegister a new slash command with name, description, and options
edit_commandModify an existing slash command
delete_commandRemove a registered slash command

Onboarding (2 tools)

ToolDescription
get_onboardingGet the server's onboarding configuration and prompts
edit_onboardingEdit the server onboarding settings, prompts, and default channels

Fuzzy Matching

All tools that accept channel, role, or member names use smart fuzzy matching. You never need to look up IDs manually. The resolution order is:

  1. Exact ID match — pass a Discord snowflake ID directly
  2. Exact name match — case-insensitive
  3. Normalized match — ignores hyphens, spaces, and underscores ("bot testing" matches "bot-testing")
  4. Substring match — partial name matches at 0.7+ similarity threshold

Mention formats are also handled automatically:

  • Channels: #name or <#id>
  • Roles: @name or <@&id>
  • Members: @name or <@id> or <@!id>

If no match is found, the error message includes suggestions of similar names to help you correct the input.


MCP Resources

Three read-only resources are exposed for quick server overview data:

URIDescription
discord://server/summaryText overview of the server (channels, roles, members)
discord://server/channelsJSON list of all channels organized by category
discord://server/rolesJSON list of all roles sorted by position

Required Permissions

The Discord bot needs the following permissions for full functionality:

CategoryPermissions
GeneralManage Server, Manage Roles, Manage Channels, View Audit Log, Manage Webhooks, Manage Events, Manage Emojis and Stickers
TextSend Messages, Manage Messages, Read Message History, Add Reactions, Use External Emojis
VoiceMove Members, Disconnect Members
ModerationKick Members, Ban Members, Moderate Members, Manage Auto Moderation

The init wizard auto-generates an invite URL with all of these. If you set up manually, see the Bot Setup Guide for which checkboxes to select.

The bot can only act within its role hierarchy — it cannot manage roles positioned higher than its own highest role.

Gateway Intents

These privileged intents must be enabled in the Discord Developer Portal:

  • Server Members Intent — required for member management
  • Message Content Intent — required for reading message content

Troubleshooting

Run the health check to diagnose issues:

npx @quadslab.io/discord-mcp check

"DISCORD_TOKEN is not set"

The MCP server can't find your bot token. Either:

  • Run npx @quadslab.io/discord-mcp init to set up automatically
  • Or check that your .mcp.json / MCP client config has the DISCORD_TOKEN in the env block

"Request with opcode 8 was rate limited"

Discord rate-limited the gateway connection (usually from member caching on large servers). The server retries automatically — if you're still seeing this, wait 30 seconds and try again. This is a Discord-side limit, not a bug.

"Role @everyone not found"

Fixed in v1.2.2+. Update to the latest version:

npx @quadslab.io/discord-mcp@latest init

"Missing Access" or "Missing Permissions"

The bot's role doesn't have the required permissions. Either:

  • Re-invite the bot using the URL from npx @quadslab.io/discord-mcp init (it includes all permissions)
  • Or go to Server Settings > Roles and grant the missing permissions to the bot's role
  • Run npx @quadslab.io/discord-mcp check to see exactly which permissions are missing

Bot can't manage a specific role

Discord enforces role hierarchy — the bot can only manage roles below its own highest role. Move the bot's role higher in Server Settings > Roles.

Bot can't read messages

Enable Message Content Intent in the Discord Developer Portal > Bot tab.

"Used disallowed intents"

Enable Server Members Intent and Message Content Intent in the Discord Developer Portal > Bot tab. Both are required.

Tools work but are slow

The first tool call after startup may be slow due to caching. Subsequent calls use the cached data and should be instant. If all calls are slow, check your network connection to Discord.

.mcp.json was created in the wrong directory

If you ran init from Desktop or Downloads, update to v1.2.3+ which auto-detects this and writes to ~/.claude.json (global config) instead. Or move the .mcp.json file to your project root.


Architecture

@quadslab.io/discord-mcp/
├── package.json
├── tsconfig.json
├── README.md
├── LICENSE
├── .env.example
├── docs/
│   ├── discord-mcp-server.md    # Full tool reference documentation
│   └── bot-setup-guide.md       # Step-by-step bot creation guide
└── src/
    ├── cli.ts                   # CLI — init wizard, health check, server start
    ├── mcp-server.ts            # MCP server entry — validates env, exports main()
    ├── index.ts                 # Tool/resource registration and MCP request routing
    ├── discord-client.ts        # Discord.js client — intents, caching, rate limit retry
    └── tools/
        ├── index.ts             # Tool registry — routes calls to category handlers
        ├── utils.ts             # Fuzzy matching for channels, roles, members
        ├── guild.ts             # Server info (2)
        ├── roles.ts             # Role management (11)
        ├── channels.ts          # Channel management (20)
        ├── members.ts           # Member management (15)
        ├── messages.ts          # Messaging (14)
        ├── reactions.ts         # Reactions (1)
        ├── server.ts            # Server admin (16)
        ├── threads.ts           # Thread management (10)
        ├── forums.ts            # Forum channels (5)
        ├── emojis.ts            # Emoji & stickers (7)
        ├── webhooks.ts          # Webhooks (4)
        ├── events.ts            # Scheduled events (5)
        ├── stage.ts             # Stage instances (3)
        ├── automod.ts           # Auto-moderation (4)
        ├── polls.ts             # Polls (3)
        ├── dms.ts               # Direct messages (2)
        ├── presence.ts          # Bot presence (2)
        ├── templates.ts         # Server templates (4)
        ├── commands.ts          # Application commands (4)
        └── onboarding.ts        # Onboarding (2)

Community


Contributing

Contributions are welcome! See CONTRIBUTING.md for development setup, code style, and guidelines.


License

MIT License. Copyright (c) 2026 QuadsLab.io.

See LICENSE for the full text.

Related Servers