Troubleshooting
Start with one command:
discord-mcp doctor --onlineExit 0 means every check passed, 1 means warnings only, and 2 means at least one
failure. Use the symptom below that matches what you see.
The CLI will not install or start
Section titled “The CLI will not install or start”Run node --version. discord-mcp requires Node.js 22.12 or newer. After upgrading,
reinstall the CLI and verify the binary:
npm install -g @discord-mcp/clidiscord-mcp --versionFor a one-off diagnostic without a global install, use the scoped package name:
npx --yes @discord-mcp/cli@latest doctor --onlineDISCORD_TOKEN is missing or invalid
Section titled “DISCORD_TOKEN is missing or invalid”- A profile-based
setupsnippet intentionally omits the token from JSON clients; makeDISCORD_TOKENavailable to the client process before it launches the MCP child. - If a stateless
initconfig still contains the literal${env:DISCORD_TOKEN}, replace that placeholder with the real token in the local client config unless you have verified that your client expands environment placeholders. doctorreads the environment of the terminal where it runs; it does not read the token back from your MCP client config.- A
Botprefix is accepted but not required. - If Discord returns
401, reset the token in the Developer Portal and replace the old value. - If startup reports a bot identity mismatch, restore the token for
DISCORD_EXPECTED_BOT_ID; do not replace the expected ID merely to make the server start. Follow the credential lifecycle guide. - For a saved profile, run
discord-mcp profile show <name>anddiscord-mcp doctor --profile <name> --onlineto inspect the non-secret boundary and verify its current environment token together.
The client does not show discord-mcp
Section titled “The client does not show discord-mcp”- Confirm that the
discord-mcpentry is inside the client’s top-levelmcpServersobject. - Keep existing MCP entries when merging the generated snippet.
- Check that the generated
commandand firstargspath still exist. The snippet is tied to the CLI installation that created it; regenerate it after moving or reinstalling Node. - Fully quit and reopen the client, then inspect its MCP/server logs.
I see many discord-mcp processes
Section titled “I see many discord-mcp processes”Each active MCP client session owns its own stdio child. Several open sessions therefore legitimately produce several server processes; discord-mcp does not use a global singleton because sessions can carry different profiles, environment, and tool boundaries.
On Windows, a PowerShell launch through npx can add additional
npm/cmd/PowerShell wrapper processes that remain for the server’s
lifetime. Use the generated
launcher first, then inspect the client process tree before terminating
anything. A direct Node installation and launcher avoids those package-manager
wrappers. It does not merge separate client sessions into one process.
When a client closes its stdio pipe, the server starts one deduplicated cleanup for that child and releases its resources before exiting; cleanup is bounded to five seconds. If a child remains after the host is fully closed, capture the client name, CLI version, Node version, and redacted process-tree output, then restart that client once. Do not kill another session that is still in use.
I changed the token, profile, config, or version but nothing changed
Section titled “I changed the token, profile, config, or version but nothing changed”The MCP server is a child process of the client. It reads the current profile, pinned package, and inherited environment only when that child starts.
- Run
discord-mcp profile show <name>to confirm the saved bot, guild allowlist, client, and tool surface. - Make
DISCORD_TOKENavailable to the environment that will launch the MCP client. A passingdoctorin another terminal proves only that terminal’s environment. - Fully quit and reopen the client. A window reload may keep the old parent or MCP child alive.
- If startup still fails, run
discord-mcp doctor --profile <name> --onlinefrom the intended launch environment and compare its redacted result with the client logs.
A tool returns 403 Missing Permissions
Section titled “A tool returns 403 Missing Permissions”The bot is authenticated but its Discord role cannot perform the action in that channel. Check both the server role and channel-specific permission overrides. Grant the smallest permission required by the tool, then retry.
A tool returns 404 or “Unknown Channel”
Section titled “A tool returns 404 or “Unknown Channel””Discord tools use snowflake IDs, not #channel names. Enable Developer Mode and copy the
server or channel ID, or call channels_list with the correct guild_id and use the returned
channel id.
A write happened without a confirmation prompt
Section titled “A write happened without a confirmation prompt”This can be expected. Only tools whose reference page says Confirmation required use the
__confirm plus MCP_DRY_RUN gate. Ordinary writes such as messages_send are not gated and
can execute on the first call. Limit the bot’s Discord permissions and use a test server.
DRY_RUN_PREVIEW never becomes a real mutation
Section titled “DRY_RUN_PREVIEW never becomes a real mutation”For a confirmation-gated tool, both conditions are required:
- set
MCP_DRY_RUN=falsein the server’s environment; and - send the tool call with
__confirm: true.
The setting does not affect tools that are not confirmation-gated.
Gateway mode falls back to REST-only
Section titled “Gateway mode falls back to REST-only”Gateway support requires discord.js to be resolvable from the CLI installation. If Gateway
startup fails, discord-mcp logs a warning and continues in REST-only mode. Reinstall the CLI
and discord.js together, check the requested intents, then restart the client.
npm install -g @discord-mcp/cli discord.jsdiscord-mcp serve --gatewayGateway subscriptions are an advanced notification surface; they are not a replacement for the REST tool and resource catalogs.
Still blocked?
Section titled “Still blocked?”Open a GitHub issue with the CLI version, Node version, operating system, client name, and redacted error output. Never include the bot token or a client config containing it.

