tencent cloud

Channels [Beta]

Download
Focus Mode
Font Size
Last updated: 2026-09-30 18:41:47
AI-Translated
Note:
Beta Feature: Channels is currently in the Beta stage, and its features and APIs may be adjusted based on feedback.

Overview

A Channel is a type of MCP server that can push messages, alarms, and webhooks into your running CodeBuddy Code sessions, enabling CodeBuddy Code to react to external events even when you are away from the terminal.
A Channel can be bidirectional: CodeBuddy Code reads events and replies through the same channel, acting like a chat bridge. Events arrive only when the session is open. To keep it running continuously, you can run CodeBuddy Code in a background process or a persistent terminal.
You can enable it by installing a plugin or using a built-in channel. WeChat, Telegram, Discord, and the fakechat demo are all supported. When CodeBuddy Code replies through a channel, the terminal displays tool calls and confirmations (such as "sent"), while the actual reply content appears on the corresponding chat platform.
Note:
To build your own channel, refer to the Channels Reference.

Supported Channels

WeChat (Built-in)

The WeChat channel is built into CodeBuddy Code and requires no plugin installation. It enables bidirectional messaging through WeChat ClawBot, supporting the sending and receiving of text, images, and files.
Prerequisites:
WeChat version iOS 8.0.70 or later
Enable the ClawBot plugin in WeChat (WeChat > Me > Settings > Plugins > ClawBot).
Scan the QR code to bind:
1. In CodeBuddy Code, run /remote-control wechat or /remote-control and select wechat.
2. The terminal displays a QR code. If the QR code fails to display properly, a browser link is provided.
3. Scan the QR code with WeChat and confirm.
4. After successful binding, message receiving starts automatically.
Usage:
After binding, send a message in the WeChat ClawBot conversation, and the message will automatically appear in the CodeBuddy Code session:
#wechat · user_id: Hello, please help me look into this bug.
CodeBuddy Code processes the message and replies through the WechatReply tool, with the reply content appearing in WeChat.
Supported message types:
Type
Receive
Send
Text
Supported
Supported
Figure
Supported (automatically downloads and decrypts to local storage)
Supported (automatically encrypts and uploads to CDN)
File
Supported
Supported
Credential Management:
After a successful scan, the credentials are saved in ~/.codebuddy/channels/wechat/credentials.json. The saved credentials are automatically used on the next startup, so rescanning is not required.
# View connection status
/remote-control wechat status

# Disconnect
/remote-control wechat stop

# Reconnect (using saved credentials)
/remote-control wechat start

Telegram

You need to install the plugin. View the complete Telegram plugin source code.
1. Create a bot in Telegram through BotFather and obtain the token.
2. Install the plugin: /plugin install telegram@claude-plugins-official
3. Configure the token: /telegram:configure <token>
4. Start: codebuddy --channels plugin:telegram@claude-plugins-official
5. Send a message to the bot to obtain a pairing code, and then run /telegram:access pair <code> to complete pairing.

Discord

You need to install the plugin. View the complete Discord plugin source code.
1. Create an application and a bot in the Discord Developer Portal.
2. Enable Message Content Intent and invite the bot to your server.
3. Install the plugin: /plugin install discord@claude-plugins-official
4. Configure the token: /discord:configure <token>
5. Start: codebuddy --channels plugin:discord@claude-plugins-official
6. DM the bot to obtain a pairing code, and then run /discord:access pair <code> to complete pairing.

fakechat (Demo)

fakechat is an officially supported demo channel that runs a chat UI on localhost without authentication or external services.
# Installation
/plugin install fakechat@claude-plugins-official

# Start
codebuddy --channels plugin:fakechat@claude-plugins-official
Open http://localhost:8787 to start chatting.

Quick Start

Use the WeChat channel as an example to quickly experience the complete bidirectional messaging flow:
Step 1: Ensure that ClawBot is enabled
In WeChat, open Me > Settings > Plugins, find ClawBot, and enable it.
Step 2: Scan the QR code to bind
Start CodeBuddy Code and run:
/remote-control wechat
The terminal displays a QR code. Scan it with WeChat and confirm the binding.
Step 3: Send a message
Send a message in the WeChat ClawBot conversation:
Check what files are in the current directory for me.
When a message arrives in a CodeBuddy Code session, it is displayed as:
#wechat · user_id: Check what files are in the current directory for me.
After CodeBuddy Code completes a task, it replies through the WechatReply tool, and the reply content appears in WeChat.
Step 4: Send an image
Send a screenshot to ClawBot in WeChat, and CodeBuddy Code will automatically download and recognize the image content. You can ask it to edit the image and send it back:
Add a hat to the person in the image.
CodeBuddy Code processes the image using the ImageEdit tool and then sends the edited image back to WeChat through the WechatReply tool.

Security Mechanism

WeChat

The WeChat channel ensures security through ClawBot's QR code authentication mechanism. Only WeChat accounts bound by scanning the QR code can send messages, while messages from others are silently discarded. Credentials, including bot_token and account_id, are stored locally with permissions set to 600, which allows read and write access only for the owner.

Plugin Channels

Plugin channels such as Telegram and Discord maintain an allowlist of senders. Add trusted senders through the pairing process:
1. Send any message to the bot.
2. The bot replies with a pairing code.
3. Confirm the pairing code in CodeBuddy Code.
4. The sender ID is added to the allowlist.
The allowlist also controls permission relay. People who reply through the channel can approve or reject tool calls, so add only trusted senders to the allowlist.

Other Security Elements

Configuring only in .mcp.json is not sufficient to push messages. You must also specify them in --channels.
Organizations can centrally manage this through the channelsEnabled setting.

Organizational Governance

The Channel feature is controlled by the channelsEnabled setting:
Plan Type
Default Behavior
Individual user
Available. Users can enable it per session through --channels.
Team/enterprise
Disabled by default. Administrators need to explicitly enable it.

Enabling Channels for an Organization

Administrators can set this in settings.json:
{
"channelsEnabled": true
}
When the setting is enabled, users in the organization can use --channels to connect channel servers to their sessions. If the setting is disabled, MCP servers remain connected and tools remain available, but channel messages will not be delivered.

Feature Comparison

CodeBuddy Code provides multiple features for connecting to external systems, each suited to different scenarios:
Function
Function
Scenario
Standard MCP server
CodeBuddy Code queries it during tasks but does not push it to the session.
Read or query the system on demand
Remote Control
Control local sessions remotely
Control ongoing sessions when away from the desktop
Channel
Push external events to running local sessions
Chat bridge, Webhook receiving, alarm response
Channels fill the gap by pushing events from non-CodeBuddy Code sources into already running local sessions:
Chat Bridge: Ask CodeBuddy Code questions through WeChat, and the answers appear in WeChat, while the actual work runs on your machine and uses your real files.
Webhook Receiver: When a Webhook from CI, an error tracker, or a deployment pipeline arrives, CodeBuddy Code has already opened your files and remembers what you are debugging.

Next

Build your own Channel: create a channel for systems that do not yet have a plugin.
Use /remote-control to manage all remote control connections.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback