Skip to main content
Glama
gitByEOS
by gitByEOS

lark-chat-mcp

飞书 ↔ Cursor / Claude 单会话远程聊天(v0.1.0)

你在飞书发消息,本机 Agent 通过 MCP 收到并流式回复——单群、单进程、零配置

能做什么

方向

行为

飞书 → Agent

lark_chat_watch 收消息,自动开 ack 流式卡

Agent → 飞书

lark_chat_stream / lark_chat_progress 流式更新卡片

  • 暂不支持多群并行

Related MCP server: feishu_mcp_server

如何使用

  1. 配置好mcp,会话中/mcp 确认是 Connected

  2. 输入:> 持续监听飞书群 <随便起个群名>

  3. 然后就可以远程指挥你的Claude/Cursor

前置

  • Node.js 18+

  • lark-cliauth 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    # 期望全部通过

本地调试时 argsserver.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

流式卡片 appendclose

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)的消息

Available Tools

4 tools
lark_chat_progressA

改代码时逐步汇报进度:首步 open 流式卡,后续 step 自动 append,done=true 关闭。

ParametersJSON Schema
NameRequiredDescriptionDefault
stepNo本步进度(增量行,累积显示)
doneNotrue=结束 progress 并 close 卡片
stream_idNo沿用 watch 返回的 stream_id,避免重复开卡
reply_toNo无 stream_id 时首步可选,回复指定 message_id
footerNo底部状态,如「编码中」
resetNotrue=先关闭旧 progress 再开新的

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It effectively discloses the lifecycle: first step opens, subsequent appends, done closes. It also mentions stream_id to avoid duplicate cards and reset behavior. However, it does not cover prerequisites or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that delivers key points upfront. It is efficient with no wasted words, though slightly informal. It earns a high score for being concise yet informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters and no output schema or annotations, the description covers the main use case and lifecycle. However, it lacks details on error handling, rate limits, or expected input formats. It is adequate but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage with descriptions for all 6 parameters. The description adds value by explaining how parameters interact in the flow (e.g., stream_id prevents duplicate cards, reset closes old progress). This goes beyond the schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to report progress step by step when modifying code. It explains the behavior: first step opens a streaming card, subsequent steps append, and done=true closes. While it doesn't explicitly differentiate from sibling tools, the context implies it is for progress updates in a chat environment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a context ('when changing code') for usage but lacks explicit guidance on when not to use or alternatives. Sibling tools are not compared, so an agent might not know when to choose this over others like lark_chat_session.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lark_chat_sessionC

飞书单会话:list 列群 · find 按名搜 · create 自定义群名建群并绑定。

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYeslist|find|create
nameNocreate 必填:自定义群名
queryNofind 必填:群名关键词

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It mentions 'create group and bind' but does not explain what 'bind' entails, nor does it address permissions, side effects, or return behavior. For a tool with create and list actions, more detail is needed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise line that efficiently lists all actions. It is front-loaded with the tool purpose. Some may prefer more structure, but it is not verbose and every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (three actions, no output schema, no annotations), the description is too brief. It lacks return value information, error handling hints, and differentiation from sibling tools. The 'bind' concept is left undefined. More context is needed for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema sufficiently documents parameters. The tool description adds the context that 'name' is required for create and 'query' for find, but this is already implied by the schema descriptions. No additional semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool is for Feishu single chat sessions and lists three distinct actions (list, find, create) with brief explanations. Specific verbs ('list', 'search', 'create') and resources ('groups') are provided, giving a clear purpose. It is not a tautology and distinguishes from named sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus sibling tools (lark_chat_progress, etc.) or when to choose among the three actions. The description simply lists the actions without contextual cues, leaving the agent to infer usage from the action names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lark_chat_streamB

飞书 CardKit 流式卡片:append 累积更新 → close 终态。watch 已开卡时用返回的 stream_id。

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesopen=开流式卡;append=更新全文;close=结束流式
textNo累积全文(append/close 必填)
stream_idNoopen 返回的 stream_id(append/close 必填)
reply_toNoopen 时可选,回复指定 message_id
footerNo底部状态,如「思考中」「输出中」

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries full burden. It only discloses the basic lifecycle (open, append, close) but lacks details on side effects, destructive actions, auth requirements, or rate limits. Minimal behavioral insight beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise (two sentences) with no wasted words. It front-loads the main idea. However, the phrasing is somewhat cryptic and in Chinese, which slightly reduces clarity for English agents.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on the relationship with sibling tools (except watch), failure modes, and the overall workflow. Leaves many questions unanswered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the base score is 3. The description does not add significant new meaning beyond the schema; it only implicitly references action and stream_id. No improvement beyond baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool is for streaming cards (CardKit) with actions append and close, and mentions watch for stream_id. It distinguishes from watch but not from other siblings like progress or session. The purpose is clear but not fully explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: 'watch 已开卡时用返回的 stream_id' indicates it's for after watch opens a card. However, it does not explicitly state when to use this tool versus alternatives, nor provides when-not-to-use conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lark_chat_watchA

阻塞等待飞书用户新消息(单群)。 先 session(create/find) 拿 chat_id,或 watch(chat_id=oc_xxx) 绑定。 收到后自动开流式卡,timeout 时立即再 watch(单次最长 30s poll)。 探活:clear=true, timeout_ms=1000,响应额外含 guide。

ParametersJSON Schema
NameRequiredDescriptionDefault
timeout_msNo期望总等待毫秒,单次调用最长 30s
clearNo等待前清空待处理队列
chat_idNo目标群 oc_xxx;create/find 后可省略

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses blocking, 30s max poll, auto re-watch, probe mechanism with clear and timeout_ms, and guide in response. Minor omission of error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences covering key points without redundancy. Could be more structured but retains essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and complex behavior, description covers core flow: setup, blocking wait, timeout handling, probe usage. Lacks error scenarios but sufficient for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%; description adds modest context (e.g., timeout_ms as expected total wait, clear as clear pending queue). But mostly restates schema with slight elaboration.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool blocks waiting for new messages in a single group chat, mentions prerequisites (session/find, watch binding), and distinguishes from siblings by specifying '单群' (single group) and blocking behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Describes when to use (after session/find, or with chat_id), timeout behavior (auto re-watch), and probe usage. Lacks explicit when-not-to-use versus sibling tools like lark_chat_stream.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.4/5.0
Disambiguation3/5

Tools have distinct names but functional overlap: lark_chat_progress and lark_chat_stream both involve streaming card updates, and lark_chat_watch also opens a streaming card on receiving messages. This could cause confusion for an agent selecting a tool for card operations.

Naming Consistency5/5

All tools follow a consistent 'lark_chat_<noun>' pattern in snake_case, making them predictable and easy to distinguish by name alone.

Tool Count4/5

With 4 tools, the set is slightly small but covers the essential functions of session management, progress updates, streaming cards, and message watching, which is reasonable for a focused chat integration.

Completeness3/5

The tool surface lacks basic messaging operations like sending plain text or media, and there is no explicit delete or edit. While progress and stream cover some updates, there are notable gaps for a general chat server.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    223
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP 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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gitByEOS/lark-chat-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server