@quadslab.io/discord-mcp
Manage your entire Discord server from Claude Code, Claude Co-Work, Claude Desktop, Cursor, or Windsurf. 139 admin tools across 20 categories — roles, channels, members, messages, threads, 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:
- Guide you through creating a Discord bot (or use an existing one)
- Validate your bot token live
- Auto-generate the invite URL with all required permissions
- Let you pick which server to manage
- 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 or Claude Co-Work, 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"
- "Show me the last 20 messages in the 'API Discussion' thread"
- "Send a reply in the 'bug-report' thread saying we're looking into it"
- "List all archived threads 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
- 139 tools across 20 categories — comprehensive Discord server administration without leaving the terminal
- Interactive setup wizard —
npx initwalks you through bot creation, token validation, and config in under a minute - Health check & permission audit —
npx checkverifies 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 - Thread-aware messaging — all message tools (send, edit, pin, react, etc.) work in threads and channels alike — no separate tools needed
- 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
reasonparameter 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"
}
}
}
}
3. Connect
- Claude Code: Type
/mcpto 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]
When launched via .mcp.json (stdin is not a TTY), the server starts automatically — no subcommand needed.
Updating
Your MCP client config doesn't pin a version, so updating is simple:
npx @quadslab.io/discord-mcp update
This checks npm for the latest version, clears the npx cache, and your next MCP client launch will use the new version automatically. Your bot token, server, and client configuration are all preserved — nothing needs to be reconfigured.
To verify after updating:
npx @quadslab.io/discord-mcp version
npx @quadslab.io/discord-mcp check
Tools Overview
Summary
Guild (2 tools)
Roles (11 tools)
Channels (20 tools)
Members (15 tools)
Messages (14 tools)
All message tools work in both regular channels and threads — just pass the thread name or ID as the channel.
Reactions (1 tool)
Server Admin (16 tools)
Threads (15 tools)
Forums (5 tools)
Emojis & Stickers (7 tools)
Webhooks (4 tools)
Scheduled Events (5 tools)
Stage Instances (3 tools)
Auto-Moderation (4 tools)
Polls (3 tools)
Direct Messages (2 tools)
Bot Presence (2 tools)
Server Templates (4 tools)
Application Commands (4 tools)
Onboarding (2 tools)
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:
- Exact ID match — pass a Discord snowflake ID directly
- Exact name match — case-insensitive
- Normalized match — ignores hyphens, spaces, and underscores (
"bot testing"matches"bot-testing") - Substring match — partial name matches at 0.7+ similarity threshold
- Thread fallback — if no channel matches, active threads are searched using the same steps above
- Archived thread fallback — if an ID is provided and not found in active threads, the thread is fetched directly (covers archived threads)
Mention formats are also handled automatically:
- Channels:
#nameor<#id> - Roles:
@nameor<@&id> - Members:
@nameor<@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:
Required Permissions
The Discord bot needs the following permissions for full functionality:
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 initto set up automatically - Or check that your
.mcp.json/ MCP client config has theDISCORD_TOKENin theenvblock
"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 checkto 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 (15)
├── 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
- Discord Server — get help, share feedback, see what others are building
- GitHub Issues — bug reports and feature requests
- GitHub Discussions — questions, ideas, and show & tell
- QuadsLab.io — more tools from the team
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.