Discord — Notifications Channel
Overview
The Discord server serves as the primary notification hub for the Ecotrans fleet platform (p24). The bot manages channels and webhooks used by automated pipelines (n8n, monitoring alerts, deployment notifications).
Server
| Property | Value |
|---|---|
| Server ID (Guild ID) | 1501736683354198067 |
| Application ID | 1501737509896323072 |
| Bot name | p24-infra bot |
Bot permissions
The bot was invited with Administrator scope. Required capabilities:
- Manage Channels (create/rename/archive channels)
- Manage Webhooks (create webhooks per channel for inbound notifications)
- Send Messages
- Read Message History
Credentials (in .env.local, not committed)
DISCORD_BOT_TOKEN=<bot token from Developer Portal>
DISCORD_SERVER_ID=1501736683354198067
The legacy key p24-infra-discord-bot-token is also present in .env.local for historical reasons — DISCORD_BOT_TOKEN is the canonical name.
Planned channel structure
| Channel | Purpose |
|---|---|
#deploy-prod | Vercel production deployment events |
#deploy-staging | Vercel staging deployment events |
#alerts | Prometheus/Grafana alertmanager alerts |
#n8n-errors | n8n workflow failures |
#supabase | Supabase edge function errors, quota warnings |
#general | Manual team notifications |
Each channel gets a dedicated webhook URL stored in n8n credentials or Alertmanager config — never hardcoded in code.
MCP setup for administrative work
The discord-mcp server in .mcp.json gives Claude Code direct access to Discord API for channel and webhook management.
"discord": {
"command": "npx",
"args": ["-y", "discord-mcp"],
"env": {
"DISCORD_TOKEN": "${DISCORD_BOT_TOKEN}"
}
}Authorization flow:
DISCORD_BOT_TOKENloaded from.env.localinto Claude Code envdiscord-mcpprocess started with that token- All Discord API calls use the bot token (not a user token)
Scope of administrative operations via MCP:
- Create / rename / delete channels
- Create webhooks and retrieve their URLs
- Send messages to channels
- List existing channels and webhooks
Webhook integration points
Once channels are created, webhook URLs go into:
- n8n: stored as HTTP Request node credential or workflow-level env var
- Alertmanager (
monitoring/alertmanager/alertmanager.yml):discord_webhook_urlfield in receiver config - Vercel: project notification settings (per-project, via Vercel dashboard or API)
Developer Portal
Application settings: https://discord.com/developers/applications/1501737509896323072