home / mcp / discord mcp server

Discord MCP Server

Provides AI-enabled access to Discord features via MCP, including messaging, channels, forums, reactions, and webhooks.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 build

Additional configuration notes

Two 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"
      }
    }
  }
}

Available tools

discord_add_multiple_reactions

Adds multiple emoji reactions to a Discord message at once

discord_add_reaction

Adds a single emoji reaction to a Discord message

discord_create_category

Creates a new category in a Discord server

discord_create_forum_post

Creates a new post in a Discord forum channel with optional tags

discord_create_text_channel

Creates a new text channel with an optional topic

discord_create_webhook

Creates a new webhook for a Discord channel

discord_delete_category

Deletes a Discord category by ID

discord_delete_channel

Deletes a Discord channel with an optional reason

discord_delete_forum_post

Deletes a forum post or thread

discord_delete_message

Deletes a specific message in a channel

discord_delete_webhook

Deletes an existing webhook for a Discord channel

discord_edit_category

Edits a Discord category's name and position

discord_edit_webhook

Edits an existing webhook for a Discord channel

discord_get_forum_channels

Lists all forum channels in a server

discord_get_forum_post

Retrieves details about a forum post and its messages

discord_get_server_info

Retrieves detailed server information including channels and member count

discord_login

Logs in to Discord using the configured token

discord_read_messages

Retrieves messages from a channel with a configurable limit

discord_remove_reaction

Removes a specific emoji reaction from a message

discord_reply_to_forum

Adds a reply to an existing forum post or thread

discord_send

Sends a message to a text channel

discord_send_webhook_message

Sends a message to a channel via webhook