lark-mcp
by lovelts
README.md
# lark-mcp
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) 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:readonly`
- `wiki:wiki:readonly`
- `search:docs:read`
## Setup
1. Install dependencies:
```bash
npm install
```
2. Copy the example environment file and fill in your credentials:
```bash
cp .env.example .env
```
3. Start the MCP server:
```bash
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`):
```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
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues