discord-mcp
discord-mcp is a comprehensive Discord management server with 90+ tools that lets you control virtually every aspect of your Discord servers through natural language via MCP-compatible clients (Claude Desktop, Claude Code, Cursor, VS Code Copilot).
Server Discovery & Navigation
List all connected guilds, get detailed server info, list/find channels by name
Message Management
Read, send, reply to, edit, delete, search, pin, forward, and crosspost messages
Add/remove reactions, bulk delete (2–100 messages), create threads, send rich embeds
Channel Management
Create, edit, delete, clone, move, and reposition text/voice/category channels
Follow announcement channels, sync permissions with parent category
Permission Management
View, set, reset, and copy per-role/per-member channel permission overwrites
Run full permission audits across all channels
Member Management
List, search, get info on members; set nicknames; kick, ban, unban, bulk-ban, timeout, and prune members
Role Management
List, create, edit, delete roles; assign/remove roles; reorder hierarchy; set custom icons/emoji
Forum Management
Create and manage forum channels, posts/threads, and tags; reply to, archive, or lock posts
Webhook Management
Create, edit, delete, and list webhooks; send/edit/delete webhook messages with custom username, avatar, and embeds
Scheduled Events
List, create, edit, and delete events (voice, stage, external); get subscribers; create event invites
Invite Management
List, create, look up, and delete guild/channel invites
Moderation & Admin
Fetch audit logs (with action filtering), manage membership screening forms, retrieve server statistics (member counts, boost level, etc.)
Provides comprehensive management of Discord servers, including tools for messaging, channel and role configuration, member moderation, forum interactions, and webhook management.
Discord MCP Server
A lightweight, multi-guild Discord MCP server with 95+ tools
Manage your entire Discord server from Claude Desktop, Claude Code, Cursor, VS Code Copilot, or any MCP-compatible client. Messages, channels, roles, permissions, moderation, forums, webhooks — all through natural language.
Why this one?
95+ tools — messages, channels, roles, permissions, moderation, forums, webhooks, scheduled events, invites, DMs, embeds, and more
Multi-guild — works across multiple servers, no
GUILD_IDlock-inLightweight — TypeScript + Node.js, ~70kB package, ~73MB Docker image (vs 400MB+ for Java alternatives)
Modular — clean architecture, easy to extend with new tools
Two install methods — npm or Docker, your choice
Related MCP server: discord-mcp
Quick Start
Add this to your MCP client config and replace YOUR_TOKEN_HERE with your bot token:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@pasympa/discord-mcp"],
"env": {
"DISCORD_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}No install needed — npx handles everything.
Don't have a bot yet? See Creating Your Discord Bot.
Configuration
Add the config above to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving.
claude mcp add discord -e DISCORD_TOKEN=YOUR_TOKEN_HERE -- npx -y @pasympa/discord-mcpAdd the config above to ~/.cursor/mcp.json. See Cursor MCP docs for details.
Add to your .vscode/mcp.json:
{
"inputs": [
{
"type": "promptString",
"id": "discord-token",
"description": "Discord Bot Token",
"password": true
}
],
"servers": {
"discord": {
"command": "npx",
"args": ["-y", "@pasympa/discord-mcp"],
"env": {
"DISCORD_TOKEN": "${input:discord-token}"
}
}
}
}See VS Code MCP docs for details.
{
"mcpServers": {
"discord": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"DISCORD_TOKEN=YOUR_TOKEN_HERE",
"pasympa/discord-mcp:latest"
]
}
}
}git clone https://github.com/PaSympa/discord-mcp
cd discord-mcp
npm install && npm run build{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/discord-mcp/dist/index.js"],
"env": {
"DISCORD_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}Instead of passing the token in the MCP config, create a .env file at the project root:
DISCORD_TOKEN=YOUR_TOKEN_HEREThe server loads .env automatically via dotenv.
Environment variables
Variable | Default | Description |
| — | Required. Bot token. |
|
| Set to |
|
| Set to |
|
| Comma-separated list of toolsets to expose, to keep the tool list small. Unset or |
| all | Comma-separated guild IDs the server may act on. When set, tool calls targeting any other guild are rejected — whether addressed by guild ID, channel ID, thread ID, webhook, or invite code. |
These flags only control which gateway intents the server requests when identifying. Requesting a privileged intent that is not enabled in the Developer Portal makes the connection fail at the first tool call (close code 4014) — set the flag to false to connect anyway.
Data access is governed by the portal toggles, not by these flags: this server reads everything over the REST API, which Discord gates on the portal setting alone. So with the portal toggles on, setting these flags to false loses nothing. With a portal toggle off, the corresponding data is restricted regardless of the flags: message bodies come back empty (content, embeds, attachments — except the bot's own messages, DMs, and messages that mention the bot) and member listing fails — enable the toggle in the portal to restore it.
Toolsets (DISCORD_MCP_TOOLSETS): discovery, messages, channels, permissions, members, roles, moderation, screening, stats, forums, webhooks, scheduled_events, invites, dm. Example — DISCORD_MCP_TOOLSETS=discovery,messages,members exposes only the discovery, message, and member tools. Note: a toolset ships its whole module, including its destructive tools (messages includes bulk delete; members includes kick/ban) — use DISCORD_ALLOWED_GUILDS and the dry-run defaults to bound them. Only the listed toolsets' tools are advertised and callable. Unknown names make the server fail at startup instead of silently exposing everything (an empty value counts as unset and exposes all).
Creating Your Discord Bot
New Application > give it a name
Bot tab > Reset Token > copy the token
Enable Privileged Gateway Intents (this server requests both by default, but new Discord apps have the portal toggles OFF):
Server Members Intent
Message Content Intent
Important: if the bot requests a privileged intent that is not enabled here, Discord closes the connection with code
4014and every tool call fails. Enable both, or stop requesting the ones you don't need via the environment variables above.OAuth2 > URL Generator:
Scopes:
botPermissions:
Send Messages,Read Message History,Manage Channels,Manage Roles,Kick Members,Ban Members,Moderate Members,View Audit Log,Manage Messages,Manage Threads,Add Reactions,Manage Guild,Manage Webhooks,Manage Events,Create Events,Create Instant Invite,Manage Nicknames,Pin Messages,Embed Links,Create Public Threads,Send Messages in Threads
Copy the generated URL and invite the bot to your server
Available Tools (97)
Discovery & Navigation (4 tools)
Tool | Description |
| List all servers the bot is connected to |
| Get detailed guild info (name, members, channels, roles, boosts) |
| List all channels in a guild grouped by category |
| Find a channel by name (partial match) |
Messages (18 tools)
Tool | Description |
| Read the last N messages from a text channel |
| Send a plain text message |
| Reply to a specific message |
| Edit a message sent by the bot |
| Delete a specific message |
| Add a reaction emoji to a message |
| Remove reactions (all, by emoji, or by user) |
| List users who reacted with a specific emoji |
| Create a thread from a message or standalone |
| Delete multiple messages at once (2-100) |
| Send a rich embed with all options |
| Edit an embed previously sent by the bot |
| Send up to 10 embeds in a single message |
| Pin or unpin a message |
| List all pinned messages in a channel |
| Search messages by keyword (last 100) |
| Publish a message to announcement channel followers |
| Forward a message to another channel |
Channels (8 tools)
Tool | Description |
| Create a text, voice channel or category |
| Delete a channel |
| Edit name, topic, slowmode, NSFW flag |
| Move a channel into/out of a category |
| Clone a channel with its permissions |
| Set display position within a category |
| Follow an announcement channel |
| Sync permissions with parent category |
Channel Permissions (6 tools)
Tool | Description |
| List all permission overwrites on a channel |
| Allow/deny permissions for a role on a channel |
| Allow/deny permissions for a member on a channel |
| Remove all overwrites (reset to inherited) |
| Copy overwrites from one channel to another |
| Full permission audit for all channels |
Members (11 tools)
Tool | Description |
| List guild members with their roles |
| Detailed member info (roles, permissions, join date) |
| Search members by username or nickname |
| Set or clear a member's nickname |
| Kick a member |
| Ban a member (optionally delete recent messages) |
| Unban a user |
| Ban multiple users at once (raid mitigation) |
| List all banned users |
| Timeout a member (0 to remove) |
| Remove inactive members (with dry run) |
Roles (9 tools)
Tool | Description |
| List all roles with permissions and member count |
| Create a new role |
| Edit a role (name, color, permissions, hoist, mentionable) |
| Delete a role |
| Assign a role to a member |
| Remove a role from a member |
| List all members with a specific role |
| Change a role's position in the hierarchy |
| Set a custom icon or unicode emoji on a role |
Forums (10 tools)
Tool | Description |
| List all forum channels in a guild |
| Create a new forum channel |
| Create a post/thread in a forum |
| Get a post's details and messages |
| List threads (active + archived) |
| Reply to a forum post |
| Delete a forum thread |
| Get available tags |
| Set/update tags on a forum |
| Update title, archived, locked, tags |
Webhooks (8 tools)
Tool | Description |
| Create a webhook on a channel |
| Send via webhook (custom username/avatar, embeds) |
| Edit a webhook's name, avatar, or channel |
| Delete a webhook |
| List webhooks for a channel or guild |
| Edit a message sent by a webhook |
| Delete a message sent by a webhook |
| Fetch a specific webhook message |
Scheduled Events (7 tools)
Tool | Description |
| List all scheduled events in a guild |
| Get detailed info about a scheduled event |
| Create a voice, stage, or external event |
| Edit an existing scheduled event |
| Delete a scheduled event |
| Get users who marked "Interested" |
| Create an invite linked to an event |
Direct Messages (7 tools)
Tool | Description |
| Send a direct message to a user by their user ID |
| Send an embed in a DM to a user |
| Read message history from a DM conversation |
| Reply to a specific DM message |
| Edit a previously sent DM (text) |
| Edit a previously sent DM embed |
| Delete a DM message |
Invites (5 tools)
Tool | Description |
| List all active invites in a guild |
| List invites for a specific channel |
| Get details about an invite by its code |
| Create an invite link for a channel |
| Revoke an invite |
Moderation & Screening (3 tools)
Tool | Description |
| Fetch the guild audit log |
| Get the membership screening form |
| Update screening rules for new members |
Stats (1 tool)
Tool | Description |
| Server stats: members, channels, roles, boost level |
Usage Examples
"List all servers the bot is in"
"Read the last 10 messages in #general"
"Send 'Hello everyone!' to the announcements channel"
"Create a forum channel called 'feedback' with tags Bug, Feature, Question"
"Show the full permission audit for the server"
"Create a webhook on #notifications and send a test message"
"Ban user 112233445566778899 and delete their messages from the last 3 days"
"Create an event called 'Game Night' for next Friday at 8pm"
"List all upcoming events in the server"
"Create a permanent invite for #general"
"List all active invites and delete expired ones"
"Send a DM to user 112233445566778899 saying 'Your build passed!'"
"Search for members named 'john'"
"List all banned users in the server"
"Show all pinned messages in #general"
"Forward that message to #announcements"Finding Discord IDs
Enable Developer Mode in Discord:
Settings > Advanced > Developer Mode
Then right-click on a server, channel, or user > Copy ID.
Project Structure
discord-mcp/
├── src/
│ ├── index.ts ← Entry point (MCP server + transport)
│ ├── client.ts ← Discord client + shared helpers
│ ├── constants.ts ← Shared constants (limits, defaults)
│ ├── embeds.ts ← Shared embed schema + builder
│ └── tools/
│ ├── index.ts ← Tool registry (toolset gating, dispatch)
│ ├── define.ts ← defineTool/defineModule + shared zod fields
│ ├── types.ts ← Shared TypeScript interfaces
│ ├── discovery.ts ← Guild/channel discovery
│ ├── messages.ts ← Message CRUD, reactions, threads, embeds
│ ├── channels.ts ← Channel management
│ ├── permissions.ts ← Permission overwrites
│ ├── members.ts ← Member management
│ ├── roles.ts ← Role CRUD and assignment
│ ├── moderation.ts ← Audit log
│ ├── screening.ts ← Membership screening
│ ├── stats.ts ← Server statistics
│ ├── forums.ts ← Forum channels, posts, tags
│ ├── webhooks.ts ← Webhook management
│ ├── scheduledEvents.ts ← Scheduled events
│ ├── invites.ts ← Invite management
│ └── dm.ts ← Direct messages
├── test/ ← node:test suite (schemas, gating, allow-list)
├── scripts/ ← sync-version.js (npm version hook)
├── .github/workflows/ ← CI/CD (build check + auto release)
├── Dockerfile
├── .dockerignore
├── .env.example
├── package.json
├── tsconfig.json
├── CHANGELOG.md
├── CONTRIBUTING.md
├── SECURITY.md
└── README.mdAdding a new tool
Create a new file in
src/tools/(e.g.events.ts)Declare each tool with
defineTool({ name, description, annotations, schema, handle })and exportdefineModule([...])as the defaultImport it and add it to
allToolsetsinsrc/tools/index.ts(the key is itsDISCORD_MCP_TOOLSETSname)
Security
Never commit your Discord token to Git
Use environment variables or a
.envfile (not versioned)Give the bot only the permissions it needs
Restrict the server to specific servers with
DISCORD_ALLOWED_GUILDSIrreversible mass actions (
bulk_ban,prune_members,bulk_delete_messages,delete_channel) default to adry_runpreview — passdry_run:falseto apply
Contributing
Contributions are welcome!
Fork the repository
Create a feature branch (
git checkout -b feature/my-feature)Follow the modular structure — see Adding a new tool
Commit your changes and open a pull request
License
MIT — see LICENSE for details.
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/PaSympa/discord-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server