Get the FREE Ultimate OpenClaw Setup Guide →

Feishu

为 Cursor、Windsurf、Cline 和其他 AI 驱动的编码工具提供访问、编辑和结构化处理飞书文档的能力,基于 Model Context Protocol 服务器实现。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cso1z-feishu-mcp npx -y feishu-mcp@latest --stdio \
  --env FEISHU_APP_ID="<你的飞书应用ID>" \
  --env FEISHU_USER_KEY="<你的用户标识>" \
  --env FEISHU_AUTH_TYPE="<tenant/user>" \
  --env FEISHU_APP_SECRET="<你的飞书应用密钥>"

How to use

Feishu MCP is a Model Context Protocol server that enables AI agents to access, edit, and structure Feishu documents. It exposes a set of tools to interact with Feishu documents, folders, images, and diagrams. Core capabilities include: creating and retrieving Feishu documents, fetching document blocks and folders, editing blocks in bulk, inserting tables or diagrams, uploading images, and performing keyword searches across documents. This allows AI tools to navigate Feishu content, understand its hierarchy, and perform automated document generation or modification workflows. To use it, run the MCP server with the provided environment variables for Feishu credentials and authentication type. Then supply the appropriate userKey (for stdio or user-based authentication) in the request URL or via the connection settings to identify the user context.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to Feishu app credentials (APP_ID and APP_SECRET)

Install and run:

  1. Install the MCP via npx (quick start) npm install -g npx (if not already available) npx feishu-mcp@latest --feishu-app-id=<你的飞书应用ID> --feishu-app-secret=<你的飞书应用密钥> --feishu-auth-type=<tenant/user> --user-key=<你的用户标识>

  2. Local development / advanced usage

    • Ensure you have a Feishu app configured with the required permissions
    • Set environment variables in a .env file or via your runtime environment
    • Start the server using the recommended npm script or the npx command above
  3. Optional: Run via Docker Compose

    • Create a docker-compose.yml that sets FEISHU_APP_ID, FEISHU_APP_SECRET, FEISHU_AUTH_TYPE, FEISHU_USER_KEY
    • Run: docker-compose up -d

Note: The configuration file example in the repository demonstrates how to wire this MCP into a Cursor/Cline-like environment using the mcpServers structure, including env vars and an example local URL for Cursor-style integration.

Additional notes

Tips and common considerations:

  • Use user authentication (FEISHU_AUTH_TYPE='user') when possible for broader permissions and better compatibility (e.g., document access and search). If you use tenant authentication, some features like wiki search may be limited.
  • The FEISHU_SCOPE_VALIDATION option can be controlled via environment variable FEISHU_SCOPE_VALIDATION to enable/disable access checks. Default is true. Set to false if you only need partial functionality.
  • The FEISHU_USER_KEY is important for stdio or multiple-user scenarios. Ensure this value is unique per user/device and, when possible, random.
  • When integrating with Cursor or Cline, you can provide a file-based configuration (mcpServers) and use the provided env vars inside the 'env' block to share credentials across services.
  • For image uploads or diagrams, Feishu support (images, mermaid-like diagrams, boards) is included; ensure the Feishu app has the required permissions to access and modify documents.

Related MCP Servers

Sponsor this space

Reach thousands of developers