Overview

Confirm a live Discord event reaches your MCP client

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 are notification keys, not readable resource documents.

Step 1: install Gateway support#

npm install -g @discord-mcp/cli discord.js

discord.js must be resolvable from the same install as the CLI, it's lazy-imported so REST-only users don't pay for it.

Step 2: enable the required intents#

The Gateway client requests Guilds, Guild Voice States, and Guild Presences, enable the Presence intent for your bot in the Developer Portal when testing online-member signals.

Step 3: start with Gateway mode#

discord-mcp serve --gateway

In normal client use, add --gateway to the generated server arguments. If Gateway startup fails, discord-mcp logs a warning and continues REST-only, confirm the log before proceeding.

Step 4: subscribe through a capable client#

{ "method": "resources/subscribe", "params": { "uri": "discord://voice/111122223333444455/state" } }

Step 5: trigger and observe one event#

Join or leave a voice channel in your test guild. A working path emits:

{ "method": "notifications/resources/updated", "params": { "uri": "discord://voice/111122223333444455/state" } }

The notification contains only the URI, use a matching REST tool to fetch current state after the signal.

Step 6: unsubscribe when finished#

{ "method": "resources/unsubscribe", "params": { "uri": "discord://voice/111122223333444455/state" } }

Fallback design#

For a client without subscriptions, or until this feature hardens further, 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 later.

Choose a connection mode for stdio vs HTTP, and troubleshooting if Gateway falls back unexpectedly.

Next steps#

Back to the overview or see production configuration for the full environment-variable reference.

Updated

Was this page helpful?