Memory 019e95be
Memory ID (Session ID): 019e95be-d0d1-7000-9df7-99b17bd27363
Last Updated: 2026-06-05 05:14:24
Fact Summary
OMP Discord Integration — Three Tiers
Tier 1: Discord Webhooks (Simplest, 5 min)
- Create webhook in Discord channel settings → Integrations → Webhooks
- Use from OMP via bash tool:
curl -X POST -H 'Content-Type: application/json' -d '{"content":"message"}' $DISCORD_WEBHOOK_URL - One-way only (OMP → Discord), no bot needed
- Set DISCORD_WEBHOOK_URL as env var, never commit to git
Tier 2: MCP Discord Server (Bidirectional, 15 min)
- Best MCP server:
@iqai/mcp-discord(npm package, GitHub: IQAIcom/mcp-discord)- Supports: send/read messages, manage channels, list servers, add reactions
- Requires: DISCORD_TOKEN env var (bot token from Discord Developer Portal)
- Config location:
~/.omp/agent/mcp.json - Example config:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@iqai/mcp-discord"],
"env": { "DISCORD_TOKEN": "<bot-token>" }
}
}
}- Bot setup: Discord Developer Portal → New Application → Bot → enable MESSAGE_CONTENT intent → generate invite with permissions (Send Messages, Read Message History, Manage Messages, Add Reactions) → invite to server
- Verify with:
/mcp reload+/mcp test discord
Tier 3: OMP Extension (Automated, 30 min)
- Create extension at
~/.omp/agent/extensions/discord-notify.ts - Uses OMP ExtensionAPI to hook events:
agent_end,tool_call, etc. - Posts to Discord via webhook using global
fetch(available in Bun) - Register in
~/.omp/agent/config.ymlunderextensions:array - No bundling needed if only using fetch and OMP APIs
- Extension bundling caveat (from prior memory): OMP legacy loader mirrors to /tmp/, breaking relative requires; must bundle with
bun buildkeeping@earendil-works/pi-coding-agentexternal
Current System State (0rk.de server)
- OMP config:
~/.omp/agent/config.yml— hasmcp.discoveryMode: trueandextensionsarray - No
~/.omp/agent/mcp.jsonexists yet (needs creation for MCP servers) - Existing extension:
pi-langfuseat/home/dev/.omp/plugins/node_modules/pi-langfuse
Security Rules
- Never commit Discord bot tokens or webhook URLs to git
- Use env vars: DISCORD_TOKEN, DISCORD_WEBHOOK_URL
- Webhook URLs are bearer tokens — treat as passwords
- Use least-privilege bot permissions
- Enable only needed gateway intents
Decision Matrix
| Need | Tier | Time |
|---|---|---|
| Ping me when done | Tier 1 (Webhook) | 5 min |
| Talk to Discord from OMP | Tier 2 (MCP) | 15 min |
| Auto-notify on completions | Tier 3 (Extension) | 30 min |
| Full Discord admin | Tier 2 (MCP) | 15 min |
| All of the above | Tier 2 + 3 | 45 min |
Key OMP Docs Referenced
- omp://extensions.md, omp://hooks.md, omp://mcp-config.md, omp://custom-tools.md, omp://sdk.md
Reference Session
- Associated Chat Session: 019e95be-d0d1-7000-9df7-99b17bd27363