Skip to content

Verify a Gateway notification

Gateway mode can turn selected Discord events into MCP notifications/resources/updated signals. The guild-info URI is also a bounded live resource: when its guild is allowlisted, resources/read performs a short-lived REST snapshot and Gateway updates invalidate that snapshot before notifying subscribers. The other URI patterns remain signals only, and the server advertises subscription capability even when Gateway mode is inactive.

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

discord://guild/{guild_id}/info is a readable snapshot when the guild is allowlisted. The voice, presence, typing, and audit-log URIs are notification keys, not readable documents.

  1. Install Gateway support with the CLI.

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

    discord.js must be resolvable from the same installation as the CLI.

  2. 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.

  3. Start with Gateway mode.

    Terminal window
    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.

  4. Subscribe through a capable MCP client.

    Use an exact URI containing the real Discord ID:

    {
    "method": "resources/subscribe",
    "params": {
    "uri": "discord://guild/111122223333444455/info"
    }
    }
  5. Trigger and observe one event.

    Change the guild name or another guild setting in the test guild. A working path emits:

    {
    "method": "notifications/resources/updated",
    "params": {
    "uri": "discord://guild/111122223333444455/info"
    }
    }

    The notification contains the URI only. Read the URI again to obtain the fresh snapshot:

    {
    "method": "resources/read",
    "params": { "uri": "discord://guild/111122223333444455/info" }
    }

    The response is wrapped as { resource_uri, source, fetched_at, data }. It is a reread after the event, not an atomic event payload.

  6. Unsubscribe when finished.

    {
    "method": "resources/unsubscribe",
    "params": {
    "uri": "discord://guild/111122223333444455/info"
    }
    }

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 Choose a connection mode, Gateway architecture, and Troubleshooting.