Discord Notification MCP Server

by kstonekuan

8 388 downloads Not rated yet MIT
GitHub

About

Simple MCP server to send you notifications on discord

Details

License
MIT

Explore

- πŸ€– MCP Tool: Provides a send_discord_message tool for sending notifications
- πŸš€ Cloudflare Workers: Runs serverless with global distribution
- πŸ” Secure: Uses Cloudflare secrets for credentials
- 🌐 Dual Transport: Supports both SSE and Streamable HTTP for maximum compatibility
- πŸ’Ύ Durable Objects: State management required by McpAgent
- πŸ’¬ Rich Formatting: Supports embeds, TTS messages, and mention controls

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Discord Notification MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

1. Discord Webhook: Create a webhook in your Discord channel:
- Right-click on the channel β†’ Edit Channel β†’ Integrations β†’ Webhooks
- Click "New Webhook" and copy the webhook URL
2. Cloudflare Account: Sign up at cloudflare.com

Deploy to Cloudflare Workers:


pnpm run deploy

Alternative: Continuous Deployment

You can also set up continuous deployment directly from the Cloudflare dashboard.
Learn more about Git Integration with Cloudflare

Add the MCP server to Claude Code using the CLI via SSE transport:

```bash

claude mcp add discord-notify https://your-worker-name.workers.dev/sse -t sse

content

(required): The message content to send

tts

(optional): Send as Text-to-Speech message

embeds

(optional): Array of embed objects for rich formatting

allowed_mentions

(optional): Control which mentions are parsed

send_discord_message: Send a notification message to Discord
- content (required): The message content to send
- tts (optional): Send as Text-to-Speech message
- embeds (optional): Array of embed objects for rich formatting
- allowed_mentions (optional): Control which mentions are parsed

Example usage:

// Simple message
await send_discord_message({ content: "Task completed!" })

// Rich embed message
await send_discord_message({
content: "Status Update",
embeds: [{
title: "Build Results",
description: "All tests passed",
color: 5025616, // Green
fields: [
{ name: "Tests", value: "52/52", inline: true },
{ name: "Duration", value: "2m 34s", inline: true }
]
}]
})

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "discord notification mcp server": {
            "discord-notification-mcp": {
                "command": "npx",
                "args": [
                    "wrangler",
                    "secret",
                    "put",
                    "WEBHOOK_URL"
                ]
            }
        }
    }
}

McpServers

{
    "discord-notification-mcp": {
        "command": "npx",
        "args": [
            "wrangler",
            "secret",
            "put",
            "WEBHOOK_URL"
        ]
    }
}

<div align="center">
Discord MCP Logo

An MCP (Model Context Protocol) server that sends notifications to Discord when Claude Code completes tasks. Built with TypeScript using the Cloudflare Agents SDK and deployable on Cloudflare Workers.
</div>

Features

- πŸ€– MCP Tool: Provides a send_discord_message tool for sending notifications
- πŸš€ Cloudflare Workers: Runs serverless with global distribution
- πŸ” Secure: Uses Cloudflare secrets for credentials
- 🌐 Dual Transport: Supports both SSE and Streamable HTTP for maximum compatibility
- πŸ’Ύ Durable Objects: State management required by McpAgent
- πŸ’¬ Rich Formatting: Supports embeds, TTS messages, and mention controls

Architecture

This server implements the MCP specification using Cloudflare's Agents SDK:
- GET /sse: SSE endpoint for MCP communication
- POST /mcp: Streamable HTTP endpoint for MCP communication
- Built with TypeScript, MCP SDK, and Cloudflare Agents SDK
- Proper JSON-RPC 2.0 error handling
- Durable Objects for stateful connections (required by McpAgent)
- Node.js compatibility mode enabled

Setup

Prerequisites

1. Discord Webhook: Create a webhook in your Discord channel:
- Right-click on the channel β†’ Edit Channel β†’ Integrations β†’ Webhooks
- Click "New Webhook" and copy the webhook URL
2. Cloudflare Account: Sign up at cloudflare.com

Installation

1. Clone this repository
2. Install dependencies:

   pnpm install

Configuration

1. Create a .dev.vars file from the example:

   cp .dev.vars.example .dev.vars

Then edit .dev.vars with your webhook URL. This file is used for both local development and deployment.

2. For production deployment, set up Cloudflare secrets:

   npx wrangler secret put WEBHOOK_URL

3. Update wrangler.toml with your worker name if desired

Deployment

Deploy to Cloudflare Workers:

```bash

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.