home / mcp / discord mcp server
Provides AI-enabled access to Discord features via MCP, including messaging, channels, forums, reactions, and webhooks.
Configuration
View docs{
"mcpServers": {
"iqaicom-mcp-discord": {
"command": "npx",
"args": [
"-y",
"@iqai/mcp-discord",
"--config",
"YOUR_DISCORD_TOKEN"
],
"env": {
"BLOCK_DMS": "true",
"HTTP_PORT": "8080",
"TRANSPORT": "stdio",
"BANNED_USERS": "<BANNED_USERS>",
"DISCORD_TOKEN": "<DISCORD_TOKEN>",
"BLOCKED_GUILDS": "<BLOCKED_GUILDS>",
"SAMPLING_ENABLED": "true",
"REACTION_TIMEOUT_MS": "3000",
"REACTION_FALLBACK_EMOJI": "\"🤔\"",
"RESPOND_TO_MENTIONS_ONLY": "true",
"REACTION_SAMPLING_ENABLED": "false",
"DEFAULT_MESSAGE_CHUNK_SIZE": "2000",
"DEFAULT_RATE_LIMIT_SECONDS": "2"
}
}
}
}You can run and connect the Discord MCP Server to an MCP client so your AI models can read, send, and manage Discord content through the Model Context Protocol. This server exposes message handling, channel and forum operations, reactions, and webhook interactions, enabling seamless AI-driven control of your Discord community.
To use the Discord MCP Server with your MCP client, start the server with either a quick npx-based run or a local build, then configure your MCP client to connect using the provided server entry. Once connected, you can instruct your AI to read messages, post in channels, manage forums, add or remove reactions, and operate webhooks. The bi-directional sampling feature lets the bot listen for mentions and respond automatically when appropriate.
Prerequisites: Node.js and pnpm installed on your machine. Ensure you have a Discord bot token with the required permissions from the Discord Developer Portal and the necessary intents enabled.
# Quick start using npx (no global install)
npx @iqai/mcp-discord --config ${DISCORD_TOKEN}
# Or build from source
git clone https://github.com/IQAIcom/mcp-discord.git
cd mcp-discord
pnpm install
pnpm run buildTwo common ways to run the MCP server are shown below. The first uses npx to run directly from the package, while the second uses a local, built distribution with explicit environment variables.
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@iqai/mcp-discord", "--config", "YOUR_DISCORD_TOKEN"]
}
}
}{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/mcp-discord/dist/index.js"],
"env": {
"DISCORD_TOKEN": "your_discord_bot_token",
"SAMPLING_ENABLED": "true",
"TRANSPORT": "stdio"
}
}
}
}Adds multiple emoji reactions to a Discord message at once
Adds a single emoji reaction to a Discord message
Creates a new category in a Discord server
Creates a new post in a Discord forum channel with optional tags
Creates a new text channel with an optional topic
Creates a new webhook for a Discord channel
Deletes a Discord category by ID
Deletes a Discord channel with an optional reason
Deletes a forum post or thread
Deletes a specific message in a channel
Deletes an existing webhook for a Discord channel
Edits a Discord category's name and position
Edits an existing webhook for a Discord channel
Lists all forum channels in a server
Retrieves details about a forum post and its messages
Retrieves detailed server information including channels and member count
Logs in to Discord using the configured token
Retrieves messages from a channel with a configurable limit
Removes a specific emoji reaction from a message
Adds a reply to an existing forum post or thread
Sends a message to a text channel
Sends a message to a channel via webhook