Error [TokenInvalid]: An invalid token was provided. (Discord MCP)
Fixes the Discord MCP server failing to log in with an invalid token error. Use when the token was pasted wrong, expired, or regenerated. Not for intent or channel issues.
Error [TokenInvalid]: An invalid token was provided. (Discord MCP)
TL;DR: Regenerate the bot token in the Discord developer portal and update DISCORD_TOKEN in the MCP config. The old token stops working the moment you reset it, so update every copy. Restart the whole MCP client so the server picks up the new token.
The error
Error [TokenInvalid]: An invalid token was provided.Fix it
- In the developer portal, open your application, Bot, and reset the token.
Expected: Discord shows the new token once; copy it.
- Paste it into the MCP config env as DISCORD_TOKEN, checking for stray spaces or quotes.
Expected: The config holds the clean token.
- Fully restart the MCP client.
Expected: The server logs in without TokenInvalid.
When this applies
The Discord MCP server fails at login with TokenInvalid, or the token recently stopped working after a reset.
When this does NOT apply
If the token works via curl, the issue is token passing, not the token. 4014 closes are intents.
Tool compatibility
barryyip0625/mcp-discord, any version
Also seen as
- Discord invalid token MCP
- TokenInvalid discord bot MCP
- Discord bot token reset MCP
Why it happens
Discord tokens are bearer secrets; any truncation, stray quote, or reset invalidates them. The gateway rejects the handshake before any MCP logic runs.
Edge cases
- Never share the token; reset it immediately if it leaks.
- Bot tokens differ from OAuth client secrets; use the Bot page token.
- Some config files add quotes around values; the token must not include them.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.