Skip to main content
Glama

Discord MCP Server

by v-3

Discord MCP サーバー

モデルコンテキストプロトコル(MCP)サーバーは、LLMがDiscordチャンネルとやり取りできるようにし、Discord APIを介してメッセージの送受信を可能にします。このサーバーを使用することで、ClaudeのようなLLMは、ユーザーの制御とセキュリティを維持しながら、Discordチャンネルと直接やり取りすることができます。

特徴

  • Discordチャンネルにメッセージを送信する
  • チャンネルからの最近のメッセージを読む
  • 自動サーバーおよびチャンネル検出
  • チャンネル名とIDの両方をサポート
  • 適切なエラー処理と検証

前提条件

  • Node.js 16.x 以上
  • Discordボットトークン
  • ボットは適切な権限でサーバーに招待される必要があります:
    • メッセージを読む/チャンネルを表示する
    • メッセージを送信
    • メッセージ履歴を読む

設定

  1. このリポジトリをクローンします:
git clone https://github.com/yourusername/discordmcp.git cd discordmcp
  1. 依存関係をインストールします:
npm install
  1. Discord ボット トークンを使用して、ルート ディレクトリに.envファイルを作成します。
DISCORD_TOKEN=your_discord_bot_token_here
  1. サーバーを構築します。
npm run build

Claude for Desktop での使用

  1. Claude for Desktop の構成ファイルを開きます。
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Discord MCP サーバー構成を追加します。
{ "mcpServers": { "discord": { "command": "node", "args": ["path/to/discordmcp/build/index.js"], "env": { "DISCORD_TOKEN": "your_discord_bot_token_here" } } } }
  1. デスクトップ版のClaudeを再起動

利用可能なツール

メッセージを送信

指定された Discord チャネルにメッセージを送信します。

パラメータ:

  • server (オプション): サーバー名またはID (ボットが複数のサーバーにある場合は必須)
  • channel : チャンネル名(例:"general")またはID
  • message : 送信するメッセージの内容

例:

{ "channel": "general", "message": "Hello from MCP!" }

既読メッセージ

指定された Discord チャンネルから最近のメッセージを読み取ります。

パラメータ:

  • server (オプション): サーバー名またはID (ボットが複数のサーバーにある場合は必須)
  • channel : チャンネル名(例:"general")またはID
  • limit (オプション): 取得するメッセージの数 (デフォルト: 50、最大: 100)

例:

{ "channel": "general", "limit": 10 }

発達

  1. 開発依存関係をインストールします。
npm install --save-dev typescript @types/node
  1. 開発モードでサーバーを起動します。
npm run dev

テスト

MCP Inspector を使用してサーバーをテストできます。

npx @modelcontextprotocol/inspector node build/index.js

Discord MCP サーバーを設定した後、Claude と試すことができるやり取りの例をいくつか示します。

  1. 「一般チャンネルからの最後の 5 つのメッセージを読んでいただけますか?」
  2. 「『会議は10分後に始まります』というメッセージをアナウンスチャンネルに送信してください」
  3. 「最新リリースに関する開発チャネルでの最新のメッセージは何でしたか?」

クロードは適切なツールを使用して Discord とやり取りし、メッセージを送信する前にあなたの承認を求めます。

セキュリティに関する考慮事項

  • ボットが機能するには適切なDiscord権限が必要です
  • すべてのメッセージ送信操作には明示的なユーザー承認が必要です
  • 環境変数は適切に保護する必要がある
  • トークンはバージョン管理にコミットしてはならない
  • チャンネルへのアクセスは、ボットがアクセスを許可されたチャンネルに制限されます

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成します( git checkout -b feature/amazing-feature
  3. 変更をコミットします ( git commit -m 'Add some amazing feature' )
  4. ブランチにプッシュする ( git push origin feature/amazing-feature )
  5. プルリクエストを開く

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

サポート

問題が発生した場合や質問がある場合は、次の手順に従ってください。

  1. GitHubのIssuesセクションを確認してください
  2. MCP ドキュメントについては、https://modelcontextprotocol.ioを参照してください。
  3. 詳細な再現手順を記載した新しい問題を開く
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

ユーザー制御とセキュリティの維持に重点を置き、Discord の API を介してメッセージを送受信することで、LLM が Discord チャンネルと対話できるようにします。

  1. 特徴
    1. 前提条件
      1. 設定
        1. Claude for Desktop での使用
          1. 利用可能なツール
            1. メッセージを送信
            2. 既読メッセージ
          2. 発達
            1. テスト
                1. セキュリティに関する考慮事項
                  1. 貢献
                    1. ライセンス
                      1. サポート

                        Related MCP Servers

                        • A
                          security
                          A
                          license
                          A
                          quality
                          Enables direct interaction with the Discord API using both REST API calls and slash command syntax for bot management, server configuration, and message operations.
                          Last updated -
                          1
                          5
                          Python
                          MIT License
                        • -
                          security
                          F
                          license
                          -
                          quality
                          This server allows integration with Discord, enabling message exchanges between Claude and a Discord channel using prompts and notifications.
                          Last updated -
                          TypeScript
                        • A
                          security
                          F
                          license
                          A
                          quality
                          Provides access to Intercom conversations and chats through the Model Context Protocol, allowing LLMs to query and analyze Intercom conversations with various filtering options.
                          Last updated -
                          2
                          3
                          TypeScript
                          • Apple
                        • -
                          security
                          F
                          license
                          -
                          quality
                          An MCP server that enables LLMs to access Slack's search functionality to retrieve users, channels, messages, and thread replies from a Slack workspace.
                          Last updated -
                          TypeScript

                        View all related MCP servers

                        MCP directory API

                        We provide all the information about MCP servers via our MCP API.

                        curl -X GET 'https://glama.ai/api/mcp/v1/servers/v-3/discordmcp'

                        If you have feedback or need assistance with the MCP directory API, please join our Discord server