by v-3
Enables large language models to interact with Discord channels, allowing them to send and read messages through Discord's API while keeping user control and security.
The server acts as a bridge between LLMs (e.g., Claude) and Discord, exposing two tools – send-message
and read-messages
– that let the model query recent chat history or post new content in any channel the bot can access.
git clone https://github.com/v-3/discordmcp.git
cd discordmcp
npm install
.env
file containing DISCORD_TOKEN=your_bot_token
.npm run build
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["path/to/discordmcp/build/index.js"],
"env": { "DISCORD_TOKEN": "your_discord_bot_token_here" }
}
}
}
send-message
and read-messages
tools.Q: Which permissions does the Discord bot need? A: Read Messages/View Channels, Send Messages, and Read Message History.
Q: Can the server handle multiple Discord guilds?
A: Yes. Provide the server
parameter when the bot belongs to more than one guild.
Q: Is the bot token exposed?
A: The token is stored only in a local .env
file and never committed to the repository.
Q: How many messages can be fetched at once? A: Up to 100 messages per request; the default is 50.
Q: Do I need to compile the TypeScript code each time?
A: Only after code changes. Use npm run dev
for continuous recompilation during development.
A Model Context Protocol (MCP) server that enables LLMs to interact with Discord channels, allowing them to send and read messages through Discord's API. Using this server, LLMs like Claude can directly interact with Discord channels while maintaining user control and security.
git clone https://github.com/yourusername/discordmcp.git
cd discordmcp
npm install
.env
file in the root directory with your Discord bot token:DISCORD_TOKEN=your_discord_bot_token_here
npm run build
Open your Claude for Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add the Discord MCP server configuration:
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["path/to/discordmcp/build/index.js"],
"env": {
"DISCORD_TOKEN": "your_discord_bot_token_here"
}
}
}
}
Sends a message to a specified Discord channel.
Parameters:
server
(optional): Server name or ID (required if bot is in multiple servers)channel
: Channel name (e.g., "general") or IDmessage
: Message content to sendExample:
{
"channel": "general",
"message": "Hello from MCP!"
}
Reads recent messages from a specified Discord channel.
Parameters:
server
(optional): Server name or ID (required if bot is in multiple servers)channel
: Channel name (e.g., "general") or IDlimit
(optional): Number of messages to fetch (default: 50, max: 100)Example:
{
"channel": "general",
"limit": 10
}
npm install --save-dev typescript @types/node
npm run dev
You can test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.js
Here are some example interactions you can try with Claude after setting up the Discord MCP server:
Claude will use the appropriate tools to interact with Discord while asking for your approval before sending any messages.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions:
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "discord": { "command": "node", "args": [ "path/to/discordmcp/build/index.js" ], "env": { "DISCORD_TOKEN": "your_discord_bot_token_here" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by lharries
Enables searching, reading, and sending personal WhatsApp messages and media through a Model Context Protocol (MCP) server, storing all data locally in SQLite and exposing controlled tools for LLMs like Claude.
by iFurySt
Provides authenticated access to XiaoHongShu (RedNote) notes, supporting keyword search, note retrieval by URL, and cookie persistence via a Model Context Protocol server.
by korotovsky
Provides a powerful Model Context Protocol interface for Slack workspaces, enabling message retrieval, search, and optional posting via Stdio or SSE transports without requiring bot permissions.
by ZubeidHendricks
Provides a standardized interface for interacting with YouTube content, enabling video retrieval, transcript access, channel and playlist management, and advanced analytics through the Model Context Protocol.
by InditexTech
Provides Microsoft Teams integration via the Model Context Protocol, enabling reading, creating, replying to messages and mentioning members.
by chigwell
Provides a full‑featured Telegram integration for MCP‑compatible clients, enabling programmatic access to chats, messages, contacts, profile management, and group administration.
by EnesCinr
Interact with Twitter to post tweets and search tweets programmatically via an MCP server.
by chaindead
Manages Telegram dialogs, messages, drafts, and read statuses via the Model Context Protocol, enabling AI assistants to query and interact with Telegram accounts.
by carterlasalle
Securely interfaces with the macOS Messages database via MCP, enabling LLMs to query, analyze, filter, and send iMessage or SMS communications with built‑in phone number validation, attachment handling, and group chat support.