discord-mcp

io.github.PaSympaPublished by GitHub account PaSympav2.3.0Updated Nov 7, 2026

Run your Discord server from Claude, Cursor or VS Code: messages, moderation, roles, forums, events

Overview

AI-generated overview

Connects an assistant to your own Discord bot so it can read, post, moderate and administer your servers in plain language.

What you can do
  • Discover servers, channels and guild details, and find channels by name
  • Read, search, send, reply to, edit, delete, pin, react to and forward messages, plus threads and embeds
  • Create, edit, move, clone and delete channels, and manage permission overwrites and audits
  • List, search, kick, ban, timeout and prune members; create, edit and assign roles
  • Manage forum posts and tags, webhooks, scheduled events, invites, DMs, audit log, screening and server stats
When to use it
Useful when you want an assistant to summarize busy channels, file feedback into forum posts, run moderation cleanups, schedule and announce community events, or audit permissions without clicking through Discord yourself.
Requirements
Runs locally via npx (Node.js 22 or later) or the Docker image. Needs a Discord bot token in DISCORD_TOKEN, a bot created in the Discord Developer Portal and invited to your server with the requested permissions. Optional DISCORD_MCP_TOOLSETS, DISCORD_ALLOWED_GUILDS, DISCORD_MESSAGE_CONTENT and DISCORD_GUILD_MEMBERS tune exposure and intents.
Before you install
The bot token is a full credential for the bot; keep it out of committed config files and prefer a client secret prompt. The server can delete messages and channels, kick, ban, timeout and prune members, change roles and permissions, and send DMs and webhooks, so restrict toolsets and guilds and review dry-run previews before applying mass actions. Loading all 100 tools costs roughly 32k tokens of context.

Installation

In SourceWeft

  1. Open discord-mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

discord-mcp connects Claude, Cursor, VS Code and any other MCP client to your Discord server through your own bot. Ask in plain language: your assistant reads channels, answers, moderates, and manages roles, channels, forums and events, with 100 tools behind it.

See it in action

[Claude Code previews a cleanup of four spam messages in #general with a dry run, then deletes them, on a demo Discord server]

Calls made live with Claude Code on a demo server; the panel summarizes their results. The Discord window shows real captures, except that the spot of each new message or post stays blank until it appears.

What you can ask

You want toAsk your assistant
Catch up on a busy channel"Summarize what's going on in #support and post a recap in #mod-log."
Turn feedback into a tracker"Open a bug-tracker forum and file the two open bugs from the recap."
Stop a spam raid safely"A spam raid just hit #general. Preview the cleanup, then remove it."
Run community events"Schedule a community call next Friday at 8 PM and announce it in #announcements."
Audit permissions"Show me every permission overwrite in the server."
Welcome people"Create an invite to #welcome that expires in 24 hours."
Automate notifications"Create a webhook on #deploys and post the release notes as an embed."

Quick start

  1. Create a bot. In the Discord Developer Portal, create an application, open Bot, then Reset Token and copy it. On the same page, enable Server Members Intent and Message Content Intent.

  2. Invite it to your server. Replace YOUR_CLIENT_ID with the Application ID from General Information, then open the link:

    https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&scope=bot&permissions=2270827458424055

    It requests the permissions the tools use. Remove the ones you do not need in the authorization screen.

  3. Add it to your client. Use a button above, or paste this into your client's MCP config:

    json
    {  "mcpServers": {    "discord": {      "command": "npx",      "args": ["-y", "@pasympa/discord-mcp"],      "env": {        "DISCORD_TOKEN": "YOUR_BOT_TOKEN"      }    }  }}

npx downloads and runs the server (Node.js 22 or later); nothing else to install. Per-client instructions are under Clients.

Expose only what you need

The full set of 100 tools costs about 32k tokens of context when a client loads them all. Most assistants need a fraction of it: set DISCORD_MCP_TOOLSETS to the toolsets you want.

ProfileDISCORD_MCP_TOOLSETSToolsContext
Everything (default)unset100~32k tokens
Chat assistantdiscovery,messages25~9k tokens
Community managerdiscovery,messages,forums,scheduled_events42~15k tokens
Moderatordiscovery,members,moderation,roles,permissions31~9k tokens
Read-only monitordiscovery,stats,moderation6~2k tokens
json
"env": {  "DISCORD_TOKEN": "YOUR_BOT_TOKEN",  "DISCORD_MCP_TOOLSETS": "discovery,messages"}

Context sizes are measured on the tools/list response (bytes divided by 4). Toolsets: discovery, messages, channels, permissions, members (includes kick, ban and timeout), roles, moderation (the audit log), screening, stats, forums, webhooks, scheduled_events, invites, dm. A toolset brings its whole module, destructive tools included; an unknown name stops the server at startup instead of exposing everything.

Safety

  • Your bot, your permissions. The server can only do what the bot's Discord permissions allow.
  • Preview before mass actions. discord_bulk_delete_messages, discord_bulk_ban, discord_prune_members and discord_delete_channel run as a dry run by default and report what would happen. Pass dry_run: false to apply.
  • Stay in your servers. DISCORD_ALLOWED_GUILDS restricts every call to the guilds you list, whether the target is addressed by guild, channel, thread, webhook or invite.
  • Clear annotations. Every tool declares readOnlyHint, and every write tool declares destructiveHint, so clients can approve reads automatically and ask before destructive calls.
  • Keep the token out of files. Prefer your client's secret prompt (the VS Code button asks for the token) over a config file you might commit.

Clients

Claude Desktop

Add the config from Quick start to claude_desktop_config.json, then restart Claude Desktop.

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Claude Code
bash
claude mcp add discord -e DISCORD_TOKEN=YOUR_BOT_TOKEN -- npx -y @pasympa/discord-mcp
Cursor

Use the Install in Cursor button, then replace YOUR_BOT_TOKEN. Or add the config from Quick start to ~/.cursor/mcp.json. See the Cursor MCP docs.

VS Code / GitHub Copilot

Use the Install in VS Code button: VS Code asks for the token and stores it as a secret. Or add this to .vscode/mcp.json:

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 the VS Code MCP docs.

Windsurf

Add the config from Quick start to ~/.codeium/windsurf/mcp_config.json, then refresh the MCP servers list.

Codex CLI
bash
codex mcp add discord --env DISCORD_TOKEN=YOUR_BOT_TOKEN -- npx -y @pasympa/discord-mcp
Cline

Open MCP Servers, then Configure, and add the config from Quick start to cline_mcp_settings.json.

Docker
json
{  "mcpServers": {    "discord": {      "command": "docker",      "args": ["run", "--rm", "-i", "-e", "DISCORD_TOKEN", "pasympa/discord-mcp:latest"],      "env": {        "DISCORD_TOKEN": "YOUR_BOT_TOKEN"      }    }  }}
From source
bash
git clone https://github.com/PaSympa/discord-mcpcd discord-mcpnpm install && npm run build
json
{  "mcpServers": {    "discord": {      "command": "node",      "args": ["/absolute/path/to/discord-mcp/dist/index.js"],      "env": {        "DISCORD_TOKEN": "YOUR_BOT_TOKEN"      }    }  }}

You can also put DISCORD_TOKEN=YOUR_BOT_TOKEN in a .env file at the project root; the server loads it on start.

Configuration

VariableDefaultDescription
DISCORD_TOKENnoneRequired. Bot token.
DISCORD_MCP_TOOLSETSallComma-separated toolsets to expose (see Expose only what you need). Unset, empty or all exposes every tool.
DISCORD_ALLOWED_GUILDSallComma-separated guild IDs the server may act on. Calls that target any other guild are rejected, whether addressed by guild ID, channel ID, thread ID, webhook or invite code.
DISCORD_MESSAGE_CONTENTtrueSet to false to stop requesting the Message Content privileged intent at connect time.
DISCORD_GUILD_MEMBERStrueSet to false to stop requesting the Server Members privileged intent at connect time.

The intent flags only change what the bot requests when it connects. Requesting a privileged intent that is not enabled in the Developer Portal closes the connection with code 4014; set the flag to false to connect anyway. What the tools can read is governed by the portal toggles: every message is fetched over the REST API, which Discord gates on the portal setting alone. With Message Content off in the portal, message bodies come back empty (content, embeds, attachments), except the bot's own messages, DMs and messages that mention the bot; with Server Members off, member listing fails.

Tools

100 tools in 14 toolsets. Each one documents its permissions, side effects and return shape in its description.

Discovery (4 tools)
ToolDescription
discord_list_guildsList all servers the bot is connected to
discord_get_guild_infoGet detailed guild info (name, members, channels, roles, boosts)
discord_list_channelsList all channels in a guild grouped by category
discord_find_channel_by_nameFind a channel by name (partial match)
Messages (21 tools)
ToolDescription
discord_read_messagesRead messages, paging back through history
discord_send_messageSend a plain text message
discord_reply_messageReply to a specific message
discord_edit_messageEdit a message sent by the bot
discord_delete_messageDelete a specific message
discord_add_reactionAdd a reaction emoji to a message
discord_remove_reactionsRemove reactions (all, by emoji, or by user)
discord_get_reactionsList users who reacted with a specific emoji
discord_create_threadCreate a thread from a message or standalone
discord_list_channel_threadsList a text channel's threads, paged
discord_bulk_delete_messagesDelete multiple messages at once (2-100)
discord_send_embedSend a rich embed with all options
discord_edit_embedEdit an embed previously sent by the bot
discord_send_multiple_embedsSend up to 10 embeds in a single message
discord_pin_messagePin or unpin a message
discord_get_message_attachmentsList a message's attachments with download urls
discord_fetch_pinned_messagesList a channel's pinned messages, paged
discord_search_messagesSearch messages by keyword (last 100)
discord_search_guild_messagesSearch across every channel using Discord's search index
discord_crosspost_messagePublish a message to announcement channel followers
discord_forward_messageForward a message to another channel
Channels (8 tools)
ToolDescription
discord_create_channelCreate a text, voice channel or category
discord_delete_channelDelete a channel
discord_edit_channelEdit name, topic, slowmode, NSFW flag
discord_move_channelMove a channel into/out of a category
discord_clone_channelClone a channel with its permissions
discord_set_channel_positionSet display position within a category
discord_follow_announcement_channelFollow an announcement channel
discord_lock_channel_permissionsSync permissions with parent category
Channel permissions (6 tools)
ToolDescription
discord_get_channel_permissionsList all permission overwrites on a channel
discord_set_role_permissionAllow/deny permissions for a role on a channel
discord_set_member_permissionAllow/deny permissions for a member on a channel
discord_reset_channel_permissionsRemove all overwrites (reset to inherited)
discord_copy_permissionsCopy overwrites from one channel to another
discord_audit_permissionsFull permission audit for all channels
Members (11 tools)
ToolDescription
discord_list_membersList guild members with their roles
discord_get_member_infoDetailed member info (roles, permissions, join date)
discord_search_membersSearch members by username or nickname
discord_set_nicknameSet or clear a member's nickname
discord_kick_memberKick a member
discord_ban_memberBan a member (optionally delete recent messages)
discord_unban_memberUnban a user
discord_bulk_banBan multiple users at once (raid mitigation)
discord_list_bansList all banned users
discord_timeout_memberTimeout a member (0 to remove)
discord_prune_membersRemove inactive members (with dry run)
Roles (9 tools)
ToolDescription
discord_list_rolesList all roles with permissions and member count
discord_create_roleCreate a new role
discord_edit_roleEdit a role (name, color, permissions, hoist, mentionable)
discord_delete_roleDelete a role
discord_add_roleAssign a role to a member
discord_remove_roleRemove a role from a member
discord_get_role_membersList all members with a specific role
discord_set_role_positionChange a role's position in the hierarchy
discord_set_role_iconSet a custom icon or unicode emoji on a role
Forums (10 tools)
ToolDescription
discord_get_forum_channelsList all forum channels in a guild
discord_create_forum_channelCreate a new forum channel
discord_create_forum_postCreate a post/thread in a forum
discord_get_forum_postGet a post's details and messages
discord_list_forum_threadsList threads (active + archived)
discord_reply_to_forumReply to a forum post
discord_delete_forum_postDelete a forum thread
discord_get_forum_tagsGet available tags
discord_set_forum_tagsSet/update tags on a forum
discord_update_forum_postUpdate title, archived, locked, tags
Webhooks (8 tools)
ToolDescription
discord_create_webhookCreate a webhook on a channel
discord_send_webhook_messageSend via webhook (custom username/avatar, embeds)
discord_edit_webhookEdit a webhook's name, avatar, or channel
discord_delete_webhookDelete a webhook
discord_list_webhooksList webhooks for a channel or guild
discord_edit_webhook_messageEdit a message sent by a webhook
discord_delete_webhook_messageDelete a message sent by a webhook
discord_fetch_webhook_messageFetch a specific webhook message
Scheduled events (7 tools)
ToolDescription
discord_list_scheduled_eventsList all scheduled events in a guild
discord_get_scheduled_eventGet detailed info about a scheduled event
discord_create_scheduled_eventCreate a voice, stage, or external event
discord_edit_scheduled_eventEdit an existing scheduled event
discord_delete_scheduled_eventDelete a scheduled event
discord_get_event_subscribersGet users who marked "Interested"
discord_create_event_inviteCreate an invite linked to an event
Direct messages (7 tools)
ToolDescription
discord_send_dmSend a direct message to a user by their user ID
discord_send_dm_embedSend an embed in a DM to a user
discord_read_dmsRead message history from a DM conversation
discord_reply_dmReply to a specific DM message
discord_edit_dmEdit a previously sent DM (text)
discord_edit_dm_embedEdit a previously sent DM embed
discord_delete_dmDelete a DM message
Invites (5 tools)
ToolDescription
discord_list_invitesList all active invites in a guild
discord_list_channel_invitesList invites for a specific channel
discord_get_inviteGet details about an invite by its code
discord_create_inviteCreate an invite link for a channel
discord_delete_inviteRevoke an invite
Moderation, screening and stats (4 tools)
ToolDescription
discord_get_audit_logFetch the guild audit log
discord_get_membership_screeningGet the membership screening form
discord_update_membership_screeningUpdate screening rules for new members
discord_get_server_statsServer stats: members, channels, roles, boost level

Troubleshooting

  • Every call fails with close code 4014. The bot requests a privileged intent that is off in the Developer Portal. Enable Server Members and Message Content there, or set DISCORD_GUILD_MEMBERS=false / DISCORD_MESSAGE_CONTENT=false.
  • Messages come back with empty text. Message Content is off in the portal. Enable it; the flag alone does not change what the REST API returns.
  • A channel reads as empty. The bot lacks Read Message History there: Discord returns an empty list rather than an error.
  • Missing Access or Missing Permissions. The bot cannot see the channel, or the target role or member sits above the bot's highest role. Check overwrites with discord_get_channel_permissions.
  • Finding IDs. Enable Developer Mode in Discord (Settings, Advanced), then right-click a server, channel or user and choose Copy ID.

Contributing

Contributions are welcome. CONTRIBUTING.md covers the module layout, the tool definition quality bar and the release flow. Report vulnerabilities as described in SECURITY.md.

License

MIT, see LICENSE. discord-mcp is an independent open-source project, not affiliated with or endorsed by Discord Inc.

VS Code and VS Code Insiders icons: Codicons © Microsoft Corporation, licensed under CC BY 4.0.

Source: README.md at commit 717592d

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

2
  1. v2.3.0LatestNov 7, 2026
  2. v2.2.0Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts