# @el4cteo/discord-mcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/EL4CTEO/discord-mcp  
**GitHub Stars:** 5  
**npm Downloads (last month):** 435  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/el4cteo-discord-mcp

## Description
MCP server that lets AI agents run a Discord bot: messages, DMs, channels, threads, roles, members, moderation, live events and bulk operations.

## Tools
Capabilities this server exposes over MCP:

- **discord_whoami** — Reports which bot account the token belongs to, which servers it can reach, and the safety settings: destructive actions, @everyone pings and where files may be uploaded from.

Run this first to verify the server is configured correctly, or when a tool behaves unexpectedly.
- **discord_list_guilds** — Lists every server the bot has been invited to, with member counts.

Call this first when you are unsure which server to act on, or when another tool reports that the `guild` argument is ambiguous.
- **discord_get_guild** — Returns an overview of one server: name, owner, member counts, creation date, enabled features, and how many channels and roles it has.

Useful as a first orientation step before doing anything else in an unfamiliar server.
- **discord_list_channels** — Lists every channel in a server in the order Discord shows them, each tagged with its category.

Start here when you need a channel id or want to see how a server is organised. Filter with `type`; set include_threads to also list active threads.
- **discord_create_channel** — Creates a text, voice, category, announcement, stage, forum or media channel.

Nest it with `category` (create the category first if needed). `permissions` sets overwrites in the same request - e.g. a private staff channel: [{target:'@everyone', deny:['ViewChannel']}, {target:'Moderator', allow:['ViewChannel']}]. Without `permissions` a channel inside a category inherits the category's permissions.
- **discord_edit_channel** — Updates a channel's settings; only the fields you pass change.

Rename, set a topic, toggle NSFW, change slowmode or voice user limit, or move it: `category` moves it under a category, `category: null` moves it to the top level.
- **discord_manage_thread** — Creates threads and changes their state.

- create: in a text channel pass `message_id` to branch off a message, or omit it for a standalone thread. In a forum channel this creates a post and `content` is its required first message.
- archive / unarchive / lock / unlock: change an existing thread's state.
- list: active threads in the server, or only under `channel` if given.
- **discord_set_channel_permissions** — Grants or denies permissions for one role or member on a channel.

- Read-only for everyone: target='@everyone', deny=['SendMessages','AddReactions','CreatePublicThreads']
- Private channel: target='@everyone', deny=['ViewChannel'], then allow ViewChannel for the role that should see it

mode='merge' (default) changes only the listed permissions and keeps the rest of the existing overwrite; 'replace' makes allow/deny the whole overwrite; 'reset' removes the overwrite so everything inherits again.

A deny on @everyone applies to the bot too - grant the bot's role what it still needs there.
- **discord_reorder_channels** — Sets the top-to-bottom order of channels in one request.

Pass categories to order the categories, or channels that share one category to order those. Channels left out keep their place; the listed ones fill the slots they occupied, in the order given.

Voice channels always render below text channels in a category - Discord's rule, not changeable here.
- **discord_send_message** — Posts a message to a channel or thread: text, embeds, file uploads, polls and replies, or forwards an existing message (forward, on its own).

@mentions do NOT ping anyone unless allow_mentions is true, so names are safe in text. Long text is split automatically. Returns the created message and its id.
- **discord_send_dm** — Sends a private DM to a user. The user must share a server with the bot and allow DMs from its members.

Accepts a user ID or @mention, or a member name looked up in `guild`. Same content options as discord_send_message.
- **discord_read_messages** — Reads recent messages from a channel or thread, newest first (set oldest_first for reading order).

Fetches up to 500 by paging automatically. Text is clipped to 500 chars per message in compact mode; detail='full' allows 4000 and includes embed fields.

Without the MESSAGE CONTENT intent, content is empty for messages the bot did not send.
- **discord_search_messages** — Searches recent history across channels for text (message content and embed text).

Bots cannot use Discord's search index, so this scans the newest per_channel_limit messages of each channel (and active threads) in parallel. For older history page back with discord_read_messages.
- **discord_edit_message** — Edits a message the bot sent (bots cannot edit other users' messages). Omitted fields stay unchanged; pass embeds: [] to remove all embeds.
- **discord_react** — Adds or removes the bot's reaction on a message, or lists who reacted with an emoji (action='list').

Emoji may be unicode ('✅'), a server emoji by name ('partyparrot' or ':partyparrot:'), 'name:id', or '<:name:id>'.
- **discord_pin_message** — Manages a channel's pins. action='list' returns current pins; 'pin' and 'unpin' need message_id. A channel holds at most 50 pins.
- **discord_manage_poll** — Works on the poll attached to a message. action='results' (default) returns the question, each answer's vote count and whether the poll is finalized. 'voters' lists who chose answer_id, up to limit. 'end' closes a poll early so no more votes count; only polls the bot posted itself can be ended.
- **discord_list_members** — Lists members of a server, or searches them by name.

`query` searches by username/nickname prefix and always works. Listing without a query needs the SERVER MEMBERS intent; without it Discord returns only the bot. Role ids are shown as role names.
- **discord_get_member** — Fetches a member's details: display name, roles, join date, boost status and any active timeout. Accepts a username, nickname, @mention or user id.
- **discord_edit_member** — Changes a member's nickname or voice state (mute, deafen, move, disconnect).

The bot's highest role must sit above the member's highest role, except when renaming itself.
- **discord_manage_member_roles** — Grants or revokes roles for a member - any number in one call, applied in a single request.

The bot's highest role must be ABOVE every role being assigned and above the member's highest role. Managed roles (bot roles, Nitro booster) cannot be assigned manually.
- **discord_list_roles** — Lists every role in a server, highest first. detail='full' adds each role's permissions by name.

Position matters: a bot can only assign, edit or delete roles BELOW its own highest role. Check this listing first when a role operation fails with a permissions error.
- **discord_manage_role** — Manages roles themselves (use discord_manage_member_roles to assign them to people).

- create: needs `name`.
- edit: needs `role`, plus the fields to change.
- delete: needs `role`; destructive, requires DISCORD_ALLOW_DESTRUCTIVE=true.

`permissions` takes names like ['ManageMessages','KickMembers']. A server holds at most 250 roles.
- **discord_reorder_roles** — Sets the vertical order of roles, highest first.

Order is not cosmetic: a role can only moderate, assign or edit roles BELOW it, and hoisted roles appear in the member list in this order.

Listed roles are placed directly below the bot's own highest role (Discord forbids a bot moving anything above itself); roles left out keep their relative order beneath them.
- **discord_moderate_member** — Performs a moderation action on a member.

- kick: removes them; they can rejoin with an invite.
- ban: removes and blocks them; `delete_message_days` also purges their recent messages. An array of members is banned in one request.
- unban: lifts a ban (accepts the banned user's name).
- timeout: mutes them for `duration_minutes` (max 28 days). untimeout clears it.

kick, ban and timeout require DISCORD_ALLOW_DESTRUCTIVE=true; unban and untimeout always work.

The bot's highest role must be ABOVE the target's. Always pass `reason` - it goes in the audit log.
- **discord_list_bans** — Lists users banned from a server, with the reason recorded at ban time. Read-only.
- **discord_get_audit_log** — Reads recent moderation and configuration changes from the audit log - 'who deleted that channel?', 'who banned this user?'. detail='full' includes the old and new values of each change.
- **discord_automod** — Lists, creates, edits and deletes AutoMod rules that block, alert on or time out messages.

- list (default): every rule with its trigger, actions, exemptions and key settings.
- create: needs name and trigger (keyword, spam, keyword_preset or mention_spam). timeout only works with keyword or mention_spam.
- edit: needs rule and the fields to change; the trigger type cannot change.
- delete: needs rule; destructive, requires DISCORD_ALLOW_DESTRUCTIVE=true.

Also destructive, each requiring DISCORD_ALLOW_DESTRUCTIVE=true: disabling a rule (enabled=false), replacing its actions with ones that have no block or timeout, emptying a keyword rule's filter, and exempting @everyone.

`rule` takes an ID or an exact name.
- **discord_create_invite** — Creates an invite link to a channel.

Defaults to a link that expires after 24 hours with unlimited uses, like Discord's own default. Set `max_age_seconds` (0 = never expires) or `max_uses` to change that, or `temporary` to grant membership only until the person disconnects.
- **discord_manage_invites** — Lists the server's invite links and revokes them.

- list (default): every invite with its link, channel, inviter, uses and expiry. max_uses 0 means no limit.
- revoke: needs code, the code or a discord.gg / discord.com/invite link. Destructive: requires DISCORD_ALLOW_DESTRUCTIVE=true.

Revoke works on any invite the bot can manage, so `guild` only matters for list.
- **discord_scheduled_events** — Lists, creates, edits and deletes server scheduled events, and lists who is interested in one.

- list (default): every event with status, times, location or channel, and interested count.
- create: needs name and start_time (in the future), plus location (external; also needs end_time) or channel (voice or stage).
- edit: needs event and the fields to change. Setting status to canceled is destructive and needs DISCORD_ALLOW_DESTRUCTIVE=true.
- users: needs event; paged with limit and after.
- delete: needs event; destructive, requires DISCORD_ALLOW_DESTRUCTIVE=true.

`event` takes an ID or an exact name. Times are ISO 8601, e.g. 2026-11-01T18:00:00Z.
- **discord_manage_emojis** — Lists, adds, renames and deletes custom server emojis.

- list (default): every emoji with its ID and a ready-to-send mention.
- create: needs name (2-32 letters, digits or _) and file ({path} or {url}; PNG, JPG, GIF or WebP, max 256 KiB). roles restricts who can use it.
- rename: needs emoji and name. delete: needs emoji; destructive, requires DISCORD_ALLOW_DESTRUCTIVE=true.

`emoji` takes an ID, '<:name:id>' or the name.
- **discord_wait_for_event** — Blocks until a matching live event arrives, or the timeout expires - a reply in a channel, someone joining, a reaction.

The first call opens a gateway connection (a few seconds); later calls reuse it. Pass after_seq from a previous discord_recent_events result to also catch anything that arrived in between. Keep timeout_seconds modest - the call is held open for its whole duration.
- **discord_recent_events** — Returns events buffered since the gateway connected, without waiting.

The buffer fills only while connected - from the first call to this tool or discord_wait_for_event until an idle period passes. Pass after_seq (the last_seq from the previous call) to get only new events, oldest first, so repeated calls page through everything. For older history use discord_read_messages.
- **discord_batch** — Runs several different Discord tool calls in one request, in parallel within Discord's rate limits.

Each operation is {tool, args} with exactly the arguments that tool takes directly. `defaults` fills arguments an operation leaves out (e.g. {guild: 'my server'}), wherever the tool accepts them. For the same tool over many targets, prefer passing an array to that tool instead.

One failure does not stop the others - each operation reports ok/error - unless stop_on_error is set.

Example: operations: [{"tool":"discord_send_message","args":{"channel":"general","content":"Deploy done"}}, {"tool":"discord_manage_member_roles","args":{"member":"alice","add":["Release"]}}]

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

**Requires environment variables:** `DISCORD_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What @el4cteo/discord-mcp does

@el4cteo/discord-mcp lets an MCP-compatible AI client operate a Discord bot. Its 38 tools cover server information, channels, threads, forums, messages, direct messages, uploads, forwards, polls, members, roles, moderation, AutoMod, scheduled events, emojis, invites, and live events.

The server accepts human-readable names such as `general` or `@everyone` and resolves them to Discord identifiers. It also supports arrays in places where a tool accepts one value, allowing the same operation to target multiple channels, members, or other resources. Use `discord_batch` when a workflow combines different tools. Each operation reports its own result, so one failure does not stop the remaining work.

## How it works

Actions use Discord’s REST API. The live gateway connection is opened lazily for event-related operations and closes after an idle period, rather than remaining connected throughout the server’s lifetime. Name lookups use a TTL cache that is updated by the server’s own changes and incoming gateway events.

The stdio entry point can be launched with `npx` or from a local build. Discord requests use rate-limit buckets, and batched work can run in parallel according to the configured concurrency. Long messages are split at Discord’s message limit while preserving code blocks. Large responses are trimmed to the configured output limit.

## Setup and configuration

Create a Discord application and bot, reset its token, enable Message Content Intent and Server Members Intent, then invite the bot with the `bot` and `applications.commands` scopes. The token is passed through `DISCORD_TOKEN` without a `Bot ` prefix.

Claude Code can register the package directly:

```bash
claude mcp add discord --env DISCORD_TOKEN=your_token_here -- npx -y @el4cteo/discord-mcp
```

A local checkout can be installed and built with `npm install`, then started from `dist/index.js`. Run `discord_whoami` after connecting to verify the bot identity.

`DISCORD_DEFAULT_GUILD` supplies a default server for tools that otherwise require a guild. Safety and runtime behavior can be adjusted with `DISCORD_ALLOW_DESTRUCTIVE`, `DISCORD_ALLOW_MASS_MENTIONS`, `DISCORD_UPLOAD_DIRS`, `DISCORD_PRIVILEGED_INTENTS`, `DISCORD_BATCH_CONCURRENCY`, `DISCORD_REQUEST_TIMEOUT_MS`, `DISCORD_MAX_RESPONSE_CHARS`, `DISCORD_GATEWAY_IDLE_MS`, and `DISCORD_EVENT_BUFFER`.

## Tools and capabilities

- Inspect the bot identity, available guilds, guild details, invites, members, roles, channels, and audit logs.
- Send, read, search, edit, delete, pin, and react to messages; send direct messages and manage polls.
- Create and modify channels, threads, forums, permissions, and ordering.
- Edit members, manage roles, moderate members, review bans, configure AutoMod, and bulk-delete messages.
- Manage scheduled events, emojis, and invites.
- Wait for live events or retrieve recent events.
- Run repeated operations through array arguments or combine different calls with `discord_batch`.

## Limitations and notes

Destructive tools remain hidden unless `DISCORD_ALLOW_DESTRUCTIVE=true`; mixed operations reject only their destructive portions. Mass mentions require `DISCORD_ALLOW_MASS_MENTIONS=true`. File uploads are restricted to configured directories, and sensitive files are refused. URL uploads accept public HTTP(S) hosts while blocking private, loopback, and cloud-metadata addresses.

Exact names or IDs are required for bans, kicks, timeouts, purges, and deletes. The bot’s role must be higher than a target role to assign or moderate it. Bulk deletion works only for messages newer than 14 days. Reading message content and listing all members depend on the corresponding Discord privileged intents. The default configuration keeps destructive actions disabled and allows four parallel operations per batch.

_Full upstream README: https://allmcps.com/mcp/el4cteo-discord-mcp/readme_

