MCP-Discord
MCP-Discord
AI アシスタントが Discord プラットフォームと対話できるようにする Discord MCP (Model Context Protocol) サーバー。
概要
MCP-Discord は、次の Discord 関連機能を提供します。
Discordボットにログイン
サーバー情報を取得する
チャンネルメッセージの読み取り/削除
指定されたチャネルにメッセージを送信する
フォーラムのチャンネルリストを取得する
フォーラム投稿の作成/削除/返信
テキストチャンネルの作成/削除
メッセージ反応の追加/削除
Webhookの作成/編集/削除/使用
Related MCP server: MCP-Discord
目次
前提条件
Node.js (v16.0.0 以上)
npm (v7.0.0 以上)
適切な権限を持つDiscordボット
ボットトークン( Discord開発者ポータルから入手可能)
メッセージコンテンツインテントが有効
サーバーメンバーの意図が有効
プレゼンスインテントが有効
Discord サーバーでの権限:
メッセージを送信
公開スレッドを作成する
スレッドでメッセージを送信する
スレッドを管理する
チャンネルを管理する
反応を追加する
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop 用の mcp-discord を自動的にインストールするには:
npx -y @smithery/cli install @barryyip0625/mcp-discord --client claude手動インストール
# Clone the repository
git clone https://github.com/barryyip0625/mcp-discord.git
cd mcp-discord
# Install dependencies
npm install
# Compile TypeScript
npm run build構成
Discordボットトークンは正常に動作するために必要です。トークンは以下の2つの方法で提供できます。
環境変数:
DISCORD_TOKEN=your_discord_bot_token
DEFAULT_SERVER_ID=your_default_server_id # Optional
DEFAULT_CHANNEL_ID=your_default_channel_id # Optional起動時に
--configパラメータを使用する:
node path/to/mcp-discord/build/index.js --config "{\"DISCORD_TOKEN\":\"your_discord_bot_token\"}"強化された起動スクリプト
このプロジェクトには、より優れたデバッグとエラー処理を提供する強化された起動スクリプト ( start-discord.js ) が含まれています。
.env ファイルから環境変数を読み込みます
指定されていない場合はデフォルトのサーバーとチャンネルIDを設定します
Claude Desktop での JSON 解析の問題を回避するために、console.log を stderr にリダイレクトします。
MCP サーバーを起動する前に Discord 接続を直接テストします
何か問題が発生した場合に詳細なエラー情報を提供します
このスクリプトを使用するには:
node start-discord.jsClaude/Cursor との使用
クロード
{ "mcpServers": { "discord": { "command": "node", "args": [ "path/to/mcp-discord/start-discord.js" ], "env": { "DISCORD_TOKEN": "your_discord_bot_token", "DEFAULT_SERVER_ID": "your_default_server_id", "DEFAULT_CHANNEL_ID": "your_default_channel_id" } } } }カーソル
{ "mcpServers": { "discord": { "command": "cmd", "args": [ "/c", "node", "path/to/mcp-discord/start-discord.js" ], "env": { "DISCORD_TOKEN": "your_discord_bot_token", "DEFAULT_SERVER_ID": "your_default_server_id", "DEFAULT_CHANNEL_ID": "your_default_channel_id" } } } }
ツールドキュメント
基本機能
discord_login: Discordにログインdiscord_list_guilds: 利用可能なすべての Discord サーバー (ギルド) とそのチャンネルを一覧表示しますdiscord_send: 指定されたチャンネルにメッセージを送信するdiscord_get_server_info: Discord サーバーの情報を取得する
チャンネル管理
discord_create_text_channel: テキストチャンネルを作成するdiscord_delete_channel: チャンネルを削除する
フォーラム機能
discord_get_forum_channels: フォーラムチャンネルのリストを取得するdiscord_create_forum_post: フォーラム投稿を作成するdiscord_get_forum_post: フォーラム投稿を取得するdiscord_reply_to_forum: フォーラム投稿に返信するdiscord_delete_forum_post: フォーラム投稿を削除する
メッセージと反応
discord_read_messages: チャンネルメッセージを読むdiscord_add_reaction: メッセージに反応を追加するdiscord_add_multiple_reactions: メッセージに複数の反応を追加するdiscord_remove_reaction: メッセージから反応を削除するdiscord_delete_message: チャンネルから特定のメッセージを削除する
Webhook管理
discord_create_webhook: Discordチャンネル用の新しいWebhookを作成しますdiscord_send_webhook_message: Webhookを使用してDiscordチャンネルにメッセージを送信しますdiscord_edit_webhook: Discordチャンネルの既存のWebhookを編集しますdiscord_delete_webhook: Discordチャンネルの既存のWebhookを削除します
発達
# Development mode
npm run devライセンス
Available Tools
21 toolsdiscord_add_multiple_reactionsB
Adds multiple emoji reactions to a Discord message at once
Inputs: channelId (required), messageId (required), emojis (required).
discord_add_reactionC
Adds an emoji reaction to a specific Discord message
Inputs: channelId (required), messageId (required), emoji (required).
discord_create_forum_postB
Creates a new post in a Discord forum channel with optional tags
Inputs: forumChannelId (required), title (required), content (required), tags.
discord_create_text_channelB
Creates a new text channel in a Discord server with an optional topic
Inputs: guildId (required), channelName (required), topic.
discord_create_webhookC
Creates a new webhook for a Discord channel
Inputs: channelId (required), name (required), avatar, reason.
discord_delete_channelB
Deletes a Discord channel with an optional reason
Inputs: channelId (required), reason.
discord_delete_forum_postC
Deletes a forum post or thread with an optional reason
Inputs: threadId (required), reason.
discord_delete_messageB
Deletes a specific message from a Discord text channel
Inputs: channelId (required), messageId (required), reason.
discord_delete_webhookC
Deletes an existing webhook for a Discord channel
Inputs: webhookId (required), webhookToken, reason.
discord_edit_webhookC
Edits an existing webhook for a Discord channel
Inputs: webhookId (required), webhookToken, name, avatar, +2 more.
discord_get_forum_channelsA
Lists all forum channels in a specified Discord server (guild)
Inputs: guildId (required).
discord_get_forum_postB
Retrieves details about a forum post including its messages
Inputs: threadId (required).
discord_get_server_infoB
Retrieves detailed information about a Discord server including channels and member count
Inputs: guildId (required).
discord_list_guildsB
Lists all Discord servers (guilds) the bot has access to
Inputs: no named parameters.
discord_loginC
Logs in to Discord using the configured token
Inputs: random_string.
discord_read_messagesA
Retrieves messages from a Discord text channel with a configurable limit
Inputs: channelId (required), limit.
discord_remove_reactionB
Removes a specific emoji reaction from a Discord message
Inputs: channelId (required), messageId (required), emoji (required), userId.
discord_reply_to_forumB
Adds a reply to an existing forum post or thread
Inputs: threadId (required), message (required).
discord_sendC
Sends a message to a specified Discord text channel
Inputs: channelId (required), message (required).
discord_send_webhook_messageB
Sends a message to a Discord channel using a webhook
Inputs: webhookId (required), webhookToken (required), content (required), username, +2 more.
testA
A simple test tool to verify the MCP server is working correctly
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools have distinct purposes targeting specific Discord resources like channels, messages, reactions, webhooks, and forum posts. However, discord_send and discord_send_webhook_message could be slightly confusing as both send messages, though they use different mechanisms. The descriptions help clarify this distinction.
All tools follow a consistent snake_case pattern with a clear discord_ prefix and descriptive verb_noun structure (e.g., discord_create_text_channel, discord_delete_message). The only exception is 'test', which is a simple utility tool and doesn't disrupt the overall pattern.
With 21 tools, the count is on the higher side for a Discord integration, bordering on heavy. While it covers many operations, some tools might be redundant or overly granular (e.g., separate add_reaction and add_multiple_reactions). A more streamlined set could improve usability without losing functionality.
The toolset provides comprehensive coverage for core Discord operations, including CRUD for channels, messages, webhooks, and forum posts, plus server info and login. Minor gaps exist, such as no tools for editing messages or managing roles, but agents can likely work around these for most common workflows.
Maintenance
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Manage a Discord server from Claude, ChatGPT or any MCP client. Sign in with Discord, no bot token.
Related MCP Servers
- AlicenseBqualityAmaintenanceA Discord Model Context Protocol server that enables AI assistants to interact with Discord, providing functionality for sending messages, managing channels, handling forum posts, and working with reactions.523,822 npm114MIT
- AlicenseBqualityDmaintenanceA Discord Model Context Protocol server that enables AI assistants to interact with Discord by sending messages, managing channels, handling forum posts, managing webhooks, and processing reactions.2252 npm6MIT
- AlicenseAqualityDmaintenanceAn MCP server for Discord that enables AI assistants to interact with Discord servers, channels, and messages via the Discord API.6MIT
- AlicenseBqualityDmaintenanceA Discord MCP server that enables AI assistants to interact with the Discord platform, providing features like message sending, channel management, forum operations, reactions, and webhook management.22MIT