MCP_Discord_Server
Provides tools to send messages and replies to Discord channels via the Discord REST API, including automatic channel name resolution.
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.
MCP_Discord_Server
Discord Message Sending Service for Claude Desktop and KADI Agents.
Overview
MCP_Discord_Server is a TypeScript-based MCP server that provides Discord message sending capabilities. It exposes tools for sending messages and replies via Discord REST API, making it accessible to Claude Desktop and any KADI agent through the broker.
Related MCP server: Discord Notification MCP Server
Architecture
Claude Desktop / KADI Agent → kadi-broker → MCP_Discord_Server → Discord REST API → Discord ChannelComponents
Discord REST Client: Uses discord.js for Discord API integration
Channel Resolution: Converts channel names to IDs automatically
MCP Server: Exposes
send_messageandsend_replytoolsStateless Design: No event listening, pure message sending
Setup
1. Install Dependencies
npm install2. Configure Environment
Copy .env.example to .env:
cp .env.example .envEdit .env with your Discord bot token:
DISCORD_TOKEN=your_discord_bot_token_here
DISCORD_GUILD_ID=your_discord_guild_id_here # Optional
MCP_LOG_LEVEL=info3. Get Discord Bot Token
Go to Discord Developer Portal
Create a new application
Go to "Bot" section
Click "Reset Token" and copy the token
Invite bot to your server with proper permissions (Send Messages, Read Messages, etc.)
4. Build
npm run build5. Run
Development mode (with hot-reload):
npm run devProduction mode:
npm startMCP Tools
send_message
Send a message to a Discord channel.
Input:
channel(string): Channel ID or name (e.g., "general", "1234567890")text(string): Message text to sendmessage_id(optional string): Message ID to reply to
Output:
{
"success": true,
"message": "Message sent successfully",
"messageId": "1234567890",
"channelId": "9876543210"
}send_reply
Reply to a specific message in a Discord channel.
Input:
channel(string): Channel ID where the message existsmessage_id(string): Message ID to reply totext(string): Reply message text
Output:
{
"success": true,
"message": "Reply sent successfully",
"messageId": "1234567891",
"channelId": "9876543210",
"replyTo": "1234567890"
}Integration with KADI Broker
The MCP server is registered in kadi-broker/config/mcp-upstreams.json:
{
"id": "discord-server",
"name": "Discord Message Sender (MCP_Discord_Server)",
"type": "stdio",
"prefix": "discord_server",
"enabled": true,
"stdio": {
"command": "node",
"args": ["C:\\p4\\Personal\\SD\\MCP_Discord_Server\\dist\\index.js"],
"env": {
"DISCORD_TOKEN": "your_token",
"DISCORD_GUILD_ID": "your_guild_id"
}
},
"networks": ["discord"]
}Usage Examples
From Agent_TypeScript
const protocol = client.getBrokerProtocol();
const result = await protocol.invokeTool({
targetAgent: 'discord-server',
toolName: 'discord_server_send_message',
toolInput: {
channel: 'general',
text: 'Hello from Agent_TypeScript!'
},
timeout: 10000
});From Claude Desktop
When configured in Claude Desktop's MCP settings, you can simply ask:
"Send a message to the Discord channel #general saying 'Hello world!'"Claude will call the send_message tool automatically.
Discord Bot Permissions
Required bot permissions:
View Channels
Send Messages
Read Message History
Required Gateway Intents:
Guilds
Guild Messages
Channel Name Resolution
The server automatically resolves channel names to IDs:
"general"→"1234567890"(channel ID)"#announcements"→"9876543210"(strips # prefix)"1234567890"→"1234567890"(already an ID, passed through)
Channel cache is maintained in memory for fast resolution.
Logging
The server logs to console with emoji indicators:
🚀 Startup messages
✅ Message sent successfully
❌ Error messages
📤 Awaiting requests
Troubleshooting
"Discord client not ready after timeout"
Check DISCORD_TOKEN is valid
Verify bot has been invited to server
Ensure internet connection is stable
"Channel not found" errors
Verify bot has access to the channel
Check channel name spelling
Verify channel exists in the guild
"Failed to send message" errors
Check bot has "Send Messages" permission in the channel
Verify bot is not muted or has role restrictions
Check message content doesn't violate Discord ToS
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
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
Control your Discord community: send/read messages, manage channels and forums, and handle webhook…
Messaging tools for AI agents: send messages, manage chats, groups and channels.
Let AI agents read your Discord community's analytics, members and tickets, and save drafts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with Discord channels by sending and reading messages through Discord's API, with a focus on maintaining user control and security.248MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to send notifications to Discord channels via webhooks when tasks complete, errors occur, or user intervention is needed. Deployed serverlessly on Cloudflare Workers with support for rich message formatting and embeds.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to send text messages and images to Discord channels via webhooks.19 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to send messages to a Discord channel and read replies, allowing for notifications and approvals via Discord.MIT