AFFiNE MCP Server
Read, write and organise AFFiNE workspaces, docs, databases and comments from an MCP client
Read, create and edit Feishu/Lark docs, folders, whiteboards and tasks from an MCP client
By cso1z (individual) TypeScript Local · stdio ProductivityFiles and storage
59 popularity score ★ 746 ↓ 313/wk
Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
It needs FEISHU_APP_ID, FEISHU_APP_SECRET. Replace each <NAME> with your value.
claude mcp add feishu -e FEISHU_APP_ID=<FEISHU_APP_ID> -e FEISHU_APP_SECRET=<FEISHU_APP_SECRET> -- npx -y feishu-mcp@latest --stdio{
"mcpServers": {
"feishu": {
"command": "npx",
"args": [
"-y",
"feishu-mcp@latest",
"--stdio"
],
"env": {
"FEISHU_APP_ID": "<FEISHU_APP_ID>",
"FEISHU_APP_SECRET": "<FEISHU_APP_SECRET>"
}
}
}
}{
"mcpServers": {
"feishu": {
"command": "npx",
"args": [
"-y",
"feishu-mcp@latest",
"--stdio"
],
"env": {
"FEISHU_APP_ID": "<FEISHU_APP_ID>",
"FEISHU_APP_SECRET": "<FEISHU_APP_SECRET>"
}
}
}
}{
"servers": {
"feishu": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"feishu-mcp@latest",
"--stdio"
],
"env": {
"FEISHU_APP_ID": "<FEISHU_APP_ID>",
"FEISHU_APP_SECRET": "<FEISHU_APP_SECRET>"
}
}
}
}[mcp_servers.feishu]
command = "npx"
args = ["-y", "feishu-mcp@latest", "--stdio"]
[mcp_servers.feishu.env]
FEISHU_APP_ID = "<FEISHU_APP_ID>"
FEISHU_APP_SECRET = "<FEISHU_APP_SECRET>"gemini mcp add --scope user -e FEISHU_APP_ID=<FEISHU_APP_ID> -e FEISHU_APP_SECRET=<FEISHU_APP_SECRET> feishu npx -- -y feishu-mcp@latest --stdioFEISHU_APP_ID |
Required: App ID of your self-built Feishu/Lark app. |
|---|---|
FEISHU_APP_SECRET |
Required: App Secret of that app. |
FEISHU_AUTH_TYPE |
Optional: tenant (default, acts as the app) or user (OAuth, acts as you; needed for tasks and users). |
FEISHU_ENABLED_MODULES |
Optional: Comma list of document, task, calendar, member or all; default document. |
FEISHU_USER_KEY |
Optional: Identifier for the user's token cache in stdio/CLI mode; default stdio. |
FEISHU_BASE_URL |
Optional: API base; set https://open.larksuite.com/open-apis for Lark. |
FEISHU_AUTH_BASE_URL |
Optional: Sign-in domain; set https://accounts.larksuite.com for Lark. |
PORT |
Optional: Port for the HTTP server or OAuth callback; default 3333. |
FEISHU_SCOPE_VALIDATION |
Optional: Set false to skip the permission check at start; default true. |
FEISHU_ENCRYPTION_KEY |
Optional: Encrypts tokens stored in the cache. |
MCP_BEARER_TOKEN |
Optional: Requires a Bearer token on the HTTP/SSE endpoints. |
FEISHU_PUBLIC_BASE_URL |
Optional: Public base URL for the OAuth callback when clients connect over an internal address. |
Feishu MCP is a community server for Feishu (and its international edition, Lark) that works on cloud documents through a self-built Feishu app. It can list a Drive folder, read a document's metadata and block tree, search documents, create documents and folders, insert blocks (text, headings, lists, code, Mermaid, images, tables, whiteboards), rewrite or delete blocks, download images and read or fill whiteboards with PlantUML or Mermaid code. With user sign-in it can also list, create, update and delete Feishu tasks and look up users.
The tools are split into modules chosen with FEISHU_ENABLED_MODULES. Only document is on by default, which gives 15 tools; task and member add five more and load only when FEISHU_AUTH_TYPE is user. In tenant mode the server logs a warning and skips them (config.ts). The calendar module accepts the name but registers no tools in 0.3.2.
The published 0.3.2 has 20 tools, and the README table is behind the code. It lists update_feishu_block_text, but the code registers batch_update_feishu_block_text. It also leaves out get_feishu_root_folder_info and fill_whiteboard_with_plantuml (blockTools.ts, folderTools.ts). The same npm package also installs a feishu-tool command that calls these tools straight from a shell.
| Runtime | Node.js 20+ |
|---|
Node.js 20.17 or newer (the engines range of 0.3.2; unreleased main moves to Node 24). You need a self-built Feishu or Lark app with its App ID and App Secret, the document permissions it needs, and the target documents shared with the app. For user mode you also need the app's OAuth redirect set up and a browser sign-in. Lark users must set FEISHU_BASE_URL and FEISHU_AUTH_BASE_URL. Port 3333 (PORT) must be free, even in stdio mode.
Without FEISHU_APP_ID and FEISHU_APP_SECRET the server exits at start. Task and user tools need user auth; in tenant mode they are skipped. The README says tenant mode cannot search wiki documents and has weaker file access. Calendar has no tools yet. On a remote server, images can be uploaded only from http/https links, not local paths. A Bearer token (MCP_BEARER_TOKEN) protects only the HTTP endpoints, and the README notes most clients cannot send custom headers. Switching userKey per request works only in Streamable HTTP mode.
It suits people whose team keeps documents and to-dos in Feishu or Lark and who want an assistant to draft, restructure or read those documents, or to manage their own tasks. It reads and writes, so a test folder is a sensible start. Because it needs your own Feishu app, an admin who can create apps and grant scopes has to be involved. Use user mode for personal access and wiki search. Pick something else if you need Feishu chat messages or calendars: this server has no tools for them in 0.3.2. It is a community project, not one published by Feishu.
create_feishu_documentget_feishu_document_infoget_feishu_document_blockssearch_feishu_documentsget_feishu_root_folder_infoget_feishu_folder_filescreate_feishu_folderbatch_create_feishu_blocksbatch_update_feishu_block_textdelete_feishu_document_blocksget_feishu_image_resourceupload_and_bind_image_to_blockcreate_feishu_tableget_feishu_whiteboard_contentfill_whiteboard_with_plantumllist_feishu_taskscreate_feishu_taskupdate_feishu_taskdelete_feishu_taskget_feishu_users