discord-mcp
Provides tools for interacting with Discord using a user token, enabling AI agents to read and send messages, manage threads, react to messages, search message history, send direct messages, list servers and channels, and more.
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., "@discord-mcp What are my recent mentions across all servers?"
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.
๐ค Discord MCP Server
Give Claude full access to Discord.
Read messages, send messages, manage threads, react, search history, send DMs โ all through natural conversation.
What is this?
Discord MCP Server is a Model Context Protocol server that bridges Claude and Discord. Once connected, you can talk to Claude in plain English and it will interact with your Discord account โ no scripting, no dashboards, no manual API calls.
Uses a Discord user token โ no bot registration needed.
Related MCP server: MCP-Discord
Demo
You: "What are the last 15 messages in #general?"
You: "Send a message to #announcements: deployment done โ
"
You: "Search #support for messages about 'login error'"
You: "DM user 123456789 and say hey, got a minute?"
You: "Create a thread called 'Release notes' from that last message"
You: "What are my recent mentions across all servers?"
You: "React to message 987654321 with ๐"Tools
Tool | Description |
| Connected account info (username, ping, server count) |
| All Discord servers you're in |
| Server details: members, boosts, verification level, etc. |
| All channels in a server, sorted by position |
| Info about a specific channel |
| Fetch recent messages (up to 100), with pagination |
| Send a message, with optional reply |
| Send a rich embed (title, description, fields, color, footer) |
| Edit one of your own messages |
| Delete a message |
| Pin or unpin a message |
| React with a Unicode or custom emoji |
| Start a thread from a message or create a standalone one |
| List server members with roles (up to 1 000) |
| Full profile of a user in a server |
| Keyword search across recent channel history |
| All pinned messages in a channel |
| List your open DM conversations |
| Send a direct message to any user by ID |
| Recent messages that mention you across all servers |
Requirements
Node.js 18+
Your Discord user token
Setup
1. Get your Discord User Token
Open Discord in your browser at discord.com/app
Press
F12โ Network tabSend any message or switch a channel
Find any request to
discord.com/api, click it, look at Request HeadersCopy the value of the
Authorizationheader โ that's your token
Or paste this in the browser Console:
(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m)
.find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken()โ ๏ธ Your user token = your password. Never share it, commit it to git, or put it in public config files.
2. Install
git clone https://github.com/vovafes/discord-mcp-server.git
cd discord-mcp-server
npm install
npm run build3. Connect to Claude Desktop
Edit your Claude Desktop config:
macOS โ
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows โ
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/discord-mcp-server/dist/index.js"],
"env": {
"DISCORD_USER_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}Restart Claude Desktop โ the Discord tools will appear automatically.
4. Connect to Claude Code CLI
claude mcp add discord \
--env DISCORD_USER_TOKEN=YOUR_TOKEN_HERE \
-- node /absolute/path/to/discord-mcp-server/dist/index.jsConfiguration
Variable | Required | Default | Description |
| โ | โ | Your Discord user token |
| โ |
| Delay between REST calls in ms. Lower = faster, higher = safer. |
Rate-Limit Protection
Discord enforces strict limits on user tokens. Three layers of protection are built in:
Global throttle
Every REST call passes through a shared gate that enforces a minimum gap of REQUEST_DELAY_MS (default 5 seconds) between consecutive requests.
Exponential back-off
On a 429 Too Many Requests response, the server automatically retries:
attempt 1 โ wait 2s
attempt 2 โ wait 4s
attempt 3 โ wait 8s
attempt 4 โ wait 16s (then give up)Hard scan caps
Bulk tools that touch many channels are capped to prevent runaway API storms:
Tool | Limit |
| Max 500 messages (5 batches ร 100) |
| Max 20 channels scanned across all servers |
To tune the throttle:
"env": {
"DISCORD_USER_TOKEN": "...",
"REQUEST_DELAY_MS": "2000"
}Architecture
โโโโโโโโโโโโโโโโโโโโ
โ Claude / MCP โ
โ Client โ
โโโโโโโโโโคโโโโโโโโโโ
โ stdio (JSON-RPC)
โโโโโโโโโโผโโโโโโโโโโ
โ discord-mcp โ โ this server
โ (Node.js) โ
โโโโโโโโโโคโโโโโโโโโโ
โ discord.js (WebSocket + REST)
โโโโโโโโโโผโโโโโโโโโโ
โ Discord API โ
โโโโโโโโโโโโโโโโโโโโThe server speaks MCP over stdio โ no open ports, no HTTP server. The MCP host (Claude Desktop, Claude Code, etc.) spawns it as a subprocess.
Development
# Dev mode โ no build step needed
DISCORD_USER_TOKEN=your_token npm run dev
# Build
npm run build
# Run built output
DISCORD_USER_TOKEN=your_token npm startMade by Claude for Claude ๐ค
Built with discord.js ยท Model Context Protocol SDK
Available Tools
20 toolsadd_reactionA
Add an emoji reaction to a message
Inputs: emoji (required), channel_id (required), message_id (required).
create_threadA
Create a thread from a message or a standalone thread in a channel
Inputs: name (required), channel_id (required), message_id, auto_archive_minutes.
delete_messageB
Delete a message
Inputs: channel_id (required), message_id (required).
edit_messageA
Edit one of your own messages
Inputs: content (required), channel_id (required), message_id (required).
get_channel_infoA
Get information about a specific channel
Inputs: channel_id (required).
get_dm_channelsA
List open DM conversations
Inputs: no named parameters.
get_guild_infoB
Get detailed information about a Discord server
Inputs: guild_id (required).
get_meA
Get information about the connected Discord account
Inputs: no named parameters.
get_mentionsA
Find recent messages that mention you (scans up to 20 channels across all servers)
Inputs: limit.
get_messagesB
Retrieve recent messages from a channel
Inputs: channel_id (required), after, limit, before.
get_pinned_messagesB
Get all pinned messages in a channel
Inputs: channel_id (required).
get_user_infoB
Get a user's profile in a server
Inputs: user_id (required), guild_id (required).
list_channelsA
List all channels in a Discord server
Inputs: guild_id (required).
list_guildsA
List all Discord servers the account is in
Inputs: no named parameters.
list_membersB
List members in a server
Inputs: guild_id (required), limit.
pin_messageB
Pin or unpin a message
Inputs: channel_id (required), message_id (required), pin.
search_messagesA
Search for messages containing a keyword in a channel (scans up to 500 recent messages)
Inputs: query (required), channel_id (required), limit.
send_dmA
Send a direct message to a user by their ID
Inputs: content (required), user_id (required).
send_embedA
Send a rich embed message to a channel
Inputs: title (required), channel_id (required), url, color, +3 more.
send_messageC
Send a message to a channel
Inputs: content (required), channel_id (required), reply_to.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 20 tools
Each tool targets a distinct resource and action: account, guild, channel, message, member, DM. Even similar-sounding operations like get_messages, search_messages, and get_pinned_messages have clear, non-overlapping purposes.
All tool names follow a consistent verb_noun pattern in snake_case (list_guilds, get_channel_info, send_message, add_reaction). The verbs are predictably chosen: list for collections, get for details, send for output, etc.
20 tools is slightly above the ideal 3-15 range, but the count is justified by the broad scope of Discord interactions covered. Each tool serves a distinct purpose and none feel redundant.
The set covers the core lifecycle of Discord messaging (read, send, edit, delete, pin, react) and server/member info. Minor gaps exist, such as no direct fetch by message ID, but the workflows are generally complete.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
An MCP server that integrates with Discord to provide AI-powered features.
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
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- AlicenseCqualityBmaintenanceA Discord Model Context Protocol server that enables AI assistants to interact with Discord, providing functionality for sending messages, managing channels, handling forum posts, and working with reactions.461,578 npm111MIT
- AlicenseBqualityDmaintenanceA Discord MCP server that enables AI assistants to interact with Discord platforms, providing functionalities like sending messages, managing channels, creating forum posts, and handling webhooks.211MIT
- AlicenseBqualityDmaintenanceA Discord Model Context Protocol server that enables AI assistants to interact with Discord by sending messages, managing channels, handling forum posts, managing webhooks, and processing reactions.2282 npm5MIT
- AlicenseNot gradedqualityDmaintenanceA Discord bot server based on Model Context Protocol (MCP), enabling AI models to interact with Discord through the MCP protocol.2MIT