Create a Discord bot
By the end of this guide, your bot will be installed in a private test server and you will have its token, a guild ID, and a channel ID ready for discord-mcp.
Before you begin
- Sign in to the Discord account that will own the new application, or can edit an existing one.
- Create or choose a private test server where you have Manage Server.
-
Create an application.
Open the Discord Developer Portal, select New Application, give it a recognizable name, and create it. New applications include a bot user by default.
-
Generate and store the bot token.
Open Bot, select Reset Token, and copy the new token into a password manager. Discord only shows it once.
Never paste the token into chat, an issue, a screenshot, or a committed file. If it is exposed, reset it immediately and update your local MCP client config.
-
Choose the smallest useful permissions.
Open Installation and configure a Guild Install with the
botscope. For the first tutorial, grant only:- View Channels
- Send Messages
Add Read Message History, moderation, role, webhook, or thread permissions later only when a workflow needs them. Do not grant Administrator as a shortcut.
-
Install the bot in your test server.
Copy the install link from Installation, open it, choose Add to server, and select your test server. Confirm that the bot appears in the member list.
-
Copy the guild and channel IDs.
In Discord, open User Settings → Advanced and enable Developer Mode. Then:
- Right-click the test server and select Copy Server ID. This is your
guild_id. - Right-click the test channel and select Copy Channel ID. This is your
channel_id.
- Right-click the test server and select Copy Server ID. This is your
Gateway intents
Section titled “Gateway intents”The default discord-mcp setup uses Discord’s HTTP API and does not need privileged Gateway intents. Only enable Gateway mode when you need live event notifications. Gateway mode asks for Guilds, Guild Voice States, and Guild Presences; presence data requires the corresponding privileged intent in the Developer Portal.
Checklist for moving on
Section titled “Checklist for moving on”- The bot is installed in my private test server.
- The token is stored privately and has not been committed or shared.
- I copied the numeric test server ID and channel ID; each contains 17 to 20 digits.
- The bot has View Channels and Send Messages, but not Administrator.