wxkingstar

Clawrelay Feishu Server — Development skill for Claude Code

Development community

飞书(Lark) chatbot powered by Claude Code via ClawRelay.

How to install Clawrelay Feishu Server

This entry records only its repository, not the path inside it, so there is no exact command to give. Open wxkingstar/clawrelay-feishu-server and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Clawrelay Feishu Server does

飞书(Lark) chatbot powered by Claude Code via ClawRelay. WebSocket long connection, streaming reply, multimodal support. 无需公网IP,三步接入。

Alternatives in Development

  • Canvas API — Canvas LMS API connection guide and MCP tools reference 2.6k ★
  • SOUL — You're not a chatbot 1.3k ★
  • Beautiful Feishu Whiteboard — 35 curated colour palette styles for building beautiful, editable Feishu / Lark (飞书) whiteboards 687 ★

README

ClawRelay Feishu Server

让飞书机器人接入 AI —— 三步启动,开箱即用。

![Python 3.12+](https://img.shields.io/badge/Python-3.12+-blue.svg) ![License MIT](https://img.shields.io/badge/License-MIT-yellow.svg)

飞书用户发消息 → 本服务 WebSocket 接收 → clawrelay-api → Claude Code 处理 → 流式回复推送

**无需公网 IP**,无需回调 URL,无需数据库。通过飞书官方 SDK WebSocket 长连接接收消息,YAML 配置即用。


30 秒了解

你需要准备:

  1. 飞书自建应用App IDApp Secret(从飞书开放平台 → 开发者后台 → 创建应用 获取)
  2. clawrelay-api 运行在本机(默认端口 50009)

然后:

git clone https://github.com/wxkingstar/clawrelay-feishu-server.git
cd clawrelay-feishu-server
pip install -r requirements.txt
python main.py

首次启动会自动进入**配置向导**,按提示填入 `App ID` 和 `App Secret` 即可:

==================================================
飞书机器人配置向导
==================================================

请输入飞书应用 App ID: __________
请输入飞书应用 App Secret: __________
请输入 ClawRelay API 地址 [http://localhost:50009]: __________
请输入 Claude 工作目录 [留空使用默认]: __________

配置已保存到 config/bots.yaml

配置完成,服务自动启动 WebSocket 连接。去飞书给机器人发条消息试试吧。


Docker 部署

git clone https://github.com/wxkingstar/clawrelay-feishu-server.git
cd clawrelay-feishu-server

# 编辑配置(Docker 中不支持交互式向导,需提前填写)
cp config/bots.yaml.example config/bots.yaml
vim config/bots.yaml

docker compose up -d

Docker 模式下 `relay_url` 需使用 `http://host.docker.internal:50009`(而非 `localhost`)连接宿主机的 clawrelay-api。

docker compose logs -f app   # 查看日志
docker compose down           # 停止

功能一览

特性 说明
WebSocket 长连接 基于飞书官方 SDK,无需公网 IP、回调 URL
零外部依赖 无数据库,YAML 配置 + 内存会话 + JSONL 日志
首次配置向导 启动即引导,无需手动编辑配置文件
多机器人 一个服务托管多个机器人,YAML 中加一段配置即可
流式回复 500ms 节流编辑消息,实时展示 AI 回复
多模态 文本 / 富文本(post) / 图片 / 文件
会话管理 自动过期,发送 reset清空 手动重置
自定义命令 模块化扩展,动态加载
用户白名单 按机器人维度的访问控制

配置说明

配置文件:`config/bots.yaml`

bots:
  my_bot:
    # === 必填 ===