How to Connect Claude Code to Discord Using Claude Code Channels

Claude Code just got a lot more interesting. Instead of being stuck in a terminal window, you can now send commands to your Claude Code session directly from Discord. The feature is called Claude Code Channels, and it actually works really well.
This guide covers everything: what Channels are, what you need to prepare beforehand, and the entire setup process—from installing the plugin to getting your first bot response in Discord.
If you already have Claude Code installed and a Discord account ready, skip ahead. Otherwise, let's get started.
Prerequisites: What You Need Before Starting
Gather these things before doing anything else. Skipping any step will waste your time later.
- Claude Code version 2.1.80 or later installed on your machine
- A Claude.ai account logged in through Claude Code (not API key authentication)
- A Pro or Max subscription plan
- Bun installed, since the Discord channel plugin depends on it
- A Discord account with access to a server where you can add bots
Here's the tricky part many people stumble on: Claude Code Channels won't work with API key authentication or console-only logins.
You must log in with your actual Claude.ai account. If you're using Claude Code exclusively through API keys for billing purposes, Channels won't be available until you switch.
Step 1: Install Claude Code
If you already have Claude Code running, jump to Step 2. For everyone else, head to the official Claude Code website and grab the installation command for your platform.
Installation works on Windows, macOS, Linux, and WSL. On Windows using PowerShell, run:
irm https://claude.ai/install.ps1 | iex
After installation, create a project folder, navigate into it, and start Claude Code:
mkdir cc-channels
cd cc-channels
claude
This opens Claude Code in your terminal and starts a local session. That running session is the foundation for everything that follows—Channels only works inside an active Claude Code instance.
Step 2: Log In With Your Claude.ai Account
Channels requires Claude.ai account authentication. When you first open Claude Code, it usually prompts you to log in. If it doesn't, run this command inside Claude Code:
/login
This opens a browser window for authentication. Complete the login, return to your terminal window, and you're done.
Skip this step and Channels won't work. You'll spend hours wondering why your bot isn't responding.
Step 3: Install Bun
Claude Code's official channel plugins require Bun. If you don't have it installed yet, here's the Windows PowerShell command:
irm bun.sh/install.ps1 | iex
After installation, verify it worked:
bun --version
If a version number appears, you're good. If nothing shows up, the installation failed. Check whether your terminal session has access to the updated PATH.
Step 4: Add the Official Marketplace Plugin and Install Discord
Claude Code uses a plugin system for Channels, and the Discord plugin lives in Anthropic's official plugin marketplace. Before you can install anything, you need to make sure the marketplace is added and up to date.
Run these two commands in Claude Code:
/plugin marketplace add anthropics/claude-plugins-official
/plugin marketplace update claude-plugins-official
Skip this and Claude Code won't find the Discord plugin—it'll just say it doesn't exist. The error message isn't helpful, so run these commands first to avoid confusion.
Once the marketplace is ready, install the Discord plugin:
/plugin install discord@claude-plugins-official
Then reload plugins so the new commands are available in your current session:
/reload-plugins
This reload is mandatory. Claude Code might not recognize Discord plugin commands until you refresh the plugin state explicitly.
Step 5: Create a Bot in Discord Developer Portal
Open the Discord Developer Portal and click New Application. Give it any name you want—something like "CC-Bot" works fine.
Once created, navigate to the Bot section:
- Click Reset Token and copy your new bot token
- Save that token somewhere safe—you'll need it in Step 7
- Scroll down and enable Message Content Intent
That last part is critical. Without Message Content Intent enabled, Discord sends your bot empty message content fields. Your Claude Code session won't know who's talking to it. It's a specific Discord requirement for bots that read incoming message text.
Step 6: Invite the Bot to Your Discord Server
Still in Developer Portal, open the OAuth2 tab and scroll down to "OAuth2 URL Generator". Select bot in the Scopes section.
Then select these Bot Permissions:
- View Channels
- Send Messages
- Send Messages in Threads
- Read Message History
- Attach Files
- Add Reactions
- Send Voice Messages
Discord generates an invite URL at the bottom of the page. Copy it, paste it into your browser, select the server where you want to add the bot, and click Authorize.
The bot appears in your server but stays offline until you connect it.
Step 7: Connect Your Bot Token to Claude Code
Back in Claude Code, run:
/discord:configure YOUR_DISCORD_BOT_TOKEN
Replace YOUR_DISCORD_BOT_TOKEN with the token you copied in Step 5. Claude Code automatically saves the token to:
~/.claude/channels/discord/.env
You don't need to edit that file manually—the command handles it automatically.
Common problem: If /discord:configure doesn't work, close your terminal completely, reopen it, navigate back to your project folder, and launch Claude Code again. Sometimes the plugin state needs a clean session to register correctly.
Step 8: Launch Claude Code With Channels Enabled
At this point everything is configured, but your Discord bot is still offline. Channels only activates when you explicitly start Claude Code with the channels flag.
Exit your current Claude Code session, then relaunch with:
claude --channels plugin:discord@claude-plugins-official
This starts a new Claude Code session with the Discord plugin loaded and listening. Your bot is now online on Discord.
If it's not showing online, double-check that the token is correct and Claude Code is actually running with the --channels flag.
Step 9: Pair Your Discord Account
With Claude Code running and your bot online, open Discord and send your bot a direct message. The bot responds with a pairing code.
If the bot doesn't respond, your Claude Code session either closed or started without the --channels flag.
Once you have the pairing code, go back to Claude Code and run:
/discord:access pair YOUR_PAIRING_CODE
Replace YOUR_PAIRING_CODE with the code your bot sent you.
After pairing, lock down access so only approved Discord accounts can message your session:
/discord:access policy allowlist
Don't skip this. Without an allowlist, anyone who messages your bot could potentially interact with your live Claude Code session—including people who accidentally discover it.
Step 10: Test Your Setup
Send a message to your bot in Discord. Ask it something simple, request a task, or tell it to check something.
The message gets sent to your running Claude Code session, Claude processes it, and the response comes back in Discord.
A few things to watch during testing:
Permission prompts can pause the bot. Claude Code is designed to ask before executing actions like running shell commands or writing files. If your request triggers a permission check, it stops and waits for approval in the terminal before responding in Discord. You'll need to approve it manually.
For less interruption during testing, you can launch Claude Code like this:
claude --dangerously-skip-permissions --channels plugin:discord@claude-plugins-official
This flag skips all permission prompts entirely. It's convenient for testing, but only use it in environments you fully control. The name says it all.
Conclusion
Claude Code's Channels feature is genuinely useful once it's set up. The setup has more steps than you'd expect, but most only need to happen once.
After that, your Discord bot becomes a direct interface to your local Claude Code session—you can interact with it from anywhere you can access Discord.
Here's the full process: Install Claude Code, log in with Claude.ai, install Bun, add the official plugin marketplace, install the Discord plugin, create and configure your Discord bot, launch Claude Code with Channels enabled, pair your Discord account, and test.
That's ten steps, each one fairly straightforward. What's interesting here is that once running, you've essentially built a bridge between Discord and your development environment—a genuinely useful workflow for keeping context across platforms.
Description: Step-by-step guide to integrate Claude Code with Discord via Claude Code Channels. Set up your bot, configure permissions, and start coding from Disco
Related Articles
- 8 Effective Methods to Monitor Your Hard Drive Health and Catch Problems Early
- How to Fix the Task Host Window Blocking Windows Shutdown
- How to Restore a Windows System Using UEFI-Compatible .tib Ghost Files
- Understanding Mesh WiFi: How Does a Mesh Network System Actually Work?
- The 22 Best Tools for Creating Bootable USB Drives
No Comment to " How to Connect Claude Code to Discord Using Claude Code Channels "