Discord MCP Server
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 "Deploy 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 Server send '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チャンネルからあらゆる種類の添付ファイルを取得
高度な検索: 日時範囲、キーワード、作者等でフィルタリング
Related MCP server: Discord MCP Server
インストール (Installation)
npxを使用した簡単インストール(推奨)
# パッケージを直接実行(自動インストール)
npx @el-el-san/discord-mcpClaude 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
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["--yes", "--prefer-online", "@el-el-san/discord-mcp@latest"],
"env": {
"DISCORD_BOT_TOKEN": "${DISCORD_BOT_TOKEN}"
}
}
}
}セットアップ (Setup)
1. Discordボットの作成
Discord Developer Portal にアクセス
"New Application" をクリックして新しいアプリケーションを作成
"Bot" セクションに移動して "Add Bot" をクリック
Bot Token をコピーして保存
2. Bot権限の設定
Bot に以下の権限を付与してください:
Send MessagesRead Message HistoryAttach FilesView Channels
3. プロジェクトのセットアップ
# 依存関係のインストール
npm install
# 環境変数の設定
cp env.example .env
# .envファイルにDiscord Bot Tokenを設定
# TypeScriptのコンパイル
npm run build
# サーバーの起動
npm start4. 環境変数
.env ファイルを作成し、以下の環境変数を設定:
DISCORD_BOT_TOKEN=your_discord_bot_token_here使用可能なツール (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)
# 開発モードで起動
npm run dev
# TypeScriptコンパイル
npm run build手動インストール(開発者向け)
MCP サーバーの設定
プロジェクトをクローン・ビルド:
git clone https://github.com/el-el-san/discord-mcp.git
cd discord-mcp
npm install
npm run buildClaude Code の設定ファイルに以下を追加:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/path/to/discord-mcp/build/index.js"],
"env": {
"DISCORD_BOT_TOKEN": "your_discord_bot_token_here"
}
}
}
}Claude Code を再起動
使用例
Claude Code で以下のようにDiscordツールを使用できます:
チャンネル ID 123456789 に "Hello, World!" というメッセージを送信してチャンネル ID 123456789 から最新の10件のメッセージを取得して/path/to/image.png をチャンネル ID 123456789 に送信して/path/to/video.mp4 をチャンネル ID 123456789 に "動画ファイル" というメッセージと一緒に送信してチャンネル ID 123456789 から動画ファイルを全て取得して高度な検索の例:
チャンネル ID 123456789 から2024年1月のメッセージを取得してチャンネル ID 123456789 から "error" というキーワードを含むメッセージを検索してチャンネル ID 123456789 から特定ユーザー "username" のメッセージだけを取得して注意事項 (Notes)
Discord Bot Token は機密情報です。
.envファイルを git にコミットしないでくださいチャンネル ID を取得するには、Discord で開発者モードを有効にし、チャンネルを右クリックして "Copy ID" を選択してください
Bot がチャンネルにアクセスできるよう、適切な権限が設定されていることを確認してください
Claude Code の設定ファイルのパスは絶対パスで指定してください
Available Tools
5 toolsdiscord_get_attachmentsB
Retrieve all types of media attachments from a Discord channel (images, videos, audio, documents, etc.)
Inputs: channel_id (required), limit, content_type_filter.
discord_get_messagesC
Retrieve messages from a Discord channel
Inputs: channel_id (required), limit.
discord_get_messages_advancedC
Advanced message retrieval with date range, keyword search, and pagination
Inputs: channel_id (required), limit, before, after, +5 more.
discord_send_fileC
Send any type of file to a Discord channel (images, videos, audio, documents, etc.)
Inputs: channel_id (required), file_path (required), message, filename, +1 more.
discord_send_messageC
Send a text message to a Discord channel
Inputs: channel_id (required), message (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
There is clear overlap between discord_get_messages and discord_get_messages_advanced, where the advanced version appears to be a superset of the basic one, creating potential confusion about when to use each. However, the other tools (get_attachments, send_file, send_message) have distinct purposes related to retrieving attachments versus sending messages/files, which helps maintain some clarity in the set.
All tool names follow a consistent pattern: 'discord_' prefix followed by a verb_noun structure (e.g., get_attachments, send_message). This makes the tools predictable and easy to understand at a glance, with no deviations in style or convention across the set.
With 5 tools, the count is reasonable for a Discord server focused on basic messaging and file operations. It covers core functionalities like sending and retrieving messages/attachments, though it might feel slightly thin if more advanced Discord features (e.g., managing channels, users, or reactions) are expected, but it's well-scoped for its apparent purpose.
The tool set covers basic send and retrieve operations for messages and files, which aligns with a minimal Discord integration. However, there are notable gaps: no tools for updating or deleting messages, managing channels or users, or handling reactions, which could limit agent workflows in more complex scenarios. The surface is functional but incomplete for full Discord interaction.
Maintenance
Related MCP Connectors
Control your Discord community: send/read messages, manage channels and forums, and handle webhook…
Connect a Discord bot (bot token from the developer portal) to read/send messages, list guilds and c
Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server
Build and change Discord bots by describing them: slash commands, events, embeds, modals and data.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Discord servers through a bot, supporting channel management, messaging, forum operations, reactions, and webhooks.22827 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Discord through the REST API and real-time events, supporting message management, user info, channel operations, and more with security controls.16 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with the Discord platform, including servers, members, roles, channels, categories, forum posts, messages, reactions, and webhooks. It supports logging in a bot, reading and searching messages, and creating, editing, or deleting Discord resources through natural language.827 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with the Discord platform by managing servers, channels, roles, forum posts, messages, reactions, and webhooks through a Discord bot.827 npmMIT