feishudocserver
v1.6.1
Published
A Feishu document management server for MCP (Model Context Protocol)
Downloads
70
Readme
Feishu Document Server for MCP
🎉 Version 1.2.0 更新说明
新功能 - create_nice_feishu_doc:
我们添加了一个强大的新工具,可以通过导入Markdown或Word文件一步创建格式丰富的飞书文档。这个工具特别适合需要创建复杂文档或导入大量内容的场景,比直接操作文档块更加高效和便捷。
使用此工具,您可以:
- 直接导入Markdown文件,保留标题、列表、链接等格式
- 导入Word文档并保持格式
- 一次性创建完整的复杂文档结构
- 避免复杂的块级操作
详情请参见下方的API工具说明和文档示例。
A Feishu document management server for the Model Context Protocol (MCP). This server provides tools to interact with Feishu's document management system, allowing for document creation, editing, and management through a standardized API.
Features
- Create new Feishu documents
- Import content from Markdown or Word files into Feishu documents
- Retrieve document information and content
- View document block structure
- Edit document blocks
- Create and modify document content with text, code, headings, and lists
- Support for wiki document conversion
Installation
npm install feishudocserverUsage
This server is designed to be used with MCP-compatible clients like Claude in Cursor. To use it as a standalone server:
npx feishudocserverDevelopment
Clone the repository and install dependencies:
git clone https://github.com/yourusername/feishuDocserver.git
cd feishuDocserver
npm installBuild the project:
npm run buildRun in development mode:
npm run startAPI Tools
The server provides the following tools:
create_feishu_document
Creates a new Feishu document with a specified title in a specific folder.
create_nice_feishu_doc
Creates a beautifully formatted Feishu document by importing content from a Markdown or Word file. This is the preferred method for creating complex documents with rich content.
Example:
Use create_nice_feishu_doc to create a document with the title "Research Report" using markdown formatting:
title: "Research Report"
content: "# Research Report\n\n## Introduction\nThis is the introduction section...\n\n## Methodology\nThe methodology includes..."
fileType: ".md"
folderToken: "doxcnABCDEFGH123456" (optional)get_feishu_doc_info
Retrieves basic information about a Feishu document.
get_feishu_doc_content
Retrieves the plain text content of a Feishu document.
get_feishu_doc_blocks
Retrieves the block structure of a Feishu document.
get_feishu_block_content
Retrieves detailed content of a specific block in a document.
update_feishu_block_text
Updates the text content of a specific block in a document.
create_feishu_multiple_blocks
Creates multiple blocks of different types in a document at once.
get_feishu_wiki_document_id
Converts a Feishu Wiki document link to a compatible document ID.
Authentication
The server uses Feishu's tenant access token for authentication. You need to provide your App ID and App Secret in the code.
License
MIT
