Discord API key, OAuth and MCP

Have a bot post, moderate or reply on your Discord server. The API key is created in 3 steps et voyage dans l'en-tête de chaque appel. OAuth is used when the access must act on behalf of other accounts. It has no official MCP server: a connector or an automation provides the link.

Communication and collaboration · Community communication

Discord

Have a bot post, moderate or reply on your Discord server.

  • REST API
  • Key or personal token
  • OAuth
  • No official MCP server
  1. 1

    Ouvrez discord.com/developers/applications, Nouvelle application.

  2. 2

    Onglet Bot : Réinitialiser le jeton, puis copiez-le.

  3. 3

    OAuth2, Générateur d'URL : portées bot et applications.commands, droits minimaux, puis invitez le bot sur votre serveur.

Send with every call
Authorization: Bot <token>
Test the key
curl https://discord.com/api/v10/users/@me \
  -H "Authorization: Bot $DISCORD_CLE"

Worth knowing. To post only: a channel webhook (Channel settings, Integrations) is enough, with no bot.

Your questions about Discord.

Where do you create a Discord API key?

Ouvrez discord.com/developers/applications, Nouvelle application. Onglet Bot : Réinitialiser le jeton, puis copiez-le. OAuth2, Générateur d'URL : portées bot et applications.commands, droits minimaux, puis invitez le bot sur votre serveur.

How do you check that Discord access works?

With a call that changes nothing, on the REST API of Discord, l'en-tête Authorization: … en place. The “API key” tab gives the command to copy. A 200 response confirms the key; a 401 or 403 error means it is wrong, expired or too restricted.

Do you need OAuth with Discord?

Only if the access must act on behalf of accounts other than yours. OAuth2 to identify users on your website (identify scope).

Does Discord have an official MCP server?

No official MCP server. The “Connect an AI” tab gives the simplest route.

What precautions should you take with Discord access?

To post only: a channel webhook (Channel settings, Integrations) is enough, with no bot.