MCP-Discordのロゴ

MCP-Discord

コミュニティ
barryyip0625

Implement Discord MCP server enabling AI assistants to interact with the Discord platform.

公開者barryyip0625
リポジトリmcp-discord
言語TypeScript
フォーク
68
スター
105
利用可能なツール
22
通信方式stdio, streamable-http
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    MCP-Discordは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 22個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには105件のスターと68件のフォークがあります。

MCP-Discord

MCP Toplist Docker Hub

A Discord MCP (Model Context Protocol) server that enables AI assistants to interact with the Discord platform.

Overview

MCP-Discord provides the following Discord-related functionalities:

  • Login to Discord bot
  • List servers the bot is a member of
  • Get server information
  • List members and inspect member details
  • List, create, edit, delete, assign, and remove roles
  • Search messages in a server
  • Read, edit, and delete channel messages
  • Send messages to specified channels
  • Retrieve forum channel lists
  • Create, update, delete, and reply to forum posts
  • List forum threads and manage forum tags
  • Create, edit, and delete text, forum, voice channels, and categories
  • Set and remove channel permission overrides
  • Add/remove message reactions
  • Create/edit/delete/use webhooks

Table of Contents

Prerequisites

Note:
According to Discord's security model, a bot can only access information from servers it has been explicitly added to.
If you want to use this MCP server to access a specific Discord server, you must add the bot to that server first.
Use the invite link below to add the bot to your target server.

Installation

Installing via NPM

You can use it with the following command:

bash
npx mcp-discord --config ${DISCORD_TOKEN}

For more details, you can check out the NPM Package.

Installing via Smithery

To install mcp-discord automatically via Smithery

Installing via Docker

You can run mcp-discord using Docker. The Docker images are automatically built and published to Docker Hub.

Docker Hub Repository: barryy625/mcp-discord

Docker uses the streamable HTTP server by default via build/app.js.

bash
# Pull the latest image
docker pull barryy625/mcp-discord:latest

# Run HTTP server on port 8080
docker run -e DISCORD_TOKEN=your_discord_bot_token -p 8080:8080 barryy625/mcp-discord:latest

# Override the listening port if needed
docker run -e DISCORD_TOKEN=your_discord_bot_token -p 3000:3000 barryy625/mcp-discord:latest --transport http --port 3000

Available Tags:

  • latest - Latest stable version from main branch
  • v1.3.8, etc. - Specific version releases

Manual Installation

bash
# Clone the repository
git clone https://github.com/barryyip0625/mcp-discord.git
cd mcp-discord

# Install dependencies
npm install

# Compile TypeScript
npm run build

Configuration

A Discord bot token is required for proper operation. The server supports two transport methods: stdio and streamable HTTP.

Transport Methods

  1. stdio (Default)

    • Traditional stdio transport for basic usage
    • Suitable for simple integrations
  2. streamable HTTP

    • HTTP-based transport for more advanced scenarios
    • Supports stateless operation
    • Configurable port number

Configuration Options

You can provide configuration in two ways:

  1. Environment variables:
bash
DISCORD_TOKEN=your_discord_bot_token
  1. Using command line arguments:
bash
# For stdio transport (default)
node build/index.js --config "your_discord_bot_token"

# For streamable HTTP transport
node build/app.js --transport http --port 3000 --config "your_discord_bot_token"

Usage with Claude/Cursor

1. Use Stdio Transport with Claude/Cursor

Use build/index.js when your MCP client expects a command-based stdio server.

Claude Desktop / Claude Code

json
{
    "mcpServers": {
        "discord": {
            "command": "node",
            "args": [
                "path/to/mcp-discord/build/index.js"
            ],
            "env": {
                "DISCORD_TOKEN": "your_discord_bot_token"
            }
        }
    }
}

Cursor

json
{
    "mcpServers": {
        "discord": {
            "command": "node",
            "args": [
                "path/to/mcp-discord/build/index.js"
            ],
            "env": {
                "DISCORD_TOKEN": "your_discord_bot_token"
            }
        }
    }
}

This is the recommended setup for local command-based MCP clients.

2. Self-Host the Streamable HTTP Server

Use build/app.js when you want to run mcp-discord as an HTTP MCP server.

Run with Node.js

bash
DISCORD_TOKEN=your_discord_bot_token node build/app.js --transport http --port 3000

On Windows PowerShell:

powershell
$env:DISCORD_TOKEN="your_discord_bot_token"
node build/app.js --transport http --port 3000

Run with Docker

bash
docker run -e DISCORD_TOKEN=your_discord_bot_token -p 3000:3000 barryy625/mcp-discord:latest --transport http --port 3000

Once started, the MCP HTTP endpoint is:

text
http://localhost:3000/mcp

3. Connect to a Hosted HTTP MCP Server

If you already host mcp-discord elsewhere, point your MCP client at the server's /mcp endpoint instead of launching build/app.js as a command.

Example endpoint:

text
https://your-server.example.com/mcp

Important notes:

  • build/app.js starts an HTTP server. It does not speak stdio.
  • build/index.js is the correct entrypoint for command-based stdio MCP clients.
  • For hosted HTTP usage, configure your MCP client to connect to the HTTP endpoint URL provided by your deployment.
  • The exact HTTP-client configuration format depends on the MCP client you use.

Tools Documentation

Basic Functions

  • discord_login: Login to Discord using the configured token
  • discord_list_servers: List all Discord servers the bot is a member of
  • discord_send: Send a message to a specified channel
  • discord_get_server_info: Get Discord server information

Channel Management

  • discord_create_text_channel: Create a text channel
  • discord_create_forum_channel: Create a forum channel
  • discord_create_voice_channel: Create a voice channel
  • discord_edit_channel: Edit a channel name, topic, parent category, or position
  • discord_delete_channel: Delete a channel
  • discord_create_category: Create a channel category
  • discord_edit_category: Edit a channel category
  • discord_delete_category: Delete a channel category
  • discord_set_channel_permissions: Set permission overrides for a role or user on a channel/category
  • discord_remove_channel_permissions: Remove permission overrides from a channel/category

Forum Functions

  • discord_get_forum_channels: Get a list of forum channels
  • discord_create_forum_post: Create a forum post (optionally pinned to the top of the channel)
  • discord_get_forum_post: Get a forum post
  • discord_list_forum_threads: List active and archived threads in a forum channel
  • discord_reply_to_forum: Reply to a forum post
  • discord_get_forum_tags: Get all available tags for a forum channel
  • discord_set_forum_tags: Replace the available tags for a forum channel
  • discord_update_forum_post: Update a forum post's title, tags, archived state, locked state, or pinned state
  • discord_delete_forum_post: Delete a forum post

Messages and Reactions

  • discord_search_messages: Search messages in a server
  • discord_read_messages: Read channel messages (supports before, after, around params — accepts snowflake IDs or ISO 8601 dates like "2025-03-01T00:00:00Z")
  • discord_edit_message: Edit a bot-authored message
  • discord_add_reaction: Add a reaction to a message
  • discord_add_multiple_reactions: Add multiple reactions to a message
  • discord_remove_reaction: Remove a reaction from a message
  • discord_delete_message: Delete a specific message from a channel
  • discord_pin_message: Pin a message to its channel (max 50 pins per channel)
  • discord_unpin_message: Remove a message from its channel's pinned messages
  • discord_list_pinned_messages: List a channel's pinned messages, newest pin first

Webhook Management

  • discord_create_webhook: Creates a new webhook for a Discord channel
  • discord_send_webhook_message: Sends a message to a Discord channel using a webhook
  • discord_edit_webhook: Edits an existing webhook for a Discord channel
  • discord_delete_webhook: Deletes an existing webhook for a Discord channel

Role Management

  • discord_list_roles: List all roles in a server
  • discord_create_role: Create a role with color, hoist, mentionable, and permission options
  • discord_edit_role: Edit an existing role
  • discord_delete_role: Delete a role
  • discord_assign_role: Assign a role to a member
  • discord_remove_role: Remove a role from a member

Member Management

  • discord_list_members: List members in a server with roles
  • discord_get_member: Get detailed information about a specific member

Development

bash
# Development mode
npm run dev

License

MIT License

インストール

TypingMind
{
  "mcpServers": {
    "mcp-discord": {
      "command": "node",
      "args": [
        "path/to/mcp-discord/build/index.js",
        "--config",
        "{{config.DISCORD_TOKEN}}"
      ],
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>"
      }
    }
  }
}

利用可能なツール

  • discord_create_category

    Creates a new category in a Discord server.

  • discord_edit_category

    Edits an existing Discord category (name and position).

  • discord_delete_category

    Deletes a Discord category by ID.

  • discord_login

    Logs in to Discord using the configured token

  • discord_send

    Sends a message to a specified Discord text channel

  • discord_get_forum_channels

    Lists all forum channels in a specified Discord server (guild)

  • discord_create_forum_post

    Creates a new post in a Discord forum channel with optional tags

  • discord_get_forum_post

    Retrieves details about a forum post including its messages

  • discord_reply_to_forum

    Adds a reply to an existing forum post or thread

  • discord_create_text_channel

    Creates a new text channel in a Discord server with an optional topic

  • discord_delete_channel

    Deletes a Discord channel with an optional reason

  • discord_read_messages

    Retrieves messages from a Discord text channel with a configurable limit

  • discord_get_server_info

    Retrieves detailed information about a Discord server including channels and member count

  • discord_add_reaction

    Adds an emoji reaction to a specific Discord message

  • discord_add_multiple_reactions

    Adds multiple emoji reactions to a Discord message at once

  • discord_remove_reaction

    Removes a specific emoji reaction from a Discord message

  • discord_delete_forum_post

    Deletes a forum post or thread with an optional reason

  • discord_delete_message

    Deletes a specific message from a Discord text channel

  • discord_create_webhook

    Creates a new webhook for a Discord channel

  • discord_send_webhook_message

    Sends a message to a Discord channel using a webhook

  • discord_edit_webhook

    Edits an existing webhook for a Discord channel

  • discord_delete_webhook

    Deletes an existing webhook for a Discord channel

MCP-DiscordのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度MCP-Discordに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 お使いのデバイス上でMCPをローカル実行することも、リモートMCPサーバーのURLに接続することもできます。

方法1:ローカルコネクタを使用

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

MCP-Discordをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. MCP-DiscordのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "mcp-discord": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-discord"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてMCP-DiscordのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. MCP-DiscordのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
MCP-Discordを使ってこのタスクを手伝ってもらえますか?
MCP-Discord
はい、読みました。
MCP-Discordで調べた結果をお伝えします。

方法2:MCPサーバーのURLを追加

MCP-Discordがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にプロバイダーから提供されたMCPサーバーのURLを貼り付けてください。
  2. MCP-Discordの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. MCP-Discordの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でMCP-Discordのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でMCP-Discordのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
MCP-Discordを使ってこのタスクを手伝ってもらえますか?
MCP-Discord
はい、読みました。
MCP-Discordで調べた結果をお伝えします。

よくある質問

MCP-Discord MCPサーバーは何に使いますか?

MCP-Discordは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでMCP-Discord MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでMCP-Discordを利用できます。

TypingMindでMCP-Discord MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。MCP-Discordを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

MCP-Discord MCPをTypingMindに接続するにはどうすればよいですか?

MCP-Discordは、ローカルMCPコネクタを使うか、リモートMCPサーバーのURLを追加することでTypingMindに接続できます。サーバーがデバイス上のファイル、アプリ、プライベートリソースにアクセスする必要がある場合はローカルコネクタを、MCPサーバーがリモートでホストされている場合はサーバーURLを使用してください。

TypingMindでMCP-Discord MCPのどのようなツールを利用できますか?

MCP-Discordは22個のMCPツールを提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

MCP-Discord MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。MCP-Discordで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇