Provides tools for interacting with Discord channels, enabling sending and retrieving text messages, uploading and downloading files of any type (images, videos, audio, documents), and performing advanced message searches with filtering by date range, keywords, and authors.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Discord MCP Serversend 'Meeting starts in 5 minutes' to channel 987654321"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Discord MCP Server
Discord Model Context Protocol (MCP) server that provides tools for interacting with Discord channels. This server allows you to send messages, send any type of files (images, videos, audio, documents), retrieve messages, and retrieve media attachments from Discord channels.
機能 (Features)
メッセージ送信: Discordチャンネルにテキストメッセージを送信
ファイル送信: Discordチャンネルにあらゆる種類のファイルを送信(画像、動画、音声、文書等)
メッセージ取得: Discordチャンネルからメッセージを取得
添付ファイル取得: Discordチャンネルからあらゆる種類の添付ファイルを取得
高度な検索: 日時範囲、キーワード、作者等でフィルタリング
インストール (Installation)
npxを使用した簡単インストール(推奨)
Claude Codeでの設定
Claude Codeの設定ファイルに以下を追加:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
セットアップ (Setup)
1. Discordボットの作成
Discord Developer Portal にアクセス
"New Application" をクリックして新しいアプリケーションを作成
"Bot" セクションに移動して "Add Bot" をクリック
Bot Token をコピーして保存
2. Bot権限の設定
Bot に以下の権限を付与してください:
Send MessagesRead Message HistoryAttach FilesView Channels
3. プロジェクトのセットアップ
4. 環境変数
.env ファイルを作成し、以下の環境変数を設定:
使用可能なツール (Available Tools)
discord_send_message
Discordチャンネルにテキストメッセージを送信します。
パラメータ:
channel_id(string): Discord チャンネル IDmessage(string): 送信するメッセージ内容
discord_send_file
Discordチャンネルにあらゆる種類のファイルを送信します(画像、動画、音声、文書等)。
パラメータ:
channel_id(string): Discord チャンネル IDfile_path(string): 送信するファイルのローカルパスmessage(string, optional): ファイルに添付するメッセージfilename(string, optional): カスタムファイル名(指定しない場合は元のファイル名を使用)spoiler(boolean, optional): スポイラー表示にする場合はtrue
discord_get_messages
Discordチャンネルからメッセージを取得します。
パラメータ:
channel_id(string): Discord チャンネル IDlimit(number, optional): 取得するメッセージ数 (デフォルト: 10, 最大: 100)
discord_get_attachments
Discordチャンネルからあらゆる種類の添付ファイルを取得します(画像、動画、音声、文書等)。
パラメータ:
channel_id(string): Discord チャンネル IDlimit(number, optional): 検索するメッセージ数 (デフォルト: 50, 最大: 100)content_type_filter(string, optional): コンテンツタイプでフィルタ(例: "image/", "video/", "audio/", "application/")
discord_get_messages_advanced
高度な検索機能を使用してメッセージを取得します。日時範囲指定、キーワード検索、ページネーションに対応。
パラメータ:
channel_id(string): Discord チャンネル IDlimit(number, optional): 取得するメッセージ数 (デフォルト: 50, 最大: 100)before(string, optional): 指定したメッセージIDより前のメッセージを取得after(string, optional): 指定したメッセージIDより後のメッセージを取得start_date(string, optional): 開始日時 (ISO形式, 例: 2024-01-01T00:00:00Z)end_date(string, optional): 終了日時 (ISO形式, 例: 2024-12-31T23:59:59Z)keyword(string, optional): メッセージ内容で検索するキーワードauthor(string, optional): 特定ユーザー名またはIDでフィルタhas_attachments(boolean, optional): 添付ファイル付きメッセージのみ取得
開発 (Development)
手動インストール(開発者向け)
MCP サーバーの設定
プロジェクトをクローン・ビルド:
Claude Code の設定ファイルに以下を追加:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Claude Code を再起動
使用例
Claude Code で以下のようにDiscordツールを使用できます:
高度な検索の例:
注意事項 (Notes)
Discord Bot Token は機密情報です。
.envファイルを git にコミットしないでくださいチャンネル ID を取得するには、Discord で開発者モードを有効にし、チャンネルを右クリックして "Copy ID" を選択してください
Bot がチャンネルにアクセスできるよう、適切な権限が設定されていることを確認してください
Claude Code の設定ファイルのパスは絶対パスで指定してください