# Discord MCP bot connects then drops: close code 4014 (disallowed intents)

**TL;DR:** Enable the Privileged Gateway Intents your bot needs in the Discord developer portal (Presence, Server Members, Message Content). Discord closes the gateway with 4014 when the bot requests intents that are not enabled for the app. Restart the MCP server after toggling the intents.

## The error

```
Discord gateway closed with close code 4014 (disallowed intents); the bot connects then immediately disconnects
```

## Fix it

1. Open the Discord developer portal, your application, Bot settings.
   Expected: You see the Privileged Gateway Intents toggles.
2. Enable Presence Intent, Server Members Intent, and Message Content Intent.
   Expected: All three show enabled; save.
3. Restart the MCP server process.
   Expected: The gateway stays connected.
4. Call a Discord tool.
   Expected: It succeeds.

## When this applies

The Discord bot token is valid but the gateway connection drops right after connecting with a 4014 close.

## When this does NOT apply

TokenInvalid means the token itself is wrong. MCP -32603 not logged in is the server-side login issue.

## Tool compatibility

barryyip0625/mcp-discord, any version

## Also seen as

- Discord 4014 disallowed intents MCP
- Discord bot keeps disconnecting MCP
- privileged intents discord MCP

## Why it happens

Discord requires privileged intents to be explicitly enabled per application. The MCP server requests them at gateway hello; if the toggles are off, Discord closes the connection with 4014.

## Edge cases

- Large bots (100+ servers) need intent verification approval from Discord.
- Message Content intent is required to read message text.
- Toggling intents can take a minute to propagate; wait before retesting.