discord-webhook-mcp-server

LLMTooling/discord-webhook-mcp-server

3.2

If you are the rightful owner of discord-webhook-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Discord Webhook MCP is a Model Context Protocol server designed for sending messages and rich embeds to Discord via webhooks, utilizing TypeScript and the official MCP SDK.

Tools
3
Resources
0
Prompts
0

Discord Webhook MCP

Model Context Protocol server for Discord Webhooks

Overview

Enables LLMs to send messages and rich embeds to Discord via webhooks. Built with TypeScript and the official MCP SDK, it provides a simple, type-safe interface for sending plain text messages, formatted embeds with images and fields, and customizing webhook appearance. Perfect for AI-powered Discord notifications, monitoring, and integrations.

Core Features

FeatureDescriptionUse Case
Simple MessagesSend plain text messages up to 2000 charactersQuick notifications, status updates
Rich EmbedsBeautiful formatted messages with titles, descriptions, colors, imagesStructured data, announcements, alerts
Custom FieldsAdd up to 25 name-value pairs with inline or block layoutData tables, metrics, lists
Images & ThumbnailsAttach images and thumbnails to embedsVisual content, branding
TimestampsAutomatic or custom timestamps on embedsEvent tracking, logs
CustomizationOverride webhook username and avatar per messageMulti-bot appearance, personalization
ValidationComprehensive input validation and error handlingReliability, debugging

MCP Tools

The server exposes three tools through the Model Context Protocol interface.

ToolDescriptionRequired Parameters
send_messageSend a simple text message to Discordcontent
send_embedSend a rich embed with title, description, colors, images, and moreNone (at least one embed field required)
send_embed_with_fieldsSend an embed with custom fields for structured data displayfields

Tool Parameters

send_message

ParameterTypeRequiredDescription
contentstringYesMessage content (max 2000 characters)
usernamestringNoOverride webhook username
avatar_urlstringNoOverride webhook avatar URL

send_embed

ParameterTypeDescription
contentstringOptional message content above the embed
titlestringEmbed title (max 256 characters)
descriptionstringEmbed description (max 4096 characters)
urlstringURL that the title will link to
colorstringColor as hex (#FF0000), named (red, blue, green, yellow, orange, purple, pink, blurple), or decimal
timestampbooleanAdd current timestamp to embed
footer_textstringFooter text (max 2048 characters)
footer_iconstringFooter icon URL
image_urlstringLarge image URL displayed in embed
thumbnail_urlstringSmall thumbnail URL (top right)
author_namestringAuthor name (max 256 characters)
author_urlstringAuthor URL (makes name clickable)
author_iconstringAuthor icon URL
usernamestringOverride webhook username
avatar_urlstringOverride webhook avatar URL

send_embed_with_fields

ParameterTypeRequiredDescription
fieldsarrayYesArray of field objects (max 25 fields)
Each field object contains:
- namestringYesField name (max 256 characters)
- valuestringYesField value (max 1024 characters)
- inlinebooleanNoDisplay inline (default: false)
All send_embed parameters are also supported

Embed Colors

FormatExampleResult
Hex#FF0000Red
Namedred, blue, green, yellow, orange, purple, pink, blurple, white, black, grayPredefined colors
Decimal16711680Red

Discord Limits

ItemMaximum
Message content2000 characters
Embed title256 characters
Embed description4096 characters
Field name256 characters
Field value1024 characters
Footer text2048 characters
Author name256 characters
Fields per embed25 fields
Total embed characters6000 characters
Embeds per message10 embeds
Webhook rate limit30 requests/minute

Installation

StepInstructions
Prerequisites Node.js 18.0.0 or higher
A Discord webhook URL
Getting Webhook URL 1. Open your Discord server
2. Go to Server Settings → Integrations → Webhooks
3. Click "New Webhook" or select an existing one
4. Copy the webhook URL
5. The URL format should be: https://discord.com/api/webhooks/{id}/{token}
Install Dependenciesnpm install
Configure Environment Create a .env file in the project root:
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN
Build the Projectnpm run build

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "discord-webhook": {
      "command": "node",
      "args": ["/path/to/discord-webhook-mcp/dist/index.js"],
      "env": {
        "DISCORD_WEBHOOK_URL": "https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN"
      }
    }
  }
}

Other MCP Clients

The server runs on stdio transport and can be used with any MCP-compatible client. Ensure the DISCORD_WEBHOOK_URL environment variable is set.

Development

Project Structure

DirectoryDescription
src/discord/Discord API integration (webhook client, embed builder, types)
src/tools/MCP tool implementations (send-message, send-embed, send-embed-fields)
src/utils/Utility functions (environment validation, custom errors)
src/index.tsMain MCP server entry point
tests/Comprehensive test suite with 80%+ coverage

Development Commands

CommandDescription
npm installInstall dependencies
npm run devRun in development mode
npm run watchWatch for changes
npm run buildBuild for production
npm testRun tests
npm run test:watchRun tests in watch mode
npm run test:coverageGenerate coverage report
npm run typecheckType check
npm run lintLint code
npm run lint:fixFix lint issues