| title | cc-connect Feishu bot complete setup guide | |||||||
|---|---|---|---|---|---|---|---|---|
| domain | feishu | |||||||
| tags |
|
|||||||
| status | published | |||||||
| source | bootstrap | |||||||
| created | 2026-05-19 | |||||||
| updated | 2026-07-21 | |||||||
| confidence | 0.95 | |||||||
| verification | metadata-normalized |
Agents need a complete, copy-pasteable path to connect coding agents to Feishu (Lark) via cc-connect. Incomplete or placeholder (<bridge-tool>) docs cause failed installs and duplicate lessons.
Generic bridge docs omit the real package name and concrete config paths. Operators then invent parallel "complete setup" notes that drift into near-duplicates.
- Follow the solution steps in order
- Run any relevant commands or tests to confirm the fix
- Verify the symptom no longer occurs
- Check related logs or outputs for expected behavior
cc-connect 是一个连接 AI 编码代理(如 Claude Code)与消息平台(如飞书)的桥接工具。本文档记录完整的配置过程和常见问题解决方案。
npm install -g cc-connect验证安装:
cc-connect --versionmkdir -p ~/.cc-connect
cp /path/to/cc-connect/config.example.toml ~/.cc-connect/config.toml- 登录 https://open.feishu.cn
- 创建企业应用
- 启用机器人能力
- 添加权限:
im:message.receive_v1,im:message:send_as_bot - 事件订阅:选择 WebSocket 长连接模式,添加事件
im.message.receive_v1 - 发布应用版本
- 复制 App ID 和 App Secret
[[projects]]
name = "cc-connect-feishu"
[projects.agent]
type = "claudecode"
[projects.agent.options]
work_dir = "/path/to/your/project"
mode = "default"
[[projects.platforms]]
type = "feishu"
[projects.platforms.options]
app_id = "cli_xxxxxxxxxxxx"
app_secret = "xxxxxxxxxxxxxxxxxxxxxxxx"禁用工具调用和上下文提示:
[display]
mode = "quiet"
thinking_messages = false
thinking_max_len = 0
tool_max_len = 0
tool_messages = false
show_context_indicator = false
reply_footer = falsecc-connect问题:Error loading config: parse config: toml: line XXX: expected value but found '"' instead
原因:配置文件中使用了 Unicode 引号(" "),而不是标准 ASCII 引号(")
解决:
sed -i 's/\xe2\x80\x9c/"/g; s/\xe2\x80\x9d/"/g' ~/.cc-connect/config.toml问题:Error: another cc-connect instance is already running
解决:
cc-connect stop --force
cc-connect问题:发送消息后机器人无反应
检查项:
- 飞书开放平台事件订阅是否配置正确
- 是否启用了
im.message.receive_v1事件 - 是否选择了 WebSocket 长连接模式
- 应用是否已发布
-
检查 cc-connect 状态:
cc-connect status --force
-
查看日志:
cc-connect logs --force
-
在飞书中测试:
- 搜索机器人名称
- 发送消息测试
- 确认不显示工具调用和上下文提示
- 配置文件:
~/.cc-connect/config.toml - 会话数据:
~/.cc-connect/sessions/ - API socket:
~/.cc-connect/run/api.sock
- cc-connect GitHub: https://github.com/chenhg5/cc-connect
- 飞书开放平台: https://open.feishu.cn
Related: generic stub/redirect at
feishu-bot-setup-complete.md(duplicate cleanup #552).
- Prefer this file over archived generic Feishu stubs.
- Duplicate cleanup decision: issue #552 /
feishu-bot-setup-complete.mddecision lesson.