Search wiki pages and read/write Feishu documents via AI assistants
lark-mcp
A Model Context Protocol (MCP) server for Feishu/Lark. Lets AI assistants (Cursor, Claude Desktop, etc.) search wiki pages and read/write Feishu documents on your behalf via OAuth.
Features
- search_wiki — Search documents in Feishu Wiki by keywords
- get_doc_content — Read a Feishu document or wiki page by URL
- create_doc — Create a new Feishu document (with optional Markdown content)
- update_doc — Replace or append content in an existing Feishu document (Markdown → Feishu blocks)
Requirements
- Node.js >= 18.14.1
- A Feishu open-platform app with the following permissions:
docx:document,docx:document:readonlywiki:wiki:readonlysearch:docs:read
Setup
Install dependencies:
npm installCopy the example environment file and fill in your credentials:
cp .env.example .envStart the MCP server:
node index.mjs
Environment Variables
| Variable | Required | Description |
|---|---|---|
LARK_APP_ID |
Yes | Feishu app ID |
LARK_APP_SECRET |
Yes | Feishu app secret |
FEISHU_DOMAIN |
No | Your Feishu tenant domain (default: feishu.cn) |
OAUTH_PORT |
No | Local port for OAuth callback (default: 9997) |
LARK_OAUTH_SCOPE |
No | OAuth scopes (default: docx:document docx:document:readonly wiki:wiki:readonly search:docs:read) |
Cursor / Claude Desktop Integration
Add the following to your MCP config (e.g. ~/.cursor/mcp.json):
{
"mcpServers": {
"lark": {
"command": "node",
"args": ["/path/to/lark-mcp/index.mjs"],
"env": {
"LARK_APP_ID": "your_app_id",
"LARK_APP_SECRET": "your_app_secret",
"FEISHU_DOMAIN": "your-tenant.feishu.cn"
}
}
}
}
License
MIT
Tools (4)
search_wikiSearch documents in Feishu Wiki by keywordsget_doc_contentRead a Feishu document or wiki page by URLcreate_docCreate a new Feishu document with optional Markdown contentupdate_docReplace or append content in an existing Feishu documentEnvironment Variables
LARK_APP_IDrequiredFeishu app IDLARK_APP_SECRETrequiredFeishu app secretFEISHU_DOMAINYour Feishu tenant domainOAUTH_PORTLocal port for OAuth callbackLARK_OAUTH_SCOPEOAuth scopesConfiguration
{"mcpServers": {"lark": {"command": "node", "args": ["/path/to/lark-mcp/index.mjs"], "env": {"LARK_APP_ID": "your_app_id", "LARK_APP_SECRET": "your_app_secret", "FEISHU_DOMAIN": "your-tenant.feishu.cn"}}}}