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 "Install 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-mcpWhat 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
A Model Context Protocol (MCP) server that gives Claude (and any other MCP-compatible AI) full access to Discord using a user token — read and send messages, manage threads, react, search message history, send DMs, and more.
Note: This server uses a Discord user token, not a bot token. No app registration needed — just grab your token and go.
Demo
Ask Claude things like:
"What are the latest 20 messages in #general?"
"Send a message to #announcements saying the deployment is done."
"Search #support for messages about 'login error'."
"Send a DM to user 123456789 saying 'hey, got a minute?'"
"What are my recent mentions across all servers?"
"Create a thread called 'Bug report' on that last message."
"List all members of my server."
Related MCP server: MCP-Discord
Features
Tool | Description |
| Show the connected account's username, ping, and server count |
| List all servers you're in |
| Detailed info about a server (members, boosts, verification, etc.) |
| All channels in a server, sorted by position |
| Info about a specific channel |
| Fetch recent messages (up to 100), with before/after pagination |
| Send a plain-text message, with optional reply |
| Send a rich embed (title, description, fields, color, footer, url) |
| Edit one of your own messages |
| Delete a message |
| Pin or unpin a message |
| React to a message with a Unicode or custom emoji |
| Start a thread from a message or create a standalone thread |
| List server members with roles (up to 1 000) |
| Full profile of a user in a server |
| Keyword search across recent channel history |
| Get all pinned messages in a channel |
| List your open DM channels |
| Send a direct message to any user by ID |
| Find recent messages that mention you across all servers |
Requirements
Node.js 18 or later
Your Discord user token
Setup
1. Get your Discord User Token
Open Discord in your browser (discord.com/app).
Press
F12to open DevTools → Network tab.Send any message or switch channels.
Filter requests by
messagesor any API call, click one, and look at the Request Headers.Find the
Authorizationheader — its value is your user token.
Alternatively, in the Console tab paste:
(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 is like a password. Never share it, commit it to git, or expose it publicly. Anyone with your token has full access to your account.
2. Install the MCP Server
git clone https://github.com/vovafes/discord-mcp.git
cd discord-mcp
npm install
npm run build3. Configure Claude Desktop (or any MCP client)
Open your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the discord-mcp server entry:
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/discord-mcp/dist/index.js"],
"env": {
"DISCORD_USER_TOKEN": "YOUR_USER_TOKEN_HERE"
}
}
}
}Restart Claude Desktop. The Discord tools will appear in Claude's tool list.
4. Configure Claude Code CLI
claude mcp add discord \
--env DISCORD_USER_TOKEN=YOUR_USER_TOKEN_HERE \
-- node /absolute/path/to/discord-mcp/dist/index.jsUsage Examples
Once connected, talk to Claude naturally:
"List all my Discord servers."
"Show the 20 most recent messages in channel ID 123456789."
"Send 'Hello!' to channel 987654321."
"Search #help for 'connection refused'."
"Pin message ID 111222333 in channel 444555666."
"Create a thread called 'Discussion' from message 777888999."
"Add a 👍 reaction to message 000111222 in channel 333444555."
"List all members in guild 666777888."
"Send a DM to user 111222333 saying 'are you free?'"
"Show my recent mentions."Environment Variables
Variable | Required | Default | Description |
| Yes | — | Your Discord user token |
| No |
| Minimum delay between REST calls (ms). Raise this if you get 429s. |
Rate-Limit Protection
Discord enforces strict rate limits on user tokens. The server has three layers of protection built in:
1. Per-request throttle
Every REST call goes through a shared queue that enforces a minimum gap of REQUEST_DELAY_MS (default 1 000 ms) between consecutive requests. This keeps the request rate well below Discord's per-route limits.
2. Exponential back-off on 429
If Discord returns a rate-limit response anyway, the server automatically retries — waiting 2 s → 4 s → 8 s → 16 s before each attempt (up to 4 retries, capped at 30 s).
3. Hard scan caps Bulk scanning tools that touch many channels at once are capped to prevent runaway API usage:
search_messages— scans at most 5 batches × 100 messages = 500 messagesget_mentions— scans at most 20 channels across all servers
If you're on many large servers or see errors, increase REQUEST_DELAY_MS:
"env": {
"DISCORD_USER_TOKEN": "...",
"REQUEST_DELAY_MS": "2000"
}Development
# Run in dev mode (no build step)
DISCORD_USER_TOKEN=your_token npm run dev
# Build
npm run build
# Run built output
DISCORD_USER_TOKEN=your_token npm startArchitecture
Claude / MCP Client
│
│ stdio (JSON-RPC)
▼
discord-mcp (Node.js)
│
│ discord.js (WebSocket + REST)
▼
Discord APIThe server speaks MCP over stdio — no HTTP port, no network exposure. Claude Desktop (or any MCP host) spawns the process directly.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceA 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.22915101MIT
- 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.219151MIT
- AlicenseBqualityCmaintenanceA 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.221345MIT
- Alicense-qualityDmaintenanceA Discord bot server based on Model Context Protocol (MCP), enabling AI models to interact with Discord through the MCP protocol.2MIT
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.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vovafes/discord-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server