BM

braindao/mcp-discord

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

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
GitHub で README 全文を見る

インストール

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