lark-chat-mcp
Enables 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.
README
lark-chat-mcp
飞书 ↔ Cursor / Claude 单会话远程聊天(v0.1.0)
你在飞书发消息,本机 Agent 通过 MCP 收到并流式回复——单群、单进程、零配置。
能做什么
| 方向 | 行为 |
|---|---|
| 飞书 → Agent | lark_chat_watch 收消息,自动开 ack 流式卡 |
| Agent → 飞书 | lark_chat_stream / lark_chat_progress 流式更新卡片 |
- 暂不支持多群并行
如何使用
- 配置好mcp,会话中
/mcp确认是Connected - 输入:
> 持续监听飞书群 <随便起个群名> - 然后就可以远程指挥你的
Claude/Cursor了
前置
- Node.js 18+
- lark-cli 已
auth login(user + bot 均ready) - 飞书应用已订阅
im.message.receive_v1并发布
首次接入完整步骤见 docs/how_to_work.md。
安装
npm(推荐)
以 Claude Code 为例:
# 当前项目
claude mcp add lark-chat-mcp -- npx -y @eos./lark-chat-mcp
# 全局
claude mcp add lark-chat-mcp -s user -- npx -y @eos./lark-chat-mcp
claude mcp list
Cursor / Claude Desktop 配置:
{
"mcpServers": {
"lark-chat-mcp": {
"command": "npx",
"args": ["-y", "@eos./lark-chat-mcp"]
}
}
}
重载 MCP 后 新开 Agent 会话,应看到 4 个工具。
源码开发
git clone https://github.com/gitByEOS/lark-chat-mcp
cd lark-chat-mcp
npm install
npm test # 期望全部通过
本地调试时 args 用 server.mjs 绝对路径:
{
"mcpServers": {
"lark-chat-mcp": {
"command": "node",
"args": ["/绝对路径/lark-chat-mcp/server.mjs"]
}
}
}
MCP 工具
| 工具 | 作用 |
|---|---|
lark_chat_session |
list 列群 · find 搜群 · create 建群并绑定 |
lark_chat_watch |
阻塞等消息;timeout 时立即再调(单次最长 30s) |
lark_chat_stream |
流式卡片 append → close |
lark_chat_progress |
step 逐步汇报,done=true 关闭 |
单实例与事件消费
全机只能运行 一个 server.mjs:
- 第二实例会因
~/.lark-chat-mcp/server.lock直接退出 - 同进程并发
watch返回watch_busy
ps aux | grep server.mjs # 应只有 1 个
lark-cli event status --json # active_consumers 应为 1
环境变量(可选)
MCP 日常不用配。仅边缘场景:
| 变量 | 说明 |
|---|---|
LARK_PEER_OPEN_ID |
群里只接收该用户(ou_xxx)的消息 |
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.