BM

braindao/mcp-discord

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

5 stars 5 forks Качество 76 Тренд 17MIT

Model Context Protocol Server for interacting with Discord Servers

Обзор

The Discord MCP Server enables AI agents to interact with the Discord platform through the Model Context Protocol (MCP). This server provides comprehensive access to Discord's features including messaging, channel management, forum operations, reactions, and webhook management. By implementing MCP, this server allows Large Language Models (LLMs) to read and send messages, manage channels and forums, handle reactions, and interact with webhooks directly through their context window, bridging the gap between AI and Discord communities. The server supports bi-directional communication through a Sampling feature, allowing the bot to listen to messages and respond automatically when mentioned.

README

Показан фрагмент оригинального README. Открыть оригинал.

💬 Discord MCP Server

Overview

The Discord MCP Server enables AI agents to interact with the Discord platform through the Model Context Protocol (MCP). This server provides comprehensive access to Discord’s features including messaging, channel management, forum operations, reactions, and webhook management.

By implementing MCP, this server allows Large Language Models (LLMs) to read and send messages, manage channels and forums, handle reactions, and interact with webhooks directly through their context window, bridging the gap between AI and Discord communities.

The server supports bi-directional communication through a Sampling feature, allowing the bot to listen to messages and respond automatically when mentioned.

Features

  • Message Management: Send, read, and delete messages in Discord channels
  • Channel Operations: Create and delete text channels with custom topics
  • Forum Support: Create, read, reply to, and delete forum posts with tag support
  • Reaction Handling: Add single or multiple reactions to messages
  • Webhook Integration: Create, edit, delete, and send messages via webhooks
  • Server Information: Retrieve detailed server information including channels and member counts

Installation

To use this server without installing it globally:

npx @iqai/mcp-discord --config ${DISCORD_TOKEN}

Build from Source

git clone https://github.com/IQAIcom/mcp-discord.git
cd mcp-discord
pnpm install
pnpm run build

Running with an MCP Client

Add the following configuration to your MCP client settings (e.g., claude_desktop_config.json).

Minimal Configuration

{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": ["-y", "@iqai/mcp-discord", "--config", "YOUR_DISCORD_TOKEN"]
    }
  }
}

Advanced Configuration (Local Build)

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

Configuration (Environment Variables)

Variable Required Description Default
DISCORD_TOKEN Yes Discord bot token from the Developer Portal -
SAMPLING_ENABLED No Enables bi-directional message sampling true
TRANSPORT No Transport method: stdio or http stdio
HTTP_PORT No Port for HTTP transport 8080
DEFAULT_RATE_LIMIT_SECONDS No Rate limit (seconds) for sampling requests per user 2
Открыть полный README на GitHub

Установка

npx -y @iqai/mcp-discord --config YOUR_DISCORD_TOKEN
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "discord": { "command": "npx", "args": ["-y", "@iqai/mcp-discord", "--config", "YOUR_DISCORD_TOKEN"] } } }