Discord Notification
БесплатноНе проверенSends messages directly to Discord channels through webhook integration for automated notifications, alerts, and updates.
Описание
Sends messages directly to Discord channels through webhook integration for automated notifications, alerts, and updates.
README

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.
Features
- 🤖 MCP Tool: Provides a
send_discord_messagetool 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
- 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
- Cloudflare Account: Sign up at cloudflare.com
Installation
- Clone this repository
- Install dependencies:
pnpm install
Configuration
Create a
.dev.varsfile from the example:cp .dev.vars.example .dev.varsThen edit
.dev.varswith your webhook URL. This file is used for both local development and deployment.For production deployment, set up Cloudflare secrets:
npx wrangler secret put WEBHOOK_URLUpdate
wrangler.tomlwith your worker name if desired
Deployment
Deploy to Cloudflare Workers:
# First set secrets
npx wrangler secret put WEBHOOK_URL
# Then deploy
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
Claude Code Configuration
Add the MCP server to Claude Code using the CLI via SSE transport:
# For production deployment (SSE)
claude mcp add discord-notify https://your-worker-name.workers.dev/sse -t sse
# For local development
claude mcp add discord-notify http://localhost:8787/sse -t sse
Note: This server supports both SSE (Server-Sent Events) and Streamable HTTP transport. While SSE works well, Streamable HTTP provides better reliability and is the newer standard.
You can verify the configuration with:
claude mcp list
Usage
Once configured, Claude Code can send notifications to your Discord whenever you need them.
Available Tool
send_discord_message: Send a notification message to Discord
content(required): The message content to sendtts(optional): Send as Text-to-Speech messageembeds(optional): Array of embed objects for rich formattingallowed_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 }
]
}]
})
When You'll Get Notifications
Claude Code sends notifications when:
- You explicitly ask: "notify me when done" or "let me know on Discord"
- Errors occur during execution
- Important milestones are reached
- User input or intervention is needed
Example Scenarios
# You say: "Deploy to production and notify me when done"
# Result: 🤖 Claude Code Notification
# Deployment completed successfully! The app is now live.
# You say: "Run all tests and let me know the results"
# Result: 🤖 Claude Code Notification
# All tests passed! 52/52 tests successful.
# You say: "Process this data and notify me if there are any errors"
# Result: 🤖 Claude Code Notification
# Error: Failed to process row 451 - invalid date format
Example Notifications
Example of Discord notifications from Claude Code
Claude Code sending notifications during task completion
CLAUDE.md Examples
To encourage Claude Code to use Discord notifications effectively, add these to your CLAUDE.md:
# Discord Notifications
Use the mcp__discord-notify__send_discord_message tool to send notifications to Discord.
- Always send a Discord notification when:
- A task is fully complete
- You need user input to continue
- An error occurs that requires user attention
- The user explicitly asks for a notification (e.g., "notify me", "send me a message", "let me know")
- Include relevant details in notifications:
- For builds/tests: success/failure status and counts
- For errors: the specific error message and file location
- Use concise, informative messages like:
- "✅ Build completed successfully (2m 34s)"
- "❌ Tests failed: 3/52 failing in auth.test.ts"
- "⚠️ Need permission to modify /etc/hosts"
Development
Run locally:
# Start local development server
pnpm dev
For local development, Wrangler will automatically load environment variables from your .dev.vars file.
Run all checks before deployment:
pnpm build
This command runs:
pnpm format- Format code with Biomepnpm lint:fix- Fix linting issuespnpm cf-typegen- Generate Cloudflare typespnpm type-check- Check TypeScript types
Test the server:
# Test SSE connection
curl http://localhost:8787/sse
# Test health endpoint
curl http://localhost:8787/
Debugging
Testing the SSE Connection
You can test the SSE endpoint directly:
curl -N http://localhost:8787/sse
This should return an event stream starting with an endpoint event.
Common Issues
Connection closes immediately: Check that your worker is running and accessible at the specified URL.
No endpoint event received: Ensure the SSE headers are being sent correctly and the stream is properly formatted.
Discord notifications not sent: Verify your
WEBHOOK_URLis correctly set in the worker environment.
Technical Details
- Language: TypeScript (ES2021 target)
- Runtime: Cloudflare Workers with Node.js compatibility
- Protocol: MCP (Model Context Protocol)
- Transport: SSE and Streamable HTTP
- State Management: Durable Objects (required by McpAgent)
- Observability: Enabled for monitoring
References
This project was built following these guides:
- Build a Remote MCP server - Cloudflare Agents
- Model Context Protocol (MCP) - Cloudflare Agents
- MCP Transport Methods - Cloudflare Agents
- Cloudflare MCP Template (remote-mcp-authless)
Related Projects
- Telegram Notification MCP - Send notifications to Telegram instead of Discord
License
MIT
Установка Discord Notification
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/kstonekuan/discord-notification-mcpFAQ
Discord Notification MCP бесплатный?
Да, Discord Notification MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Discord Notification?
Нет, Discord Notification работает без API-ключей и переменных окружения.
Discord Notification — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Discord Notification в Claude Desktop, Claude Code или Cursor?
Открой Discord Notification на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Gmail
Read, send and search emails from Claude
автор: GoogleSlack
Send, search and summarize Slack messages
автор: SlackRunbear
No-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
Discord Server
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Klavis AI
Open Source MCP Infra. Hosted MCP servers and MCP clients on Slack and Discord.
Work90210/APIFold
Turn any REST API into a hosted MCP server. 18 free public servers (GitHub, Stripe, Slack, OpenAI, Notion, and more) — no setup required, bring your own API key
автор: Work90210arikusi/deepseek-mcp-server
MCP server for DeepSeek AI with chat, reasoning, multi-turn sessions, function calling, thinking mode, and cost tracking.
автор: arikusihashgraph-online/hashnet-mcp-js
MCP server for the Registry Broker. Discover, register, and chat with AI agents on the Hashgraph network.
автор: hashgraph-onlineprofullstack/mcp-server
A comprehensive MCP server aggregating 20+ tools including SEO optimization, document conversion, domain lookup, email validation, QR generation, weather data,
автор: profullstackWayStation-ai/mcp
Seamlessly and securely connect Claude Desktop and other MCP hosts to your favorite apps (Notion, Slack, Monday, Airtable, etc.). Takes less than 90 secs.
автор: waystation-aiCompare Discord Notification with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории communication
