MCP Directory

Discord MCP Server (IQAI)

Discord MCP with messaging, forums, reactions, webhooks and sampling support

Verified
stdio (local)
API key
Stale
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y @iqai/mcp-discord --config <your-discord-bot-token>

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "discord-mcp-server-iqai": {
      "command": "npx",
      "args": [
        "-y",
        "@iqai/mcp-discord",
        "--config",
        "<your-discord-bot-token>"
      ],
      "env": {
        "DISCORD_TOKEN": "<your-discord-bot-token>"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Node.js (recent LTS recommended) with npx, or pnpm if building from source
  • A Discord application with a bot and its token, from the Discord Developer Portal
  • The Message Content, Server Members, and Presence privileged intents enabled for the bot
  • The bot invited to your server with appropriate permissions (Administrator recommended for full functionality)
  • An MCP client that supports the sampling capability, if you want the bot to auto-respond to mentions

About Discord MCP Server (IQAI)

Discord MCP Server (IQAI) is a Model Context Protocol server, maintained by IQAI, that connects AI agents to Discord for messaging, channel and category management, forum operations, reactions, and webhooks. It is written in TypeScript and runs locally over stdio (default) or HTTP.

Its distinguishing feature is MCP sampling support: bi-directional communication that lets the bot listen for messages and respond automatically when mentioned, calling back to the host LLM to generate replies. This behavior is heavily configurable through environment variables — rate limiting per user, message chunk sizing, responding only to mentions, blocking DMs, blocking specific guilds, banning users, and optional AI-generated reactions with a fallback emoji.

Authentication is a single Discord bot token (DISCORD_TOKEN). The bot needs the Message Content, Server Members, and Presence privileged intents, with Administrator recommended for full functionality. It installs via npx (@iqai/mcp-discord) or from source with pnpm; there is no hosted/remote option — deployment is local.

Tools & capabilities (10)

discord_login

Authenticate the bot with the configured token

discord_get_server_info

Retrieve guild/server details

discord_send

Post a message to a text channel

discord_read_messages

Read messages from a channel (default limit 50)

discord_delete_message

Delete a specific message

discord_create_text_channel / discord_delete_channel

Create a text channel (optional topic) or delete a channel

discord_create_category / discord_edit_category / discord_delete_category

Create, edit (name/position), and delete categories

discord_get_forum_channels / discord_create_forum_post / discord_get_forum_post / discord_reply_to_forum / discord_delete_forum_post

List forums, create posts with optional tags, fetch a post, reply to threads, and delete posts

discord_add_reaction / discord_add_multiple_reactions / discord_remove_reaction

Add one or many emoji reactions, or remove a reaction

discord_create_webhook / discord_edit_webhook / discord_delete_webhook / discord_send_webhook_message

Create, edit, delete, and post messages via webhooks

When to use it

  • Build an agent that auto-responds when mentioned in Discord, using MCP sampling to generate replies
  • Post and read messages, or send rich notifications through webhooks
  • Organize a server by creating and editing categories and text channels
  • Run community forums: create tagged posts, reply to threads, and remove stale posts
  • Add contextual reactions to messages (optionally AI-generated via sampling, with a fallback emoji)
  • Enforce guardrails — rate limits, mention-only responses, blocked guilds, and banned users — for a public-facing bot

Quick setup

  1. 1Create an application and bot in the Discord Developer Portal and copy the bot token
  2. 2Enable the Message Content, Server Members, and Presence privileged intents and invite the bot to your server
  3. 3Run `npx @iqai/mcp-discord --config <DISCORD_TOKEN>`, or clone the repo and build with `pnpm install && pnpm run build`
  4. 4Add the server to your MCP client config, setting DISCORD_TOKEN and any sampling/transport variables
  5. 5If you want auto-responses, ensure your client supports sampling and leave SAMPLING_ENABLED on (default true)
  6. 6Restart the client and verify with discord_login and discord_get_server_info

Security notes

A Discord bot token gives full bot access; scope the bot's gateway intents and server permissions tightly. Prefer the DISCORD_TOKEN env var over the --config flag to avoid the token appearing in process listings.

Discord MCP Server (IQAI) FAQ

What does the sampling feature do?

Sampling enables bi-directional communication: the bot listens for messages and, when mentioned, calls back to the host LLM to generate a reply automatically. It supports per-user rate limiting, message chunking, and optional AI-generated reactions, and requires an MCP client that implements the sampling capability.

How do I stop the bot from responding to everything?

By default RESPOND_TO_MENTIONS_ONLY is true and BLOCK_DMS is true, so it only reacts to mentions and ignores DMs. You can further restrict it with BLOCKED_GUILDS, BANNED_USERS, and DEFAULT_RATE_LIMIT_SECONDS.

Can I disable auto-responses entirely?

Yes. Set SAMPLING_ENABLED to false to turn off automatic mention responses while still using the explicit MCP tools.

Which transports are supported?

stdio (default) and http. Use the TRANSPORT environment variable to select, and HTTP_PORT (default 8080) to set the port. There is no hosted/remote option.

How is this different from other Discord MCP servers?

Its main differentiator is built-in MCP sampling with extensive guardrail configuration (rate limiting, mention filtering, blocked guilds/users, AI reactions). It is maintained by IQAI and is not an official Discord product.

Alternatives to Discord MCP Server (IQAI)

Compare all alternatives →

Connect your personal WhatsApp: search, read and send messages and media locally

Verified
stdio (local)
No auth
Python
12 tools
Updated 26 days agoRepo

Powerful Slack MCP with stdio/SSE/HTTP, DMs, group DMs and no-admin token auth

Verified
stdio (local)
API key
Go
12 tools
Updated 1 month agoRepo

Full Telegram user-account MCP via MTProto: read chats, manage groups, send messages

Verified
stdio (local)
API key
Python
11 tools
Updated 7 days agoRepo