AI
Claude Code
Developer Tools
Claude Code Channels - 推送事件到运行中的会话
摘要
Claude Code 新功能 channels,允许通过 MCP 服务器向运行中的会话推送事件。Claude 可以 reacting to things that happen while you're not at the terminal。Channels 可以是双向的:Claude 读取事件并通过同一通道回复。
研究预览版 - 需要 Claude Code v2.1.80 或更高版本,需要 claude.ai 登录
支持渠道
Telegram 集成
- 通过 BotFather 创建机器人
- 安装:
/plugin install telegram@claude-plugins-official - 配置:
/telegram:configure <token> - 启动:
claude --channels plugin:telegram@claude-plugins-official - 配对: 发送消息到机器人获取配对码
Discord 集成
- 在 Discord Developer Portal 创建应用
- 启用 Message Content Intent
- 邀请机器人到服务器
- 配置和启动流程类似 Telegram
Fakechat 演示
本地演示通道,无需认证:
- 安装:
/plugin install fakechat@claude-plugins-official - 启动:
claude --channels plugin:fakechat@claude-plugins-official - 访问: http://localhost:8787
应用场景
CI 结果推送: 构建完成自动通知 Claude 分析失败原因
监控事件: 错误警报触发 Claude 生成修复建议
Chat 消息: 远程通过 Telegram/Discord 与 Claude 交互
安全
- Sender allowlist: 只有你添加的 ID 可以推送消息
- Pairing 验证: 配对时需要验证身份
- 其他发送者被静默丢弃
URL
来源: Hacker News | 发现日期: 2026-03-20