Claude Code Feishu Channel
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Code Feishu Channelreply to the latest Feishu message with a summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Code Feishu Channel
飞书 (Feishu/Lark) channel plugin for Claude Code — 将飞书消息实时推送到 Claude Code session,Claude 可以直接在飞书中回复(支持纯文本 / markdown / 图片 / 文件 / 视频 / 互动卡片 等所有飞书消息类型)。
架构 (v2.0 — lark-cli wrapper)
飞书 long-conn ↓ NDJSON events
lark-cli event consume im.message.receive_v1
↓ pipe stdout (1 line/event)
index.mjs (thin MCP wrapper)
↓ MCP channel notification
Claude Code session
↓ feishu_reply / feishu_reply_markdown / feishu_send_markdown
lark-cli im +messages-reply / +messages-send
↓ Feishu IM v1 API
飞书为什么 v2.0 重构:v1 自己实现了 17+ 种消息类型的转化器(fork 自 larksuite/openclaw-lark),但 lark-cli 已经把消息转化 + 长连接 + send/reply 全包了,本插件不需要自己维护这些代码。重构后:
✅ 代码量:~580 行 → ~200 行(thin wrapper)
✅ 维护:不再追 openclaw / lark SDK 升级;跟着 lark-cli 走
✅ 凭证安全:用 lark-cli config(macOS Keychain),不再
.env明文✅ 消息类型:跟 lark-cli 一致(text / markdown / post / image / file / video / audio / sticker / interactive card / share_chat / share_user / location / system / hongbao / calendar / video_chat / todo / vote 等)
✅ markdown auto-render:lark-cli 自动把 markdown 转 Feishu post 格式(粗体 / 列表 / code block / 图片 URL 内联)
Related MCP server: feishu-user-plugin
前置依赖
lark-cli(这个插件的核心依赖)
npm install -g @larksuite/cli或从 https://github.com/larksuite/cli/releases 拉 binary。装完跑
lark-cli --versionverify。lark-cli 配置 Feishu 应用
lark-cli config init --new交互流程会:
在 https://open.feishu.cn/app 创建一个自建应用
把 App Secret 存到 macOS Keychain(不是明文 .env)
把 App ID + identity 存到
~/.lark-cli/config.json
飞书开发者后台为该应用启用:
事件与回调 → 订阅方式:长连接
添加事件:
im.message.receive_v1权限管理:
im:message+im:message:send_as_bot
安装
一键安装(推荐)
# 克隆到本地工作目录(install.sh 会建 symlink 到 ~/.claude/channels/feishu)
git clone <repo-url> ~/Desktop/code/claude-code-feishu-channel
cd ~/Desktop/code/claude-code-feishu-channel
# 一键脚本:lark-cli 检查 + npm install + symlink + 注册 MCP + 配权限
./install.shinstall.sh 自动做的事:
检查
lark-cli已装且lark-cli config已初始化npm install装@modelcontextprotocol/sdk(唯一依赖)建 symlink
~/.claude/channels/feishu→ 你的工作目录(改 repo 自动同步)在
~/.claude.json注册feishuMCP server在
~/.claude/settings.json加mcp__feishu__feishu_reply/feishu_reply_markdown/feishu_send_markdown到permissions.allow(飞书收到消息 = 想要回复,每次问没必要)
脚本幂等,重跑不会重复或覆盖(两个 JSON 文件改前都备份)。
手动安装
brew install lark-cli && lark-cli config init --new
git clone <repo-url> ~/Desktop/code/claude-code-feishu-channel
cd ~/Desktop/code/claude-code-feishu-channel
npm install
ln -s "$(pwd)" ~/.claude/channels/feishu
# 然后看 install.sh 第 4 + 5 步手动改 ~/.claude.json + ~/.claude/settings.json启动
claude --dangerously-load-development-channels server:feishu启动后在飞书里给你的 bot 发消息 — 推到 CC session。Claude 用 feishu_reply / feishu_reply_markdown 工具回复。
工具
工具 | 说明 | 内部命令 |
| 纯文本回复指定消息 |
|
| markdown 富文本回复(自动转 Feishu post) |
|
| 主动发新消息到 chat(不是 reply) |
|
| 管理发送者白名单 (list/add/remove) | 本地文件 |
| 通过配对码授权 un-allowlisted 用户 | 本地文件 |
消息类型
接收端:lark-cli 已自动渲染所有飞书消息类型为 human-readable text。详见 lark-cli event schema im.message.receive_v1。
发送端:lark-cli 支持 text / markdown / post / image / file / audio / video / interactive / share_chat / share_user 等。本插件目前只暴露 text + markdown 两个工具(覆盖 99% chat 场景);如需 image / file / interactive 等,扩展 index.mjs 加新工具即可(依然是 spawn lark-cli 一行)。
Debug
tail -f ~/.claude/channels/feishu/debug.logLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Sendbird — chat users, channels, members, and messages from your AI client.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI models to perform function calls through Feishu/Lark messaging platform, using your personal account (no bot configuration needed) to create a full-featured AI assistant.236-
- AlicenseBqualityAmaintenanceAll-in-one Feishu/Lark MCP for Claude Code & Codex. 84 tools, 3 auth layers, send-as-user (cookie + protobuf protocol path). Covers IM, docs, bitable, wiki, drive, calendar, tasks v2, OKR, realtime WS events.84146 npm10MIT
- AlicenseBqualityDmaintenanceEnables remote chat between Feishu (Lark) and AI agents like Cursor/Claude via MCP, allowing users to send messages from Feishu groups and receive streaming replies.44 npmMIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Feishu/Lark API integration, enabling AI agents to send messages, manage groups, create and edit documents and spreadsheets, and search knowledge bases.MIT