Home / MCP / Feishu MCP Server
Provides access, editing, and structured processing of Feishu documents via MCP for AI-driven workflows.
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.
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.
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 devConfigure 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.
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.
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.
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.
Create a new Feishu document from scratch, enabling rapid document generation.
Retrieve basic information about a Feishu document to verify existence and access rights.
Fetch the block structure of a Feishu document to understand its hierarchy and content layout.
Create multiple content blocks in a document efficiently for bulk content generation.
Update the text inside a specific document block to modify existing content.
Remove one or more blocks from a Feishu document to clean up or restructure content.
List all files within a Feishu folder to navigate and manage documents.
Create a new folder to organize Feishu documents and structure your workspace.
Search across Feishu documents to find relevant content quickly.
Convert a Feishu Wiki link to the corresponding document ID for direct access.
Download images embedded in Feishu documents for offline use or processing.
Fetch elements from whiteboards (flowcharts, mind maps) for analysis and reuse.
Create and edit tables to present structured data within Feishu documents.
Insert flowcharts and mind maps to visualize processes and ideas.
Insert local or remote images into document blocks.
Embed mathematical formulas using LaTeX within text blocks.