Skip to main content
Glama
Discord Webhook MCP

Discord Webhook MCP

by kongyo2

Discord Webhook MCP

Discord Webhook を使用してメッセージの送信、編集、削除を行う Model Context Protocol (MCP) サーバーです。

特徴

  • メッセージ送信 - テキスト、Embed、スレッド対応

  • メッセージ編集 - 送信済みメッセージの内容を更新

  • メッセージ削除 - 送信済みメッセージを削除

  • Zod バリデーション - 入力パラメータの厳密な検証

Related MCP server: MCP-Discord

使用方法

MCP設定

MCP対応クライアント(例: Gemini CLI)の設定ファイルに以下を追加:

{
  "mcpServers": {
    "discord-mcp": {
      "command": "npx",
      "args": ["-y", "@kongyo2/discord-webhook-mcp"],
      "env": {
        "DISCORD_WEBHOOK_URL": "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"
      }
    }
  }
}

環境変数

変数名

必須

説明

DISCORD_WEBHOOK_URL

✅

Discord Webhook URL

ツール一覧

discord_send_message

メッセージを送信します。

{
  "content": "Hello, Discord!",
  "embeds": [
    {
      "title": "タイトル",
      "description": "説明文",
      "color": 65280
    }
  ]
}

discord_edit_message

送信済みメッセージを編集します。

{
  "message_id": "123456789",
  "content": "更新後のメッセージ"
}

discord_delete_message

送信済みメッセージを削除します。

{
  "message_id": "123456789"
}

制限事項

  • レート制限: 30メッセージ/分/チャンネル

  • メッセージ本文: 最大2000文字

  • Embed: 最大10個、合計6000文字以内

開発

# 依存関係のインストール
npm install

# 開発モード
npm run dev

# ビルド
npm run build

# Lint
npm run lint

ライセンス

MIT

Available Tools

3 tools
discord_delete_messageDelete Discord MessageA
DestructiveIdempotent

Webhookで送信したメッセージを削除します。

環境変数DISCORD_WEBHOOK_URLに設定されたWebhookを使用します。

⚠️ レート制限: 30リクエスト/分/チャンネル ⚠️ この操作は取り消せません。

Args:

  • message_id (string, required): 削除するメッセージID

Returns: { "success": boolean, // 削除が成功したか "message_id": string // 削除されたメッセージのID }

Examples:

  • メッセージ削除: { "message_id": "123456789" }

Error Handling:

  • "Discord Webhook error: 404 Not Found - Message not found"

  • "Discord Webhook error: 400 Bad Request - Invalid message ID"

  • "Discord Webhook error: レート制限に達しました" - 429エラー時、retry-after秒後に再試行

Inputs: message_id (required).

discord_edit_messageEdit Discord MessageA
Idempotent

Webhookで送信したメッセージを編集します。

content、embedsのいずれか最低1つが必要です。 環境変数DISCORD_WEBHOOK_URLに設定されたWebhookを使用します。

⚠️ レート制限: 30リクエスト/分/チャンネル

Args:

  • message_id (string, required): 編集するメッセージID

  • content (string, optional): 新しいメッセージ内容(1-2000文字)

  • embeds (array, optional): 新しいEmbedの配列(最大10個、合計6000文字以内)

  • allowed_mentions (object, optional): 許可されたメンション設定

Returns: { "success": boolean, // 編集が成功したか "message_id": string, // 編集されたメッセージのID "timestamp": string // 編集日時 (ISO 8601形式) }

Examples:

  • テキストを編集: { "message_id": "123456789", "content": "更新後のメッセージ" }

  • Embedを編集: { "message_id": "123456789", "embeds": [{ "title": "新しいタイトル", "color": 0xFF0000 }] }

Error Handling:

  • "Validation error: content/embeds - content、embeds のうち最低1つを指定してください"

  • "Discord Webhook error: 404 Not Found - Message not found"

  • "Discord Webhook error: 400 Bad Request - Invalid message ID"

  • "Discord Webhook error: レート制限に達しました" - 429エラー時、retry-after秒後に再試行

Inputs: message_id (required), content, embeds, allowed_mentions.

discord_send_messageSend Discord MessageA

Discordチャンネルにメッセージを送信します。

content、embedsのいずれか最低1つが必要です。 環境変数DISCORD_WEBHOOK_URLに設定されたWebhookを使用します。

⚠️ レート制限: 30メッセージ/分/チャンネル

Args:

  • content (string, optional): メッセージ内容(1-2000文字)

  • username (string, optional): Webhookのユーザー名を上書き(最大80文字)

  • avatar_url (string, optional): Webhookのアバター画像をURLで指定

  • tts (boolean, optional): テキスト読み上げ(TTS)メッセージとして送信(デフォルト: false)

  • embeds (array, optional): Embedの配列(最大10個、合計6000文字以内)

  • allowed_mentions (object, optional): 許可されたメンション設定

  • thread_id (string, optional): 送信先スレッドID(指定したスレッドに送信、スレッドは自動アーカイブ解除)

  • thread_name (string, optional): 作成するスレッド名(フォーラム/メディアチャンネルのみで新しいスレッドを作成、最大100文字)

Returns: { "success": boolean, // 送信が成功したか "message_id": string, // 送信されたメッセージのID "channel_id": string, // 送信先チャンネルID "timestamp": string // 送信日時 (ISO 8601形式) }

Examples:

  • シンプルなテキスト送信: { "content": "Hello, Discord!" }

  • Embed付き送信: { "embeds": [{ "title": "タイトル", "description": "説明", "color": 0x00FF00 }] }

  • スレッドに送信: { "content": "スレッドメッセージ", "thread_id": "123456789" }

Error Handling:

  • "Validation error: content/embeds - content、embeds のうち最低1つを指定してください"

  • "Discord Webhook error: 400 Bad Request - Invalid webhook URL"

  • "Discord Webhook error: 404 Not Found - Webhook not found"

  • "Discord Webhook error: レート制限に達しました" - 429エラー時、retry-after秒後に再試行

Inputs: content, username, avatar_url, tts, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 3 tools

    Disambiguation5/5

    The three tools have clearly distinct purposes: send, edit, and delete. There is no overlap or ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent pattern: 'discord_verb_noun' (discord_send_message, discord_edit_message, discord_delete_message).

    Tool Count5/5

    Three tools cover the essential lifecycle for webhook messages (send, edit, delete) without unnecessary extras. The scope is well-scoped.

    Completeness4/5

    Covers all core operations for webhook messages. Minor gap: no tool to retrieve or list messages, but webhooks typically don't support listing, so it's acceptable.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      maintenance
      A Discord Model Context Protocol server that enables AI assistants to interact with Discord, providing functionality for sending messages, managing channels, handling forum posts, and working with reactions.
      46
      827 npm
      111
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Discord Model Context Protocol server that enables AI assistants to interact with Discord by sending messages, managing channels, handling forum posts, managing webhooks, and processing reactions.
      22
      84 npm
      5
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables interaction with Discord through the Model Context Protocol, providing access to all Discord features like channels, messages, threads, reactions, and roles. Supports secure Discord bot operations with rate limiting, caching, and comprehensive API coverage for OpenAI, LangChain, and other MCP clients.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Model Context Protocol server that enables interaction with Discord for channel management, message searching, and automated communication. It features enterprise-grade security with multi-tenant authentication, rate limiting, and real-time monitoring via a built-in inspector dashboard.
      19 npm
      MIT