discord-mcp
Provides comprehensive tools for interacting with Discord's bot API, enabling AI agents to manage messages, forums and threads, channels and permissions, members and roles, moderation, webhooks, scheduled events, AutoMod, invites, slash commands, polls, live gateway events, and button prompts across one or more bot profiles.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
discord-mcp
An MCP server that gives an AI agent (Claude Code, Claude Desktop, any MCP client) the whole Discord bot API: 108 tools for messages, forums and threads, channels and permissions, members, roles, moderation, webhooks, scheduled events, AutoMod, invites, slash commands, polls, live gateway events and button prompts. One server can drive several bots at once.
It was built to run the Discord side of a small game studio's communities (help-desk forums, bug reports, staff notifications, approvals) and is tested against live servers.
Agent-friendly inputs. Wherever a channel is asked you can pass an id, a
discord.com/channels/...link,#name(emoji decorations like🚩・bugsare ignored), or an alias you configured. Users take an id, a mention or a name. Roles take an id or a name. Times take ISO or relative (2h,7d,+1h).Compact output. Messages come back oldest first, with author, content, attachments, embeds, reactions, reply target and a link. Pass
raw=Truefor Discord's full objects.Workflow tools, not just endpoints.
link_openreads any pasted link the way a person would.forum_threads(waiting_only=True)finds forum posts whose last message is not from staff.thread_closereplies, tags, reacts and archives in one call.ask_buttonsposts a question with buttons and waits for an allowed person's click.permissions_explainanswers "why can't X see #Y".
Safe by default.
DISCORD_MCP_READ_ONLY=1removes every write tool.Profiles can be read-only, and
DISCORD_MCP_TOOLSETS/DISCORD_MCP_DENY_TOOLStrim the tool list.Destructive tools carry MCP
destructiveHint.messages_purgeandmembers_prunedefault to a dry run.reasongoes to the server's audit log.Tokens and webhook URLs are never printed unless you ask (
reveal_url).
Robust. Per-route rate-limit buckets, 429 and 5xx retry, and Discord's real error text and code returned to the agent ("Missing Permissions [code 50013]"). The gateway is opened only when a live tool needs it.
Install
Needs Python 3.11+ and uv.
claude mcp add discord --env DISCORD_TOKEN=YOUR_BOT_TOKEN -- \
uvx --from git+https://github.com/wjrosa/discord-mcp discord-mcpOr clone and run uv sync, then point your client at .venv/bin/discord-mcp (Windows:
.venv\Scripts\discord-mcp.exe). discord-mcp --http --port 8765 serves streamable HTTP instead of stdio.
Create the bot
https://discord.com/developers/applications → New Application → Bot → Reset Token (that is
DISCORD_TOKEN).Under Privileged Gateway Intents enable Message Content (needed to read message text) and Server Members (needed for
members_list). Presence is optional. Intents the bot lacks are dropped automatically and reported bygateway_start.OAuth2 → URL Generator → scopes
bot+applications.commands, then pick the permissions you want the agent to have and open the URL to add the bot to your server. What the bot can do is exactly what you grant here. For example, without View Audit Log theaudit_logtool returns 403.
Related MCP server: neuron
Configuration
Variable | Meaning |
| Bot token for a single profile named |
| Default server for that profile (optional when the bot is in one server) |
| Path to a JSON file with several bot profiles (below) |
| Which profile tools use when |
|
|
| Comma list of toolsets to load (default |
| Comma list of tool names never to register (e.g. |
| Gateway intents to request (default: everything except typing) |
Several bots (DISCORD_MCP_CONFIG):
{
"default": "game1",
"profiles": {
"game1": {
"env_file": "C:/secrets/game1.env", "env_key": "DISCORD_BOT_TOKEN",
"guild_id": "123456789012345678",
"channels": {"deploys": "234567890123456789", "bugs": "345678901234567890"}
},
"game2": {"token_env": "GAME2_DISCORD_TOKEN", "read_only": true}
}
}The token can come from token_env (an environment variable), env_file + env_key (a .env file),
token_file (a file holding only the token) or token (inline, not recommended). Every tool takes
bot="game2" to pick a profile. A broken profile is reported by bot_profiles and does not stop the others.
discord-mcp --check prints what loaded.
Tools
Toolset | Tools |
core |
|
messages |
|
threads |
|
channels |
|
members |
|
moderation |
|
roles |
|
guild |
|
expressions |
|
webhooks |
|
events |
|
automod |
|
invites |
|
commands |
|
live |
|
monetization |
|
voice |
|
raw |
|
webhook_send and webhook_info need no bot at all, just a webhook URL.
Recipes
Read a pasted link.
link_open(link). A message link returns the message with context, and a forum post link returns the whole post.Help-desk forum. Run
forum_threads(forum="#bugs", waiting_only=True, staff_roles=["Staff"], exclude_tags=["Solved"]), thenthread_read. Reply withmessage_send(channel=thread, content=..., reply_to=link). Finish withthread_close(thread, reply="Fixed in 1.2.3", tag="Solved", react="✅").Approval.
ask_buttons(channel="#deploys", question="Ship build 812?", options=["Ship", "Hold"], allowed_roles=["Owner"])returns the choice and who made it.Moderation sweep.
messages_purge(channel, author=..., after="1h")previews first; passdry_run=Falseto delete. Thenmember_timeout(user, "1d", reason=...).Staff alert without a bot.
webhook_send(webhook_url, content, username="Ops").
Live events
gateway_start (or any live tool) opens one gateway connection per bot profile. Events are kept in a ring
buffer of 5,000, which events_read and events_wait filter by type, channel, user and text. Notes:
Several gateway sessions on one token are allowed. Discord counts each connect against the bot's daily identify limit, which is why the server never connects at startup.
Buttons whose
custom_idstarts withmcp:are acknowledged within Discord's 3-second limit, and other custom ids are left to whatever program normally runs the bot. If the application has an Interactions Endpoint URL, clicks go to that URL and never reach the gateway;bot_infoshows it.wait_for_replyandwait_for_reactionpoll over REST, so they work without the gateway.
Traps this handles for you
Bot requests without a
DiscordBot (url, version)User-Agent fail with HTTP 400 code 40333 while/users/@mestill works. The server always sends one.GET /channels/{forum}/messagesreturns an empty list. Forum posts are threads, so the server lists them from the active-thread and archived-thread endpoints.Archived threads only accept
archived=falsein an edit.thread_modifyandthread_closeunarchive first.When a bot creates a channel inside a category it cannot see, Discord answers 403. The server creates the channel top-level, then moves it into the category.
A private channel created without an allow for the bot locks the bot out for good.
channel_createalways keeps the bot's own view/send access.Message content over 2000 characters is refused with a clear message before any request is made.
Development
uv sync
uv run pytest tests/test_offline.py # no network
DISCORD_MCP_CONFIG=... uv run python tests/live_readonly.py # read-only against your servers
DISCORD_MCP_CONFIG=... uv run python tests/live_write.py <profile> # writes inside a temporary hidden channelMIT licensed. Issues and pull requests welcome.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage a Discord server from Claude, ChatGPT or any MCP client. Sign in with Discord, no bot token.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server
An MCP server that integrates with Discord to provide AI-powered features.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLets any MCP-compatible AI client interact with Discord — send messages, manage channels, create webhooks, assign roles, and more.48 npm2MIT
- AlicenseNot gradedqualityCmaintenanceA Discord MCP server that gives AI agents full control of a Discord bot — messages, channels, roles, threads, forums, events, webhooks, reactions, moderation, image generation, and real-time voice.7MIT
- FlicenseCqualityDmaintenanceAn MCP server that exposes Discord bot actions as tools for LLM clients.291-
- 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