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 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チャンネルからあらゆる種類の添付ファイルを取得
高度な検索: 日時範囲、キーワード、作者等でフィルタリング
Related MCP server: MCP-Discord
インストール (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.)
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | Discord channel ID | |
| limit | No | Number of messages to search for attachments (default: 50, max: 100) | |
| content_type_filter | No | Filter by content type prefix (e.g., "image/", "video/", "audio/", "application/"). Leave empty for all types |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but lacks behavioral details. It doesn't disclose whether this is a read-only operation, what permissions are required, rate limits, pagination behavior, or error conditions. The description only states what it retrieves, not how it behaves, leaving significant gaps for an agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It front-loads the core purpose and includes helpful examples (images, videos, etc.). Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool with 3 parameters. It covers the basic purpose but lacks behavioral context, return value explanation, and usage nuances. For a retrieval tool with moderate complexity, this is minimally adequate but has clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents parameters. The description adds no additional meaning beyond what's in the schema (e.g., no extra context on channel_id format or content_type_filter usage). Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'retrieve' and the resource 'media attachments from a Discord channel', with examples of attachment types. It distinguishes from siblings like discord_get_messages (which retrieves messages) and discord_send_file (which sends files). However, it doesn't explicitly contrast with discord_get_messages_advanced, which might also retrieve attachments, making it a 4 rather than a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing attachments rather than messages, but doesn't explicitly state when to use this tool versus alternatives like discord_get_messages_advanced. It provides no guidance on prerequisites (e.g., channel access) or exclusions, leaving usage context partially inferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_get_messagesC
Retrieve messages from a Discord channel
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | Discord channel ID | |
| limit | No | Number of messages to retrieve (default: 10, max: 100) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Retrieve' implies a read-only operation, it doesn't specify important behavioral traits like rate limits, authentication requirements, pagination behavior, or what happens when the limit exceeds available messages. The description lacks crucial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple retrieval tool and gets straight to the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (message objects, error conditions), behavioral constraints, or how it differs from the 'advanced' sibling tool. Given the complexity of Discord API interactions, more contextual information would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, thoroughly documenting both parameters with their types, constraints, and purposes. The description doesn't add any meaningful parameter information beyond what the schema already provides, so it meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Retrieve') and resource ('messages from a Discord channel'), making the purpose unambiguous. However, it doesn't distinguish this tool from its sibling 'discord_get_messages_advanced', which appears to serve a similar function with potentially different capabilities.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'discord_get_messages_advanced'. It doesn't mention prerequisites (e.g., needing channel access) or contextual factors that would help an agent choose between this and sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_get_messages_advancedC
Advanced message retrieval with date range, keyword search, and pagination
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | Discord channel ID | |
| limit | No | Number of messages per page (default: 50, max: 100) | |
| before | No | Get messages before this message ID (for pagination) | |
| after | No | Get messages after this message ID (for pagination) | |
| start_date | No | Start date in ISO format (e.g., 2024-01-01T00:00:00Z) | |
| end_date | No | End date in ISO format (e.g., 2024-12-31T23:59:59Z) | |
| keyword | No | Keyword to search in message content | |
| author | No | Filter by author username or ID | |
| has_attachments | No | Only get messages with attachments |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions the tool's capabilities (date range, keyword search, pagination), it doesn't describe important behavioral aspects like rate limits, authentication requirements, error conditions, or what the response format looks like. For a read operation with multiple parameters, this leaves significant gaps in understanding how the tool behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence that efficiently communicates the core capabilities. Every word earns its place, and it's front-loaded with the most important information about what makes this tool 'advanced'.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 9 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain return values, error handling, or important behavioral constraints. While the schema covers parameter documentation well, the description fails to provide the contextual understanding needed for effective tool selection and use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description mentions 'date range, keyword search, and pagination' which maps to some parameters (start_date, end_date, keyword, before/after). However, with 100% schema description coverage, the schema already documents all 9 parameters thoroughly. The description adds minimal value beyond what's already in the structured schema, meeting the baseline expectation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as 'Advanced message retrieval with date range, keyword search, and pagination', which specifies the verb (retrieval) and resource (messages) along with key capabilities. However, it doesn't explicitly differentiate from its sibling 'discord_get_messages', leaving some ambiguity about what makes this 'advanced' version distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose this over the simpler 'discord_get_messages' sibling, nor any context about prerequisites or typical use cases for these advanced filtering capabilities.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_send_fileC
Send any type of file to a Discord channel (images, videos, audio, documents, etc.)
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | Discord channel ID | |
| file_path | Yes | Local path to the file | |
| message | No | Optional message to accompany the file | |
| filename | No | Optional custom filename for the attachment (if not provided, uses the original filename) | |
| spoiler | No | Mark the file as spoiler (default: false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool sends files but doesn't mention permissions required, rate limits, file size restrictions, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with the core action, efficiently lists file types without redundancy. Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical behavioral details (e.g., permissions, limits, response format) and usage context, leaving significant gaps for an AI agent to operate safely and effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no parameter-specific information beyond implying file types, which is already covered by the tool's purpose. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('send') and resource ('any type of file to a Discord channel'), with examples of file types. It distinguishes from sibling tools like discord_send_message (which sends text) by specifying files, but doesn't explicitly contrast with discord_get_attachments (which retrieves files).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like discord_send_message (for text) or discord_get_attachments (for retrieving files). The description implies usage for sending files but lacks context about prerequisites, limitations, or specific scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_send_messageC
Send a text message to a Discord channel
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | Discord channel ID | |
| message | Yes | Message content to send |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Send' implies a write operation, the description doesn't disclose important behavioral traits: whether this requires specific Discord permissions, rate limits, message length constraints, formatting options, or what happens on failure. It mentions nothing about the response format or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise at just 7 words, front-loading the essential information with zero wasted words. Every element ('Send', 'text message', 'Discord channel') earns its place by contributing to understanding the tool's purpose without redundancy or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address what the tool returns, error conditions, authentication requirements, or operational constraints. While the purpose is clear, the lack of behavioral and output information leaves significant gaps for an AI agent trying to use this tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with both parameters clearly documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema - it doesn't explain channel_id format requirements, message content restrictions, or provide examples. The baseline score of 3 reflects adequate parameter documentation coming entirely from the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Send a text message') and target resource ('to a Discord channel'), making the purpose immediately understandable. It distinguishes from sibling tools like discord_send_file by specifying 'text message' rather than file attachment. However, it doesn't explicitly contrast with discord_get_messages or other siblings beyond the verb difference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose discord_send_message over discord_send_file for different content types, or how it relates to the get_messages tools. There's no information about prerequisites, permissions needed, or contextual constraints for sending messages.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v1.0.0- First observed
discord_get_attachments - First observed
discord_get_messages - First observed
discord_get_messages_advanced - First observed
discord_send_file - First observed
discord_send_message
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
Messaging tools for AI agents: send messages, manage chats, groups and channels.
Telegram: FASTEST real time Telegram API. Retrieve channel's info and messages in milliseconds..
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables LLMs to interact with Discord channels by sending and reading messages through Discord's API, with a focus on maintaining user control and security.37227MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Discord servers through a bot, supporting channel management, messaging, forum operations, reactions, and webhooks.22400MIT
- FlicenseNot gradedqualityCmaintenanceEnables interaction with Discord through natural language, including reading and sending messages, managing servers, and user actions.-
- 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.61MIT