Feishu MCP Server
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., "@Feishu MCP Server Create a 'Meeting Minutes' doc and insert a table for the project milestones."
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.
🔗 Feishu MCP Server
让 AI 助手直接读写飞书文档
✨ 简介
Feishu MCP Server 是一个基于 Model Context Protocol (MCP) 的飞书文档集成服务。它让 AI 助手(如 GitHub Copilot、Claude、Cursor 等)能够直接操作飞书文档,实现文档自动化。
🎯 应用场景
📝 技术文档自动生成 - AI 自动撰写设计文档、API 文档
📊 数据报表输出 - 将数据分析结果直接写入飞书
📋 会议纪要整理 - 自动生成结构化的会议记录
🔄 知识库维护 - 批量更新和管理知识库内容
Related MCP server: Google Docs MCP Server
🚀 功能特性
📄 文档操作
功能 | 工具 | 说明 |
读取文档 |
| 支持 Markdown/JSON 格式输出 |
创建文档 |
| 支持完整 Markdown 语法 |
追加内容 |
| 智能识别 Markdown 表格 |
更新内容 |
| 替换文档全部内容 |
文档信息 |
| 获取标题、ID、版本等 |
📊 富文本元素
功能 | 工具 | 说明 |
插入表格 |
| 自适应列宽,支持 Markdown 表格语法 |
插入图表 |
| Mermaid 流程图、时序图、架构图 |
插入引用块 |
| 高亮提示信息 |
上传图片 |
| 上传本地图片 |
插入图片 |
| 将图片插入文档 |
📈 电子表格 & 多维表格
功能 | 工具 | 说明 |
创建电子表格 |
| 创建新的 Sheet |
写入数据 |
| 批量写入单元格数据 |
读取数据 |
| 读取指定范围数据 |
创建多维表格 |
| 创建 Bitable |
添加记录 |
| 批量添加记录 |
读取记录 |
| 读取表格数据 |
🔧 块操作
功能 | 工具 | 说明 |
列出块 |
| 查看文档结构 |
删除块 |
| 删除指定块 |
📦 快速开始
1. 安装
# 克隆项目
git clone https://github.com/redleaves/feishu-mcp-server.git
cd feishu-mcp-server
# 安装依赖
npm install
# 编译
npm run build2. 配置飞书应用
访问 飞书开放平台 创建应用
获取
App ID和App Secret添加以下权限并发布应用:
权限标识 | 权限名称 | 用途 |
| 查看、评论和编辑新版文档 | 文档读写 |
| 查看新版文档 | 文档读取 |
| 查看知识库 | 知识库访问 |
| 查看、评论和编辑云空间中的文件 | 云空间操作 |
| 查看、评论和编辑多维表格 | 多维表格操作 |
3. 配置 MCP 客户端
编辑 ~/.copilot/mcp-config.json:
{
"mcpServers": {
"feishu": {
"type": "stdio",
"command": "node",
"args": ["/path/to/feishu-mcp-server/dist/index.js"],
"env": {
"FEISHU_APP_ID": "cli_xxxxxxxx",
"FEISHU_APP_SECRET": "your_app_secret"
}
}
}
}编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"feishu": {
"command": "node",
"args": ["/path/to/feishu-mcp-server/dist/index.js"],
"env": {
"FEISHU_APP_ID": "cli_xxxxxxxx",
"FEISHU_APP_SECRET": "your_app_secret"
}
}
}
}在 Cursor 设置中添加 MCP Server:
{
"mcp.servers": {
"feishu": {
"command": "node",
"args": ["/path/to/feishu-mcp-server/dist/index.js"],
"env": {
"FEISHU_APP_ID": "cli_xxxxxxxx",
"FEISHU_APP_SECRET": "your_app_secret"
}
}
}
}💡 使用示例
创建技术设计文档
创建一个飞书文档,标题是"系统架构设计",包含:
1. 项目背景
2. 技术方案(插入架构图)
3. 实施计划表格读取并总结文档
读取这个飞书文档 https://xxx.feishu.cn/wiki/ABC123,帮我总结要点插入数据表格
在文档中插入一个表格,展示各模块的开发进度生成架构图
在文档中插入一个 Mermaid 流程图,展示用户登录流程📐 技术架构
flowchart TB
subgraph Clients["AI 客户端"]
Copilot["GitHub Copilot"]
Claude["Claude Desktop"]
Cursor["Cursor"]
end
subgraph MCP["Feishu MCP Server"]
Tools["18 个工具"]
Auth["Token 管理"]
API["API 封装"]
end
subgraph Feishu["飞书开放平台"]
Doc["文档 API"]
Drive["云空间 API"]
Bitable["多维表格 API"]
end
Clients --> MCP
MCP --> Feishu⚠️ 已知限制
限制项 | 说明 |
API 频率 | 每秒最多 3 次请求 |
表格行数 | 单次创建最多 9 行(超出自动截断) |
文件上传 | 最大 20MB |
Token 有效期 | 2 小时(自动刷新) |
🛠️ 开发指南
# 开发模式(热重载)
npm run dev
# 编译
npm run build
# 运行测试
npm test
# 代码检查
npm run lint项目结构
feishu-mcp-server/
├── src/
│ ├── index.ts # 入口文件
│ ├── constants.ts # 常量定义
│ ├── types.ts # 类型定义
│ ├── services/ # 服务层
│ │ ├── api.ts # API 封装
│ │ └── auth.ts # 认证服务
│ └── tools/ # MCP 工具
│ ├── document.ts # 文档操作
│ ├── table.ts # 表格操作
│ ├── block.ts # 块操作
│ ├── media.ts # 媒体操作
│ ├── spreadsheet.ts# 电子表格
│ └── bitable.ts # 多维表格
├── dist/ # 编译输出
└── docs/ # 文档🤝 贡献指南
欢迎贡献代码!请遵循以下步骤:
Fork 本仓库
创建特性分支 (
git checkout -b feature/amazing-feature)提交更改 (
git commit -m 'Add amazing feature')推送到分支 (
git push origin feature/amazing-feature)创建 Pull Request
📄 许可证
本项目采用 MIT 许可证。
🔗 相关链接
如果这个项目对你有帮助,请给个 ⭐ Star!
Made with ❤️ by [Your Name]
Available Tools
18 toolsfeishu_add_bitable_recordsC
向飞书多维表格添加记录。字段名需与表格字段名一致。
Inputs: app_token (required), records (required), table_id.
feishu_append_contentB
向飞书文档末尾追加内容。支持 Markdown 格式,包括标题、列表、代码块、表格等。
Inputs: document_id (required), content (required).
feishu_create_bitableB
创建新的飞书多维表格(Bitable)。返回 app_token 和 URL。
Inputs: name (required), folder_token.
feishu_create_documentA
创建新的飞书文档。可以指定标题和 Markdown 格式的内容,返回新文档的 URL。
Inputs: title (required), content, folder_token.
feishu_create_spreadsheetB
创建新的飞书电子表格。返回电子表格的 Token 和 URL。
Inputs: title (required), folder_token.
feishu_delete_blockA
删除飞书文档中的指定 Block。⚠️ 注意:当前飞书 API 可能不支持直接删除文档块,此功能可能无法使用。建议通过编辑将块内容清空作为替代方案。
Inputs: document_id (required), block_id (required), confirm.
feishu_get_document_infoC
获取飞书文档的基本信息,包括标题、ID、版本号等。
Inputs: document_id (required).
feishu_insert_calloutB
在飞书文档中插入高亮块(Callout)。用于突出显示提示、警告、注意事项等信息。
Inputs: document_id (required), content (required), background_color, icon, +2 more.
feishu_insert_diagramA
在飞书文档中插入 Mermaid 架构图(使用飞书「文本绘图」功能)。支持 flowchart、sequenceDiagram、classDiagram、graph、mindmap、timeline 等类型。
Inputs: document_id (required), mermaid_code (required), block_id.
feishu_insert_imageB
在飞书文档中插入图片。支持通过文件 token 插入已上传的图片。
Inputs: document_id (required), file_token (required), width, height, +1 more.
feishu_insert_tableB
在飞书文档中插入表格。支持 Markdown 表格语法或结构化数据输入。
Inputs: document_id (required), markdown_table, headers, rows, +3 more.
feishu_list_blocksA
列出飞书文档中的所有 Block,用于了解文档结构或获取特定 Block ID 进行后续操作。
Inputs: document_id (required).
feishu_read_bitableB
读取飞书多维表格的记录。返回 Markdown 格式的表格。
Inputs: app_token (required), table_id, page_size.
feishu_read_documentA
读取飞书文档内容。支持输入文档 ID 或完整 URL,返回 Markdown 或 JSON 格式的文档内容。
Inputs: document_id (required), format.
feishu_read_spreadsheetC
从飞书电子表格读取数据。返回指定范围的数据。
Inputs: spreadsheet_token (required), sheet_id, range.
feishu_update_contentB
替换飞书文档的全部内容(保留标题)。用于完全重写文档内容。
Inputs: document_id (required), content (required).
feishu_upload_imageA
上传图片到飞书。返回 file_token,可用于 feishu_insert_image 插入文档。⚠️ 需要 drive:drive:media:upload 权限。
Inputs: file_path (required), document_id.
feishu_write_spreadsheetC
向飞书电子表格写入数据。支持指定工作表和范围。
Inputs: spreadsheet_token (required), data (required), sheet_id, range.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool has a clearly distinct purpose targeting specific resources and actions in Feishu, such as documents, Bitable, spreadsheets, and images. The descriptions clearly differentiate operations like create, read, update, and append, with no overlapping functionality that could cause confusion.
All tool names follow a consistent 'feishu_verb_noun' pattern using snake_case, such as feishu_create_document and feishu_read_bitable. This uniformity makes the tool set predictable and easy to navigate for an agent.
With 18 tools, the count is slightly high but reasonable for covering document management, Bitable, spreadsheets, and image handling in Feishu. It provides comprehensive coverage without being overwhelming, though it borders on the upper limit of typical scopes.
The tool set offers complete CRUD and lifecycle coverage for Feishu's core features, including creating, reading, updating, and appending content for documents, Bitable, and spreadsheets, plus image upload and insertion. No obvious gaps exist for the stated domain.
Related MCP Connectors
Create and manage documents, spreadsheets, and presentations from your AI assistant.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Linked team workspace: AI agents read and write docs, wikis, sheets, diagrams, boards and reviews.
Read, edit and improve shared documents and knowledge with people and agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI models to interact with Feishu (Lark) APIs for document management, bot messaging, chat operations, and multi-dimensional table (Bitable) CRUD operations through natural language.1MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to create, read, edit, and manage Google Docs and Drive files with support for formatting, comments, tables, images, and bulk operations.571-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Feishu/Lark platform APIs for automation scenarios including message management, document operations, calendar scheduling, group management, and Bitable operations through natural language.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Feishu/Lark Open Platform APIs for tasks like document processing, chat management, and calendar scheduling.MIT