What is this?
The Discord MCP Server is an open-source package (discord-mcp-server) that brings the Model Context Protocol (MCP) to your Discord community. It exposes Discord’s messaging, channel, and reaction APIs through a unified MCP interface, enabling AI agents to send messages, read channels, manage reactions, perform sentiment analysis, and automate moderation tasks directly within your server.
By providing a consistent MCP-compliant API over HTTP and WebSocket, this server hides the complexity of Discord’s REST and Gateway, offers real-time automation via WebSockets, and integrates seamlessly with other MCP servers like Slack or Email. Whether you’re building sophisticated AI assistants, community engagement tools, or automated moderation workflows, the Discord MCP Server plugs you into the broader MCP ecosystem for multi-channel orchestration.
Quick Start
Install the server using npm:
npm install @modelcontextprotocol/server-discord-mcp-server
Then add it to your MCP client configuration:
{
"mcpServers": {
"discord-mcp-server": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-discord-mcp-server"],
"env": {
"API_KEY": "your-api-key-here"
}
}
}
}
Key Features
Feature 1: Unified API – a single MCP-compliant interface hides Discord REST and Gateway complexities.
Feature 2: Real-Time Automation – leverage WebSockets to process events and respond instantly.
Feature 3: Community Safety & Engagement – automate moderation, reaction roles, and sentiment-based triggers to keep your server healthy and engaged.
Example Usage
Imagine you want to broadcast an announcement to your #announcements channel. With your MCP client, you can call the sendMessage tool like this:
// Example code
const result = await client.callTool({
name: "sendMessage",
arguments: {
channel_id: "123456789012345678",
content: "🚀 Launch meeting starts in 10 minutes!"
}
});
This code sends a message to the specified channel via the Discord MCP Server. The returned result includes details about the sent message, such as its ID and timestamp.
Configuration
The server accepts the following environment variables:
API_KEY – your MCP secret key used by clients to authenticate with the Discord MCP Server.
SETTING_1 (optional) – an optional sentiment analysis API key (e.g., OpenAI) for external ML services.
Available Tools/Resources
sendMessage: Send and receive messages programmatically.
readChannel: Fetch and paginate channel message history.
Who Should Use This?
This server is perfect for:
Use case 1: Community managers who want to automate announcements and moderation.
Use case 2: Bot developers building AI-driven assistants for Discord.
Use case 3: AI practitioners integrating real-time chat into multi-channel AI workflows.
Conclusion
The Discord MCP Server streamlines community management by standardizing Discord interactions under the MCP protocol. From real-time messaging and sentiment analysis to full automation and moderation, you’ll accelerate development and maintain consistent governance across platforms. Give it a try and see how easy it is to power your next-gen Discord bots and workflows.
Check out the GitHub repository for more information and to contribute.