Discord MCP Server
Discord MCP サーバー
モデルコンテキストプロトコル(MCP)サーバーは、LLMがDiscordチャンネルとやり取りできるようにし、Discord APIを介してメッセージの送受信を可能にします。このサーバーを使用することで、ClaudeのようなLLMは、ユーザーの制御とセキュリティを維持しながら、Discordチャンネルと直接やり取りすることができます。
特徴
Discordチャンネルにメッセージを送信する
チャンネルからの最近のメッセージを読む
自動サーバーおよびチャンネル検出
チャンネル名とIDの両方をサポート
適切なエラー処理と検証
Related MCP server: Discord MCP Server
前提条件
Node.js 16.x 以上
Discordボットトークン
ボットは適切な権限でサーバーに招待される必要があります:
メッセージを読む/チャンネルを表示する
メッセージを送信
メッセージ履歴を読む
設定
このリポジトリをクローンします:
git clone https://github.com/yourusername/discordmcp.git
cd discordmcp依存関係をインストールします:
npm installDiscord ボット トークンを使用して、ルート ディレクトリに
.envファイルを作成します。
DISCORD_TOKEN=your_discord_bot_token_hereサーバーを構築します。
npm run buildClaude for Desktop での使用
Claude for Desktop の構成ファイルを開きます。
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Discord MCP サーバー構成を追加します。
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["path/to/discordmcp/build/index.js"],
"env": {
"DISCORD_TOKEN": "your_discord_bot_token_here"
}
}
}
}デスクトップ版のClaudeを再起動
利用可能なツール
メッセージを送信
指定された Discord チャネルにメッセージを送信します。
パラメータ:
server(オプション): サーバー名またはID (ボットが複数のサーバーにある場合は必須)channel: チャンネル名(例:"general")またはIDmessage: 送信するメッセージの内容
例:
{
"channel": "general",
"message": "Hello from MCP!"
}既読メッセージ
指定された Discord チャンネルから最近のメッセージを読み取ります。
パラメータ:
server(オプション): サーバー名またはID (ボットが複数のサーバーにある場合は必須)channel: チャンネル名(例:"general")またはIDlimit(オプション): 取得するメッセージの数 (デフォルト: 50、最大: 100)
例:
{
"channel": "general",
"limit": 10
}発達
開発依存関係をインストールします。
npm install --save-dev typescript @types/node開発モードでサーバーを起動します。
npm run devテスト
MCP Inspector を使用してサーバーをテストできます。
npx @modelcontextprotocol/inspector node build/index.js例
Discord MCP サーバーを設定した後、Claude と試すことができるやり取りの例をいくつか示します。
「一般チャンネルからの最後の 5 つのメッセージを読んでいただけますか?」
「『会議は10分後に始まります』というメッセージをアナウンスチャンネルに送信してください」
「最新リリースに関する開発チャネルでの最新のメッセージは何でしたか?」
クロードは適切なツールを使用して Discord とやり取りし、メッセージを送信する前にあなたの承認を求めます。
セキュリティに関する考慮事項
ボットが機能するには適切なDiscord権限が必要です
すべてのメッセージ送信操作には明示的なユーザー承認が必要です
環境変数は適切に保護する必要がある
トークンはバージョン管理にコミットしてはならない
チャンネルへのアクセスは、ボットがアクセスを許可されたチャンネルに制限されます
貢献
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
サポート
問題が発生した場合や質問がある場合は、次の手順に従ってください。
GitHubのIssuesセクションを確認してください
MCP ドキュメントについては、https://modelcontextprotocol.ioを参照してください。
詳細な再現手順を記載した新しい問題を開く
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Publish and schedule Discord server posts from your AI assistant.
Read Discord channels, threads and message history from an AI assistant via a read-only bot.
1Read servers, channels, messages and pins; post messages as a bot in Discord.
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
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables interaction with Discord through natural language, including reading and sending messages, managing servers, and user actions.-
- AlicenseNot gradedqualityCmaintenanceEnables 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.23 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to send and read messages in Discord channels, manage servers, channels, and roles via Discord's API.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to read and write Discord messages, search content, and compute channel statistics via a Discord bot.MIT