Program
Claude Code Channels lets you connect a live Claude Code session to messaging platforms such as Discord or Telegram, so you can send prompts through a bot and receive responses directly in chat.
Instead of staying in the terminal the entire time, you can interact with your running Claude Code workflow from a familiar messaging interface. While Dispatch handles automated, one-off tasks and Remote Control provides active oversight of a local session, Channels deliver the persistent, two-way connection required for conversational workflows.
In this tutorial, you will learn how to connect Discord to Claude Code Channels, from installing Claude Code to creating and pairing your Discord bot. By the end, you will have a working setup that can search the web, build apps, schedule tasks, and interact with your local operating system through Discord.
What Are Claude Code Channels?
Claude Code Channels let outside apps send messages into a live Claude Code session. In simple terms, they act as a bridge between Claude Code and tools like Discord, Telegram, alerts, or webhooks.
Claude receives the message inside the running session, works on it, and can send a reply back through the same channel.
Channels are still in research preview. They require Claude Code v2.1.80 or later, a Claude.ai login, and they do not work with console or API key authentication.
For Team and Enterprise accounts, the feature must also be enabled by the organization.
One important thing to know is that Channels only work while your Claude Code session is open and running. If you close Claude Code, incoming Discord or Telegram messages will not be handled.
If you want the setup to stay available all the time, you need to keep Claude Code running in a persistent terminal or background environment.
Claude Code Channels: Prerequisites
Before you start, make sure you have these things ready:
- Claude Code v2.1.80 or later
- A Claude.ai account signed in through Claude Code
- A Pro or Max plan
- Bun installed, since channel plugins require it
- A Discord account
- Access to a Discord server where you can add and manage a bot
It is also important to know that Claude Code Channels do not work with API key or a console-only login.
To use Channels, you must be signed in with your Claude.ai account. Team and Enterprise users may also need their admin to enable Channels first.
Step 1: Install Claude Code
Go to the official Claude Code website and open the installation guide. Anthropic provides install commands for different platforms, including Windows, macOS, Linux, and WSL. For this tutorial, we are using Windows PowerShell.

Source: Claude Code by Anthropic | AI Coding Agent, Terminal, IDE
Run the following command in PowerShell to install Claude Code:
irm https://claude.ai/install.ps1 | iex
After the installation finishes, create a new folder for this project, move into it, and start Claude Code:
mkdir cc-channelscd cc-channelsclaude
Claude Code will open in your terminal and start a local session. This is the base for the rest of the setup, because Channels only work inside an active Claude Code session.
Step 2: Log In With Your Claude.ai Account
Next, sign in to Claude Code with your Claude.ai account. In most cases, Claude Code will ask you to log in when you first open it. If it does not, run this command inside Claude Code:
/login

This step is very important because Channels only work with a Claude.ai login. They do not support console login or API key authentication, so even if Claude Code works in another billing mode, Channels may still be unavailable until you sign in with your Claude.ai account.
Step 3: Install Bun for the Discord Plugin
Claude Code’s official channel plugins use Bun, so you need to install it before setting up Discord. If you have not installed Bun yet, you can do it on Windows with this PowerShell command:
irm bun.sh/install.ps1 | iex
After the installation finishes, check that Bun is working by running:
bun --version
If Bun is installed correctly, PowerShell will show the version number.
Step 4: Add the Official Discord Plugin
Before you install the Discord plugin, make sure the official Claude Code plugin marketplace is added and up to date. Run these commands inside Claude Code:
/plugin marketplace add anthropics/claude-plugins-official/plugin marketplace update claude-plugins-official
This step is important because Claude Code may not find the Discord plugin if the marketplace is missing or outdated. If you see an error like “plugin not found in any marketplace,” these commands usually fix it.
Once the marketplace is ready, install the Discord plugin:
/plugin install discord@claude-plugins-official

After that, reload your plugins so Claude Code can activate the new plugin commands in your current session:
/reload-plugins
Reloading matters because Claude Code may not recognize plugin commands until the plugins are refreshed.
Step 5: Create a Discord Bot
Open the Discord Developer Portal and click New Application. Give your app a name such as CC-Bot, then create it. You can also add a description and profile image from the General Information page if you want.

Then:
- Open the Bot section
- Click Reset Token
- Copy the new bot token
- Save the token somewhere safe for the next step
This token is what lets Claude Code connect your Discord bot to your local Claude Code session.
Before leaving the Developer Portal, enable Message Content Intent in the bot settings.

Claude Code’s Discord setup needs the bot to read incoming message text, and Discord requires this intent for that.
Step 6: Invite the Bot to Your Discord Server
Next, add the bot to your Discord server. In the Discord Developer Portal, open the OAuth2 tab and scroll to OAuth2 URL Generator. Check bot under scopes.
Once you do that, Discord will automatically show the Bot Permissions section, where you can choose the permissions for your bot.
Select the following permissions:
- View Channels
- Send Messages
- Send Messages in Threads
- Read Message History
- Attach Files
- Add Reactions
- Send Voice Messages

After selecting the permissions, Discord will generate an invite URL for the bot. Copy this URL and paste it into your browser. It will open either the Discord desktop app or the Discord website, depending on your setup.
From there, choose the server where you want to add the bot and click Authorize. Once this is done, the bot should appear in your Discord server and will be ready for the next step.

Step 7: Configure the Bot Token in Claude Code
Now go back to Claude Code and connect it to your Discord bot by running this command:
/discord:configure YOUR_DISCORD_BOT_TOKEN
Replace YOUR_DISCORD_BOT_TOKEN with the bot token you copied from the Discord Developer Portal.
Claude Code will save it for you automatically, so you do not need to create the config file by hand.

By default, Claude Code stores the token in this file:
~/.claude/channels/discord/.env
You can also set the DISCORD_BOT_TOKEN environment variable yourself before starting Claude Code, but the /discord:configure command is usually the easiest option for most people.
Note: If this command does not work the first time, close your terminal and open it again. Then go back to your Claude Code project folder and launch Claude Code again. Because Channels only work inside an active, running Claude Code session, restarting the terminal and reopening Claude Code can help refresh the session and load the Discord setup correctly.
Step 8: Start Claude Code With Channels Enabled
At this point, your Discord bot is set up, but it will not work until Claude Code is started with the Discord channel enabled.
Exit your current Claude Code session, then start it again with:
claude --channels plugin:discord@claude-plugins-official

This command launches Claude Code and loads the Discord channel plugin at the same time.
Once it starts, your bot can come online and begin receiving messages from Discord in that live Claude Code session. Channels only work while the session is open, so if you close Claude Code, the bot will stop responding until you launch it again.
Step 9: Pair Your Discord Account
Once Claude Code is running with the Discord channel enabled, open Discord and send a direct message to your bot. The bot should reply with a pairing code. This only works while Claude Code is running with the --channels flag, so if the bot does not respond, check that your Claude Code session is still active.

Then go back to Claude Code and run:
/discord:access pair YOUR_PAIRING_CODE
Replace YOUR_PAIRING_CODE with the code the bot sent you. This approves your Discord account and adds it to the allowed sender list for that Claude Code session.

After pairing, lock access down so only approved senders can message your session:
/discord:access policy allowlist
This is an important security step. Claude Code Channels use an allowlist model, which means only approved Discord users can send messages into your running session. Anyone else will be ignored.
Step 10: Test Claude Code Channels in Discord
Now you can start using the bot in Discord much like you would use Claude Code in the terminal. Send it a message, ask it to do something, and it will reply back in chat while using your live Claude Code session in the background.
For example, you can ask it to check the weather, create a reminder, or build a simple website.
Channels work by sending your Discord message into the running Claude Code session, then returning the response back to Discord.

One thing you may notice is that Claude Code can stop and ask for permission before using certain tools. This is normal. Claude Code is designed to ask before taking actions like running commands or making changes, and permission prompts can pause the session until you approve them.
You can manage these rules with /permissions, or use other permission modes if you want fewer interruptions.
For testing, some people start Claude Code with this command:
claude --dangerously-skip-permissions --channels
plugin:discord@claude-plugins-official
This skips permission prompts, so the Discord bot can continue working without asking you to approve each action. However, the official docs recommend using this only in environments you fully trust, because it removes an important safety check.
After that, you can try a few simple tasks. For example, you can ask the bot to set a reminder. Claude Code can read your request, reason through it, and respond inside Discord.

I asked it to build a simple portfolio website. It generated the files and gave a quick response inside Discord.

I then opened the result in my browser, and for a first quick version, it looked good.

After that, I even changed the bot’s behavior so I could send voice notes and get voice note replies back. That made the interaction feel much more natural, almost like a real conversation.

Troubleshooting Common Issues
A few issues are especially common when setting up Discord with Claude Code Channels.
If Claude Code cannot find the Discord plugin, the official marketplace is usually the problem. Add or update the claude-plugins-official marketplace again, then reinstall the Discord plugin. In the current Channels preview, approved plugins come from the official marketplace.
If /discord:configure does not work, the plugin may be installed but not loaded into the current session. Run /reload-plugins, and if that does not help, close the terminal, return to your project folder, and launch Claude Code again.
If your bot appears offline in Discord, first check the basics: make sure the bot token is correct, make sure Claude Code was started with claude --channels plugin:discord@claude-plugins-official, and make sure the Claude Code session is still open. Channels only work while the local session is running.
If the bot is online but not reading incoming messages correctly, open the Discord Developer Portal and confirm that Message Content Intent is turned on. Discord’s docs note that apps without this intent can receive empty message content fields.
If pairing fails, send the bot a DM again and confirm that Claude Code is still running with Channels enabled. The pairing flow depends on the live local plugin replying with a pairing code.
Finally, if you are using Claude Pro or Max as an individual, you can enable Channels per session with the --channels flag. If you are on Team or Enterprise, your admin may need to enable Channels first in the organization settings. Channels also require a Claude.ai login, so they will not work if you are signed in with API-key-only authentication.
Final Thoughts
Claude Code Channels offer a simple way to bring Discord into your Claude Code workflow. After the initial setup, your Discord bot becomes a direct link to a live Claude Code session, making it easier to send prompts, get responses, and interact with Claude Code from chat instead of staying in the terminal.
In this tutorial, you installed Claude Code, signed in with your Claude.ai account, installed Bun, added the official plugin marketplace, set up and invited a Discord bot, configured the bot token, launched Claude Code with Channels enabled, paired your account, and tested the full setup in Discord.
Once connected, the bot can handle quick questions, reminders, simple project tasks, and other workflows through chat. The main thing to remember is that Channels depend on a live Claude Code session, so the bot only works while Claude Code is running.
Claude Code Channels FAQs
Do Claude Code Channels stay active after I close my terminal?
No. Channels act as a bridge to a live local session. If you close Claude Code, your Discord bot will stop responding to incoming messages. To keep the bot available continuously, you must keep Claude Code running in a persistent terminal or background environment.
Can I set up Channels using just an API key?
No. Claude Code Channels do not support API-key or console-only authentication. You must be actively signed into a Claude.ai account on a Pro or Max plan. (Team and Enterprise users may also need their organization admin to enable the feature).
How do I stop random people in my Discord server from running commands on my machine?
Claude Code Channels use an allowlist model for security. Before using the bot, you must send it a direct message to receive a pairing code, which you then enter into your terminal (/discord:access pair YOUR_PAIRING_CODE). Running /discord:access policy allowlist afterward ensures that only approved Discord users can interact with your local session.
Why is my Discord bot online but ignoring my messages?
The most common culprit is missing intents. You must enable the Message Content Intent in the Discord Developer Portal; without it, Discord sends empty text fields to your bot. Additionally, verify that your local session was launched specifically with the --channels plugin:discord@claude-plugins-official flag.

As a certified data scientist, I am passionate about leveraging cutting-edge technology to create innovative machine learning applications. With a strong background in speech recognition, data analysis and reporting, MLOps, conversational AI, and NLP, I have honed my skills in developing intelligent systems that can make a real impact. In addition to my technical expertise, I am also a skilled communicator with a talent for distilling complex concepts into clear and concise language. As a result, I have become a sought-after blogger on data science, sharing my insights and experiences with a growing community of fellow data professionals. Currently, I am focusing on content creation and editing, working with large language models to develop powerful and engaging content that can help businesses and individuals alike make the most of their data.

