Home / MCP / Feishu MCP Server

Feishu MCP Server

Provides access, editing, and structured processing of Feishu documents via MCP for AI-driven workflows.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "feishu_http": {
            "url": "http://localhost:3333/sse?userKey=123456"
        }
    }
}

This MCP server lets AI coding tools access, edit, and structure Feishu documents through the Model Context Protocol, enabling intelligent retrieval, editing, and search across Feishu documents and folders.

How to use

You connect an MCP client to the Feishu MCP server either via a remote HTTP endpoint or by running the server locally. Once connected, you can browse folder contents, fetch document structures, create and edit blocks in documents, search across documents, and insert rich content like images, tables, formulas, and diagrams. The server supports both document-level actions and folder-wide operations, so you can manage resources efficiently and let AI workflows dynamically generate and organize Feishu content.

How to install

Prerequisites: Node.js and a package manager (npm or pnpm). You will also need Feishu application credentials (App ID, App Secret) and the desired authentication type (tenant or user). Follow these steps to install and run the Feishu MCP server locally.

# Option A: Quick start with NPX
npx feishu-mcp@latest --feishu-app-id=<你的飞书应用ID> --feishu-app-secret=<你的飞书应用密钥> --feishu-auth-type=<tenant/user>

# Option B: Local development
# 1) Clone the project
git clone https://github.com/cso1z/Feishu-MCP.git
cd Feishu-MCP

# 2) Install dependencies
pnpm install

# 3) Create and configure environment variables
# Copy .env.example to .env and fill in your Feishu credentials
cp .env.example .env
```
```bash
# 4) Start the development server
pnpm run dev

Additional setup and runtime details

Configure environment variables to match your Feishu app and desired auth type. If you run locally, you can access the MCP server’s streaming endpoint at the configured port (default 3333). When using HTTP mode, you will point your MCP client to the provided URL.

Configuration and usage notes

Recommended practice is to specify a Feishu folder token when creating new documents. This makes it easier to locate and organize documents within a specific folder. The token is the trailing part of the folder URL and should be kept confidential.

For image handling, local MCP deployments support local absolute paths and HTTP(S) image URLs. In server deployments, image uploads use remote URLs due to request size limits.

Formulas use LaTeX syntax and can be embedded within text blocks alongside regular content. The server also supports mermaid diagrams for flowcharts, sequence diagrams, mind maps, class diagrams, and pie charts.

Troubleshooting

If you encounter permission issues, verify that the Feishu application has the necessary document access rights and that the target documents are granted to the application or its associated groups. If problems persist, revalidate the app permissions and the owner scope in your Feishu settings.

Developer notes

This server exports a set of tools to manage Feishu documents programmatically, including creating and reading documents, editing content blocks, folder operations, and rich content insertion. You can combine these actions to build automated document workflows.

Available tools

create_feishu_document

Create a new Feishu document from scratch, enabling rapid document generation.

get_feishu_document_info

Retrieve basic information about a Feishu document to verify existence and access rights.

get_feishu_document_blocks

Fetch the block structure of a Feishu document to understand its hierarchy and content layout.

batch_create_feishu_blocks

Create multiple content blocks in a document efficiently for bulk content generation.

update_feishu_block_text

Update the text inside a specific document block to modify existing content.

delete_feishu_document_blocks

Remove one or more blocks from a Feishu document to clean up or restructure content.

get_feishu_folder_files

List all files within a Feishu folder to navigate and manage documents.

create_feishu_folder

Create a new folder to organize Feishu documents and structure your workspace.

search_feishu_documents

Search across Feishu documents to find relevant content quickly.

convert_feishu_wiki_to_document_id

Convert a Feishu Wiki link to the corresponding document ID for direct access.

get_feishu_image_resource

Download images embedded in Feishu documents for offline use or processing.

get_feishu_whiteboard_content

Fetch elements from whiteboards (flowcharts, mind maps) for analysis and reuse.

create_feishu_table

Create and edit tables to present structured data within Feishu documents.

flowchart_insert

Insert flowcharts and mind maps to visualize processes and ideas.

upload_and_bind_image_to_block

Insert local or remote images into document blocks.

formula_support

Embed mathematical formulas using LaTeX within text blocks.