Set up the Discord plugin for Claude Code
Create a Discord bot, install the Claude Code plugin, and configure access control via pairing, an allowlist, or guild channels.
- Skill Road
- Set up the Discord plugin for Claude Code
Published on 29.09.2026
This guide sets up the Discord plugin from Anthropic's official plugin repository for Claude Code through the documented marketplace route. Before relying on it in production, review the full [README](https://github.com/anthropics/claude-plugins-official/tree/main/external_plugins/discord) and the [access control documentation](https://github.com/anthropics/claude-plugins-official/blob/main/external_plugins/discord/ACCESS.md) in the repository.
Check the prerequisites
The plugin requires a current version of Claude Code (check with claude --version) and the Bun JavaScript runtime. If Bun is missing, install it with curl -fsSL https://bun.sh/install | bash.
Create a Discord bot
In the [Discord Developer Portal](https://discord.com/developers/applications), create a new application with a bot. In the Bot section, under "Privileged Gateway Intents", enable "Message Content Intent" — without it, incoming messages arrive with empty content. Generate a bot token via "Reset Token" and save it, since it's only shown once. Invite the bot to a server of your own through the OAuth2 URL generator (scope "bot", permissions to read and send messages plus reactions), since Discord only allows direct messages between users who share a server.
Install and configure the plugin
In Claude Code, run these commands in order:
/plugin install discord@claude-plugins-official
/discord:configure [TOKEN]
claude --channels plugin:discord@claude-plugins-official
Replace [TOKEN] with the bot token from the Developer Portal. The third command starts Claude Code with the Discord channel active.
Grant access
Send the bot a direct message; it replies with a six-digit pairing code. Enter it in Claude Code with /discord:access pair [CODE] to pair yourself. For team setups, use a maintained allowlist instead via /discord:access allow <ID>; guild channels stay disabled by default and can be enabled individually with /discord:access group add <ID>.
Keep security in mind
Choose the access policy deliberately to match your use case: pairing for personal use, a maintained allowlist for multiple participants, or /discord:access policy disabled to lock the channel entirely for a while. Also check the "Public Bot" toggle in the Discord Developer Portal so not just anyone can add the bot to another server. Because a connected bot can potentially trigger far-reaching actions in the running Claude Code session, the access.json configuration under ~/.claude/channels/discord/ deserves a periodic review, especially before enabling new guild channels.
Frequently asked questions
Is the Discord plugin actually official from Anthropic?
It lives in the official, Anthropic-maintained claude-plugins-official repository and is released under that repository's Apache-2.0 license. Unlike the Telegram or Code Review plugins, though, its marketplace page at claude.com/plugins/discord does not carry the "Anthropic verified" mark.
Does the plugin cost anything?
No, the plugin's source code and use are free under the Apache-2.0 license per the repository. Claude Code itself may carry its own costs depending on the plan chosen.
Can any Discord user control the bot immediately?
No. In the default "pairing" mode, every new sender must first be approved via a six-digit code entered in the Claude Code terminal; unauthorized messages are dropped or ignored.
Does the plugin work in Discord servers, or only via direct message?
Yes, but guild channels are disabled by default and must be enabled individually via /discord:access group add. There, by default, the bot only responds to @-mentions or direct replies.
Can the bot send and receive files?
Yes. It can send up to ten file attachments per message, each up to 25 MB; incoming attachments are only downloaded on demand through a dedicated tool, not automatically.