Verify a Gateway notification
Gateway mode can turn selected Discord events into MCP
notifications/resources/updated signals. The current implementation is useful for
experiments, but it is not a complete live-resource system: the URI patterns are not returned
by resources/list, cannot be fetched with resources/read, and the server advertises
subscription capability even when Gateway mode is inactive.
Supported notification patterns
Section titled “Supported notification patterns”| Subscription URI | Signal source |
|---|---|
discord://guild/{guild_id}/info | Guild update |
discord://guild/{guild_id}/members/online | Presence update, debounced |
discord://channel/{channel_id}/typing | Typing start, debounced |
discord://voice/{guild_id}/state | Voice state update |
discord://guild/{guild_id}/audit-log/recent | Audit-log polling fallback |
These URIs are notification keys, not readable resource documents.
-
Install Gateway support with the CLI.
Terminal window npm install -g @discord-mcp/cli discord.jsdiscord.jsmust be resolvable from the same installation as the CLI. -
Enable required intents.
The Gateway client requests Guilds, Guild Voice States, and Guild Presences. Enable the Presence intent for the bot in the Developer Portal when testing online-member signals.
-
Start with Gateway mode.
Terminal window discord-mcp serve --gatewayIn normal client use, add
--gatewayto the generated server arguments. If Gateway startup fails, discord-mcp logs a warning and continues REST-only; confirm the log before proceeding. -
Subscribe through a capable MCP client.
Use an exact URI containing the real Discord ID:
{"method": "resources/subscribe","params": {"uri": "discord://voice/111122223333444455/state"}} -
Trigger and observe one event.
Join or leave a voice channel in the test guild. A working path emits:
{"method": "notifications/resources/updated","params": {"uri": "discord://voice/111122223333444455/state"}}The notification contains the URI only. Use a matching REST tool to fetch current state if your workflow needs data after the signal.
-
Unsubscribe when finished.
{"method": "resources/unsubscribe","params": {"uri": "discord://voice/111122223333444455/state"}}
Fallback design
Section titled “Fallback design”For a client without subscriptions-or until this feature is hardened-poll the narrowest read-only Discord tool at a conservative interval and respect rate limits. Keep event-driven and polling paths behind the same application interface so the transport choice can change.
See Client compatibility, Gateway architecture, and Troubleshooting.