publish-to-discord

X-McKay's avatarfrom X-McKay

Publish news digests and breaking alerts to Discord via webhook. Handles message chunking for Discord's 2000 character limit. Uses embeds for breaking alerts to make them stand out.

1stars🔀0forks📁View on GitHub🕐Updated Jan 11, 2026

When & Why to Use This Skill

The Publish to Discord skill enables Claude to seamlessly broadcast news digests and urgent alerts to Discord channels via the Discord MCP server. It optimizes content delivery by automatically handling Discord's 2000-character limit through intelligent message chunking and utilizes high-impact rich embeds for breaking news to ensure critical information stands out with professional formatting.

Use Cases

  • Automated News Broadcasting: Streamline the delivery of curated daily or weekly industry news digests to community or internal team Discord channels.
  • Real-time Breaking Alerts: Instantly notify subscribers or team members of urgent updates using eye-catching red-themed embeds and @here mentions for maximum visibility.
  • Long-form Content Distribution: Share extensive reports, summaries, or articles without manual editing, thanks to an automated algorithm that splits long text into logical chunks.
  • Community Engagement: Maintain an active Discord presence by consistently posting formatted news summaries and AI-generated insights directly from a news monitoring workflow.
namepublish-to-discord
version"2.0.0"
descriptionWhether publish succeeded
Keywordspublish, discord, news, digest, breaking, alert.
domainnews
categoryaction
requires-approvaltrue # External side effect
confidence0.95
skills[]
tools[]
timeout60s
retries2
backoffexponential
- namepublished
typebool
enum[digest, breaking_alert]
optionaltrue

Publish to Discord

Publish news content to Discord via the Discord MCP server.

When to Use

  • Publishing regular news digests
  • Alerting about breaking news
  • Sharing formatted news summaries
  • Keywords: publish, post, discord, news, digest, breaking

Prerequisites

  • DISCORD_MCP_URL environment variable set (or use default)
  • Target channel exists (default: ai-news)
  • Content formatted for Discord (markdown)

Input Schema

{
  "content": "string - Formatted content to publish",
  "content_type": "string - 'digest' or 'breaking_alert'",
  "article": {
    "title": "string - Article title (for breaking alerts)",
    "url": "string - Article URL",
    "source": "string - News source",
    "category": "string - Article category",
    "ai_summary": "string - AI-generated summary"
  },
  "channel_name": "string - Target channel (default: ai-news)"
}

Actions

Step 1: Validate Configuration

Check that Discord MCP is accessible. If not:

  • Log warning
  • Return published=false
  • Skip remaining steps

Step 2: Route by Content Type

For digest:

  1. Split message if > 1900 characters (Discord limit is 2000)
  2. Post each chunk as separate message
  3. Return message ID of first chunk

For breaking_alert:

  1. Build Discord embed with red color (0xED4245)
  2. Include @here mention for notification
  3. Structure embed with article details

Step 3: Post Content

For digest (plain text with chunking):

# For each chunk:
mcp_tool: discord-mcp-server/send_message_to_channel_name
params:
  channel_name: $channel_name
  content: $chunk_content

For breaking_alert (rich embed):

mcp_tool: discord-mcp-server/send_message_to_channel_name
params:
  channel_name: $channel_name
  content: "@here **Breaking AI News**"
  embed:
    title: "BREAKING: $article.title"
    description: $article.ai_summary
    url: $article.url
    color: 15158332  # Red
    fields:
      - name: "Source"
        value: $article.source
        inline: true
      - name: "Category"
        value: $article.category
        inline: true
    footer:
      text: "AI News Monitor - Breaking Alert"
    timestamp: $current_timestamp

Step 4: Handle Chunking (Digest only)

If content exceeds 1900 characters:

  1. Split by paragraphs (double newline)
  2. If paragraph too long, split by lines
  3. Post chunks sequentially with small delay
  4. Maintain logical breaks

Chunking algorithm:

max_chunk_size = 1900
chunks = []
current_chunk = ""

for paragraph in content.split("\n\n"):
    if len(current_chunk) + len(paragraph) + 2 <= max_chunk_size:
        current_chunk += paragraph + "\n\n"
    else:
        if current_chunk:
            chunks.append(current_chunk.strip())
        current_chunk = paragraph + "\n\n"

if current_chunk:
    chunks.append(current_chunk.strip())

Output Schema

{
  "published": "boolean - Whether publish succeeded",
  "message_id": "string - Discord message ID (first chunk for digests)",
  "chunks_sent": "number - Number of message chunks sent (digest only)",
  "channel": "string - Channel where content was posted",
  "error": "string - Error message if failed"
}

Success Criteria

  • Content posted to Discord
  • Message ID returned for tracking
  • Breaking alerts trigger @here notifications
  • Long content properly chunked

Failure Handling

Error Type Handling Strategy
MCP server unavailable Retry with backoff
Channel not found Log error, return published=false
Rate limited Wait and retry
Content too long Auto-chunk and retry

Idempotency

This operation is NOT idempotent:

  • Same content posted multiple times creates multiple messages
  • Use breaking news claim system to prevent duplicate alerts
  • Digest deduplication handled by workflow scheduling

Examples

Example 1: News Digest

Input:

{
  "content": "# AI News Digest - Jan 11, 2025\n\n## Top Stories\n\n1. **OpenAI announces GPT-5**...\n\n2. **Google releases Gemini 2.0**...",
  "content_type": "digest",
  "channel_name": "ai-news"
}

MCP Tool Call:

mcp_tool: discord-mcp-server/send_message_to_channel_name
params:
  channel_name: ai-news
  content: "# AI News Digest - Jan 11, 2025\n\n## Top Stories\n\n1. **OpenAI announces GPT-5**..."

Output:

{
  "published": true,
  "message_id": "1234567890",
  "chunks_sent": 1,
  "channel": "ai-news"
}

Example 2: Breaking News Alert

Input:

{
  "content_type": "breaking_alert",
  "article": {
    "title": "Major AI Breakthrough: AGI Achieved",
    "url": "https://example.com/agi-breakthrough",
    "source": "TechCrunch",
    "category": "research",
    "ai_summary": "Researchers announce successful demonstration of artificial general intelligence..."
  },
  "channel_name": "ai-news"
}

MCP Tool Call:

mcp_tool: discord-mcp-server/send_message_to_channel_name
params:
  channel_name: ai-news
  content: "@here **Breaking AI News**"
  embed:
    title: "BREAKING: Major AI Breakthrough: AGI Achieved"
    description: "Researchers announce successful demonstration of artificial general intelligence..."
    url: "https://example.com/agi-breakthrough"
    color: 15158332
    fields:
      - name: "Source"
        value: "TechCrunch"
        inline: true
      - name: "Category"
        value: "Research"
        inline: true
    footer:
      text: "AI News Monitor - Breaking Alert"

Output:

{
  "published": true,
  "message_id": "9876543210",
  "channel": "ai-news"
}

Related Skills

Changelog

Version Date Changes
2.0.0 2025-01-11 Migrated to Discord MCP server from webhooks
1.0.0 2025-01-09 Initial version with webhook support