TheeDiscordMCP
TheeDiscordMCP lets you fully manage an allowlisted Discord server through the official REST API, with multiple safety modes, dry-run planning, and an idempotent blueprint system.
Guild & Settings: Read/modify guild properties (name, description, verification level, locale) and manage onboarding, welcome screen, membership screening.
Channel Management: Create, update, delete, reorder text/voice/stage/forum/media/category channels; set permission overwrites.
Role Management: Create, update, delete, reorder roles; bulk assign/remove roles from members.
Member Moderation: List/search members; modify properties; timeout, kick, ban, unban (destructive actions require exact confirmation).
Messages: List, send, edit, delete, pin/unpin messages; bulk-delete messages.
Automod & Emojis: Manage AutoMod rules; list/create/modify/delete guild emojis.
Webhooks & Invites: Full webhook lifecycle (create, execute, etc.) with secret redaction; manage invites.
Voice: Inspect, move, disconnect, mute/deafen members in voice channels.
Bot Profile: Read/update operator bot’s username, avatar, banner, and application metadata.
Blueprint System: Export a guild snapshot; plan changes via a JSON blueprint (non‑destructive dry‑run); apply blueprints idempotently without deleting unmanaged resources.
Safety: Three modes –
read-only(default),safe-write(creates/updates),full(all operations); destructive actions require opt‑in and exact confirmation strings.Audit & Health: Read audit logs; validate bot token and list accepted permission names.
Raw API: Tightly scoped HTTP escape hatch for Discord endpoints not covered by named tools.
Rate Limiting & State: Automatic rate‑limit handling; local state tracking for idempotent ops.
Provides tools for inspecting and managing an allowlisted Discord server, covering guild settings, roles, channels, messages, members, moderation actions, AutoMod, onboarding, emojis, and audit logs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TheeDiscordMCP Export the server snapshot to review current setup"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Thee Discord MCP
A safety-gated Discord administration MCP server built on Discord's official REST API. It combines broad guild management, dry-run planning, local resource tracking, audit reasons, and explicit safeguards around high-impact actions without turning every related operation into a separate tool.
What it manages
Guild settings, roles, role order, and member role assignment
Categories, text/announcement/voice/stage/forum/media channels, ordering, and permission overwrites
Forum tags, posting guidelines, sorting, and layout
Messages: list, send, edit, delete, pin, unpin, and bulk delete
Message inspection, full JSON payloads, announcement crossposts, current paginated pins, and complete reaction cleanup
Members: list/search, timeout, kick, ban, and unban
Guild previews, role member counts, prune previews and guarded execution, bulk bans, integrations, incident actions, vanity URLs, and voice regions
Reactions, invites, scheduled events, and forum/thread membership
Public, private, and joined-private thread archives; threads created from messages; join/leave and member inspection
Webhook lifecycle and execution with token/URL redaction
Voice member inspection, moves, disconnects, server mute, and server deaf
Stage instances, soundboard sounds, polls, and indexed message search
Guild stickers with validated multipart uploads
Guild templates, widgets, and guild or global application commands
Application emojis and linked-role metadata schemas
Optional one-to-one DMs restricted to an explicit user allowlist and disabled by default
Membership Screening rule reads and guarded updates
AutoMod rules, onboarding, welcome screen, emojis, and audit-log reads
Idempotent JSON blueprints with a dry-run planner, snapshot-bound approvals, and restart-aware execution journals
Bot and application profile management, including avatar and banner data URIs
A tightly scoped raw REST escape hatch for new Discord endpoints and guild-owned resources
There are 49 MCP tools exposing 168 schema-declared operations. The operation count treats every top-level action choice as one operation and every single-purpose tool as one operation. Related work stays together: for example, one discord_guild_operations tool contains preview, role-count, prune, integration, vanity URL, bulk-ban, voice-region, and incident actions instead of publishing eleven separate executables. The smoke test calculates and locks both inventory totals so documentation drift fails validation.
Every guild call is limited to IDs in DISCORD_ALLOWED_GUILD_IDS. Direct messages have a separate DISCORD_ALLOWED_USER_IDS boundary, are empty by default, and verify the one-to-one DM recipient before every read or write. The raw escape hatch remains guild-scoped; it canonicalizes paths before authorization, verifies indirect guild/channel IDs in request bodies, and never becomes a general Discord request proxy.
discord_capabilities reports or searches the grouped operation families without contacting Discord, so a client can discover a narrow capability without loading a separate tool for every endpoint. Three static MCP resources expose the capability index, safety model, and public-release checklist at discord://capabilities, discord://safety, and discord://public-release. The committed machine-readable capability inventory is generated from the real MCP handshake and records each tool's actions, schema size, schema digest, annotations, and resource count; CI fails if it drifts. Empty 204 No Content responses are normalized to { "ok": true }; webhook credentials and uploaded data URIs are redacted from previews and tool results.
Related MCP server: discord-bot-mcp
Coverage at a glance
Surface | Grouped capabilities |
Guild operations | Preview, settings, roles and counts, bans and bulk bans, prune preview/run, integrations, incidents, regions, vanity URL, audit log |
Channels and threads | All guild channel types, ordering, overwrites, announcement follows, typing, voice status, public/private archives, membership |
Messages | History, lookup, search, structured send/edit, crosspost, current pins, bulk delete, reactions, polls |
Community configuration | AutoMod, Membership Screening, onboarding, welcome screen, scheduled events, invites, widgets |
Voice and expressions | Voice-member control, Stage instances, soundboard, guild/application emojis, stickers |
Applications and integrations | Guild/global commands, linked-role metadata, webhooks, templates, bot and application profiles |
Controlled outreach | Allowlisted one-to-one DM open/read/send/edit/delete; disabled until recipient IDs are configured |
Repeatable operations | Snapshots, dry-run plans, idempotent blueprints, scoped raw guild REST |
Safety modes
Mode | Reads | Ordinary create/update | Privileged writes | Destructive writes |
| yes | no | no | no |
| yes | yes | no | no |
| yes | yes | one-time dry-run confirmation | destructive opt-in and one-time dry-run confirmation |
The default is read-only. Permission overwrites, role permission changes, guild security settings, and blueprints containing those fields are privileged writes: they require full mode and a payload-bound confirmation returned by the matching dry-run, but not the separate destructive opt-in. Confirmations are held only in process memory, expire after DISCORD_CONFIRMATION_TTL_SECONDS (five minutes by default), are consumed before the Discord request begins, and become invalid after a server restart. Blueprint approval also binds to the exact planned actions and a stable live-guild precondition snapshot, so drift requires a new dry-run. Blueprint application never deletes unmanaged resources.
1. Create the Discord operator
Create a dedicated application in the Discord Developer Portal, add a bot, and invite it only to the server you want to manage. Never use a personal/user token.
For the full tool set, the bot may need:
View Channels, Read Message History, Send Messages, Add Reactions, Manage Messages, Manage Threads
Manage Channels, Manage Roles
Moderate Members, Kick Members, Ban Members
Move Members, Mute Members, Deafen Members
Manage Guild, View Audit Log, Create Events, Manage Events
Pin Messages and Set Voice Channel Status for the corresponding features
Speak, Use Soundboard, and Use External Sounds for soundboard playback
Create Instant Invite, Manage Webhooks, Create Guild Expressions, and Manage Guild Expressions only if you use related operations
Indexed guild-message search additionally requires the privileged Message Content intent in the Discord Developer Portal. Without it, Discord returns Missing Access; other read tools continue to work.
Administrator is convenient but not required or recommended. Discord role hierarchy still applies: the operator can manage only roles and members below its highest role.
2. Install and configure
Requires Node.js 20.19 or newer and pnpm.
git clone https://github.com/TheETR/Thee-Discord-MCP.git
cd Thee-Discord-MCP
pnpm install
Copy-Item .env.example .envOpen .env locally and set:
DISCORD_BOT_TOKEN=your_dedicated_bot_token
DISCORD_ALLOWED_GUILD_IDS=123456789012345678
DISCORD_ALLOWED_USER_IDS=
DISCORD_MODE=read-only
DISCORD_CONFIRMATION_TTL_SECONDS=300
DISCORD_REQUEST_TIMEOUT_MS=15000
DISCORD_REQUEST_RETRIES=3Leave DISCORD_ALLOWED_USER_IDS empty unless the bot should communicate with specific users. Add only comma-separated Discord user IDs whose one-to-one DM access you intend to permit. Group DMs and arbitrary recipients are rejected.
Do not paste the token into messages, issue reports, or committed files. To copy a Discord server ID, enable Developer Mode in Discord, right-click the server, and choose Copy Server ID.
Build and verify:
pnpm check3. Connect an MCP client
Add the server to your MCP client configuration. An editable example is included as mcp.config.example.toml:
[mcp_servers.thee-discord]
command = "node"
args = ["C:/path/to/Thee-Discord-MCP/dist/index.js"]
cwd = "C:/path/to/Thee-Discord-MCP"
startup_timeout_sec = 20
tool_timeout_sec = 120Restart the client and export a snapshot before making changes. Review the channels, roles, forums, and permission overwrites while the server is still in read-only mode.
For a public bot release, call discord_health with action: "release_readiness" and an allowlisted guildId. It verifies the current token/application identity, public-install setting, legal URLs, install scopes, command registration, visible Message Content flags, guild membership, and the bot's role permissions. It intentionally reports member-flow acceptance and Server Profile traits as manual checks. The result applies only to the application authenticated by the active token; it cannot inspect a separate product bot.
Once the snapshot looks right, set DISCORD_MODE=safe-write, restart the MCP server, and apply ordinary changes. Keep destructive mode disabled until a specific deletion or moderation action is needed.
Blueprint workflow
examples/elalem.blueprint.json provides an English ELALEM support and community layout with restrained category styling, a welcome message, two forum templates, tags, staff privacy, and practical channel names.
See docs/ELALEM.md for the live-server handoff, current user-facing channel copy, and the remaining boundaries that require Discord's UI or another bot runtime.
See docs/API_COVERAGE.md for the full capability map, safety model, and deliberate boundaries.
Recommended flow:
discord_export_snapshotAdjust the blueprint to preserve intentional existing resources.
discord_plan_blueprintordiscord_apply_blueprintwithdryRun: true.Review every planned action.
Switch to
safe-writeand rundiscord_apply_blueprintwithdryRun: false.Export another snapshot and verify the result.
Blueprint channel mentions use {{channel:key}}; they are resolved to real clickable Discord mentions when a message is sent.
The blueprint deliberately performs no deletion. Existing channels or roles with different names are left alone unless their tracked key points to them. Review duplicate or obsolete resources separately before removing anything.
Actual blueprint runs persist a versioned journal before the first Discord write and around every planned action. The journal records precondition, plan, and blueprint digests; per-action pending/running/completed/failed state; returned resource IDs; recovery ancestry; and a final applied-plan digest. Version-1 state files migrate to version 2 on their next save. A retry of the same interrupted blueprint is linked as a recovery attempt, while deterministic message nonces plus a recent-message lookup reduce duplicate guide posts after an uncertain interruption. Discord has no multi-resource transaction or rollback, so inspect failed journals and rerun the same blueprint after correcting the cause.
Destructive operations
To permit a specific destructive action temporarily:
DISCORD_MODE=full
DISCORD_ENABLE_DESTRUCTIVE=trueRun the exact operation with dryRun: true, review the plan, then copy its expectedConfirmation into confirm before it expires. The token is single-use—even a failed downstream Discord request requires a fresh dry-run—and is bound to an operation-specific base such as DELETE CHANNEL <id>. High-fan-out operations such as bulk bans and pruning also include a digest derived from the exact target set, so a confirmation cannot authorize a different batch. Irreversible announcement crossposts and linked-role metadata replacement use the same full-mode gate. Return to safe-write or read-only afterward.
The raw REST tool treats every non-GET request as destructive. Its one-time confirmation includes a SHA-256-derived digest of the exact request body, so a confirmation for one payload cannot authorize another. Absolute URLs, fragments, control characters, encoded path separators, dot segments, duplicate slashes, cross-guild body references, and unverified channel references are rejected before the request is sent.
Discord platform boundaries
The server uses a bot token only. It does not automate user-only endpoints, self-bots, account sessions, or unsupported client APIs. For example, Discord's Server Profile Traits field is visible in the desktop client but its profile endpoint rejects bot tokens with Bots cannot use this endpoint; that field must currently be changed by a signed-in server administrator in Discord.
See Discord API Coverage for named surfaces and deliberate omissions, Security Review and Roadmap for threat boundaries and remaining hardening work, and ELALEM Server Handoff for the live server layout and runtime boundaries.
Development
pnpm typecheck
pnpm test
pnpm buildThe server uses stdio, so stdout is reserved for MCP protocol traffic; operational messages go to stderr. Discord rate limits, transient timeouts, and retryable server failures are handled by @discordjs/rest. Each network attempt is bounded by DISCORD_REQUEST_TIMEOUT_MS (15 seconds by default), and DISCORD_REQUEST_RETRIES controls the bounded retry count (three by default).
License
MIT
Available Tools
27 toolsdiscord_apply_blueprintA
Idempotently create/update roles, categories, channels, forum tags, permissions, messages, pins, and guild settings from one blueprint. It never deletes unmanaged resources.
Inputs: guildId (required), blueprint (required), dryRun, reason.
discord_audit_logB
Read Discord audit log entries for the allowed guild.
Inputs: guildId (required), limit, before, userId, +1 more.
discord_automodC
List, create, modify, or delete Discord AutoMod rules.
Inputs: action (required), guildId (required), body, dryRun, +3 more.
discord_current_applicationC
Read or modify the current Discord application profile and installation metadata.
Inputs: action (required), body, dryRun, reason.
discord_current_bot_profileA
Read or modify this operator bot's username, avatar, and banner. Image fields accept Discord data URIs.
Inputs: action (required), body, dryRun, reason.
discord_delete_channelA
Delete a channel. Requires full mode, destructive enablement, and an exact confirmation string.
Inputs: confirm (required), guildId (required), channelId (required), dryRun, +1 more.
discord_delete_roleC
Delete a role with an exact confirmation string.
Inputs: roleId (required), confirm (required), guildId (required), dryRun, +1 more.
discord_emojiC
List, create, modify, or delete guild emojis. Create accepts a Discord data URI in body.image.
Inputs: action (required), guildId (required), body, dryRun, +3 more.
discord_export_snapshotA
Export guild metadata, roles, channels, AutoMod, onboarding, and welcome screen for planning or backup.
Inputs: guildId (required), memberLimit, includeMembers.
discord_get_guildA
Read a guild and its approximate member/presence counts.
Inputs: guildId (required).
discord_healthA
Validate the Discord bot token and show the MCP safety configuration without exposing secrets.
Inputs: no named parameters.
discord_known_permissionsA
List permission names accepted by blueprint and overwrite tools.
Inputs: no named parameters.
discord_list_messagesC
Read recent messages from a channel in an allowed guild.
Inputs: guildId (required), channelId (required), after, limit, +1 more.
discord_member_rolesB
Add and remove multiple roles from a guild member.
Inputs: userId (required), guildId (required), dryRun, reason, +2 more.
discord_membersB
Get one member or list members. Bulk listing may require the Guild Members privileged intent.
Inputs: guildId (required), after, limit, userId.
discord_messageC
Send, edit, delete, pin, or unpin a message in an allowed guild channel.
Inputs: action (required), guildId (required), channelId (required), dryRun, +4 more.
discord_moderate_memberC
Modify, timeout, kick, ban, or unban a guild member. Removal actions require exact confirmation.
Inputs: action (required), userId (required), guildId (required), body, +4 more.
discord_modify_guildB
Modify guild-level settings such as name, description, locale, verification, rules channel, and safety channels.
Inputs: body (required), guildId (required), dryRun, reason.
discord_onboardingC
Get or replace guild onboarding configuration. Discord enforces Community onboarding constraints.
Inputs: action (required), guildId (required), body, dryRun, +1 more.
discord_plan_blueprintA
Compare a version-1 server blueprint with the live guild and return a non-destructive action plan.
Inputs: guildId (required), blueprint (required).
discord_raw_guild_requestA
Advanced escape hatch for Discord REST endpoints not covered above. Routes are restricted to the allowed guild, verified channels, webhooks, invites, stage instances, and this bot's guild commands.
Inputs: route (required), method (required), guildId (required), body, +3 more.
discord_reorder_channelsB
Bulk reorder channels and optionally move them between categories.
Inputs: guildId (required), positions (required), dryRun, reason.
discord_reorder_rolesB
Bulk reorder roles below the bot's highest role.
Inputs: guildId (required), positions (required), dryRun, reason.
discord_set_channel_permissionC
Create or replace a role/member permission overwrite on a channel.
Inputs: guildId (required), targetId (required), channelId (required), targetType (required), +4 more.
discord_upsert_channelC
Create or modify any guild channel, category, forum, media, stage, voice, or announcement channel using Discord API fields.
Inputs: body (required), guildId (required), dryRun, reason, +1 more.
discord_upsert_roleC
Create or modify a guild role. Role hierarchy still limits what the bot can manage.
Inputs: body (required), guildId (required), dryRun, reason, +1 more.
discord_welcome_screenC
Get or modify the Community welcome screen.
Inputs: action (required), guildId (required), body, dryRun, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
Each tool targets a distinct Discord resource or action, such as channels, roles, members, messages, emojis, or guild settings. Even the blueprint-related tools have non-overlapping responsibilities: export reads, plan compares, and apply writes. No two tools appear to do the same thing.
All tools share the 'discord_' prefix, and most follow a clear verb_noun pattern (e.g., discord_get_guild, discord_upsert_channel, discord_apply_blueprint). Some tools use plain nouns (discord_members, discord_emoji, discord_message), which is a minor deviation but still predictable and readable.
With 27 tools, this server exceeds the typical range for a well-scoped MCP (3-15) and falls into the 'too many' category. While each tool covers a different area, the high number may burden agents with too many choices, though the broad Discord API scope partially justifies it.
The tool set covers comprehensive CRUD and lifecycle operations for guilds, channels, roles, members, messages, emojis, onboarding, welcome screen, AutoMod, and bot settings. It also includes a blueprint system and a raw API escape hatch, so there are no obvious gaps in Discord server management.
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
The official MCP Server for the Mux API
Curated, trust-first index of vetted MCP servers — scored tiers, monthly re-verified. Read-only.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA local MCP server that reads Discord servers and channels and optionally sends messages with explicit allowlists, read-only by default.42 npmMIT
- AlicenseBqualityCmaintenanceA local MCP server that lets AI clients control a Discord bot via Discord's REST API, offering messaging, administration, and moderation tools. Includes safety features such as guild scoping, allowlists, and opt-in write permissions.20MIT
- AlicenseAqualityDmaintenanceAn MCP server that lets AI assistants provision Discord servers (guilds, categories, channels, roles, permissions) from declarative blueprints via the Discord REST API, with idempotent diff-based planning and no deletions.15MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to read, post to, and moderate a Discord server through the Discord REST API, with opt-in guardrails and dry-run safeguards.-