Skip to main content
Glama

飞书文档 MCP 服务

一个用于读取飞书文档内容的 MCP (Model Context Protocol) 服务。

功能

  • read_feishu_document: 读取飞书文档的完整内容

  • get_feishu_document_meta: 获取文档元信息(标题)

  • 支持普通文档和知识库(Wiki)文档

Related MCP server: MCP Server My Lark Doc

前置要求

  1. 飞书自建应用 credentials

  2. 已开通文档读取权限

  3. Node.js >= 18

安装

npm install
npm run build

配置

  1. 复制 .env.example.env

  2. 填写你的飞书应用凭证:

FEISHU_APP_ID=your_app_id
FEISHU_APP_SECRET=your_app_secret

飞书开放平台配置

  1. 创建自建应用:https://open.feishu.cn/

  2. 获取 App ID 和 App Secret

  3. 开通权限:

    • docx:document:readonly

    • docx:document:read

    • wiki:wiki:readonly(知识库文档需要)

  4. 发布应用(或使用调试模式)

使用方式

直接运行

# 设置环境变量
export FEISHU_APP_ID=your_app_id
export FEISHU_APP_SECRET=your_app_secret

# 运行
npm start

Claude Code 配置

claude_desktop_config.json 中添加:

{
  "mcpServers": {
    "feishu": {
      "command": "node",
      "args": ["/path/to/feishu-mcp-server/dist/index.js"],
      "env": {
        "FEISHU_APP_ID": "your_app_id",
        "FEISHU_APP_SECRET": "your_app_secret"
      }
    }
  }
}

文档 ID 获取

支持三种输入方式:

1. 普通文档

https://xxx.feishu.cn/docs/abcDEF123

文档 ID:abcDEF123

2. 知识库文档(Wiki)

https://xxx.feishu.cn/wiki/Bj3Jw2kfji45nhkK5MQcv3NynWe

直接传入完整 URL 或 Wiki 节点 ID:Bj3Jw2kfji45nhkK5MQcv3NynWe

3. 直接传入 ID

工具会自动识别是普通文档还是 Wiki 节点,并自动解析。

Available Tools

2 tools
get_feishu_document_metaA

获取飞书文档的元信息(标题)。根据文档 ID 或完整 URL 获取文档标题,不返回文档内容。支持普通文档和知识库(Wiki)文档。

ParametersJSON Schema
NameRequiredDescriptionDefault
document_idYes飞书文档的 ID 或完整 URL。支持普通文档和知识库文档。

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states that only the title is returned and not the document content, which is a key behavioral trait. It also discloses support for two document types. It doesn't mention error handling or return format, but for a simple metadata read operation, this is reasonably transparent.

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

Conciseness5/5

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

The description is two concise sentences that front-load the purpose and include necessary details (ID/URL input, no content return, document type support) without any wasted words or redundancy.

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?

For a simple one-parameter metadata retrieval tool with no output schema, the description covers the essential aspects: what it does, what it doesn't do, and input requirements. It could optionally mention the exact return format or behavior for invalid IDs, but the current description is sufficient for most AI use cases.

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?

The input schema already fully describes the single parameter (document_id) as accepting an ID or full URL and supporting both regular and wiki documents. The tool description adds no additional parameter-specific meaning beyond what the schema covers, so a baseline score of 3 is appropriate.

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 retrieves metadata (specifically the title) of a Feishu document, distinguishing it from the sibling tool by explicitly noting it does not return document content. This is a specific verb+resource+scope definition that leaves no ambiguity.

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?

The description gives clear usage context: it accepts a document ID or full URL and supports both regular and Wiki documents. It also implies the alternative use case by stating it doesn't return content, but does not explicitly name 'read_feishu_document' as the alternative for content retrieval.

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

read_feishu_documentA

读取飞书文档的内容。根据文档 ID 或完整 URL 获取文档的标题和完整文本内容。支持普通文档和知识库(Wiki)文档。

ParametersJSON Schema
NameRequiredDescriptionDefault
document_idYes飞书文档的 ID 或完整 URL。支持:1) 普通文档: https://xxx.feishu.cn/docs/abcDEF123 2) 知识库: https://xxx.feishu.cn/wiki/Bj3Jw2kfji45nhkK5MQcv3NynWe 或直接填节点 ID

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that the tool returns title and full text and supports wiki documents, which adds useful context. But it does not explicitly state read-only behavior or mention any auth/error details, though the verb 'read' implies non-mutating.

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

Conciseness5/5

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

The description is two short sentences, front-loaded with the core action, and contains no superfluous information. Every word adds value.

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?

For a simple one-parameter tool with no output schema, the description adequately covers what the tool does (read content), what it returns (title and full text), and its scope (normal and wiki docs). It lacks detail on output format or edge cases, but given the low complexity, it is reasonably complete.

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?

The schema already provides 100% coverage of the document_id parameter with detailed examples of URL formats. The description adds no extra parameter meaning beyond the schema, so baseline 3 applies.

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?

Description clearly states it reads Feishu document content, retrieving title and full text, and supports both normal and wiki documents. This is a specific verb+resource, though it does not explicitly distinguish itself from the sibling get_feishu_document_meta.

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?

Usage is implied: use when you need document content. However, there is no explicit guidance on when not to use it or how it compares to alternatives like get_feishu_document_meta.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.0
    • First observedget_feishu_document_meta
    • First observedread_feishu_document

TDQS

A3.8/5.0

Scored across 2 tools

Disambiguation5/5

read_feishu_document returns full content, while get_feishu_document_meta returns only metadata. Their purposes are clear and non-overlapping, so agents can easily select the right tool.

Naming Consistency5/5

Both tools follow a consistent [verb]_feishu_document pattern, with read and get as action prefixes. The naming is uniform and predictable.

Tool Count3/5

At 2 tools, the server feels thin for a document-focused MCP. While the current tools are focused, the small set suggests limited scope.

Completeness2/5

The server covers reading content and metadata but lacks listing, searching, creating, updating, or deleting documents. This is a significant gap for a Feishu document server, limiting agents to only read operations.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers