# feishu-user-plugin

An MCP server and CLI for Feishu/Lark with 85 tools, three auth layers, and user-identity messaging over cookie plus protobuf.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: EthanQC
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/EthanQC/feishu-user-plugin
- Updated: 2026-08-02
- HTML: https://affpapa.org/en/nevibecode/mcp/feishu-user-plugin

## What it does

The server covers IM, docs, Bitable, wiki, drive, calendar, Tasks v2, OKR and live events. There are 85 tools and 9 MCP prompts exposed as slash commands: `/send`, `/reply`, `/digest`, `/search`, `/doc`, `/table`, `/wiki`, `/drive` and `/status`. Auth is split into three independent layers, and you do not need all of them — whichever credentials you have, those tools work. The cookie layer sends text and rich-text posts as you. The official bot API handles reading and writing in groups, documents and tables. A user OAuth token is what unlocks P2P chat reads and makes you the owner of resources you create.

Setup runs through `npx feishu-user-plugin setup --app-id <APP_ID> --app-secret <APP_SECRET>`, then `npx feishu-user-plugin oauth` to fetch the user token, then a client restart. A cookie expires after 12–24 hours without a heartbeat, so you log into feishu.cn and grab a fresh one now and then. The protocol layer rides on the Feishu web client, so a change on their side can break it; bot capabilities are unaffected.

Sending images and files as a user is a two-step affair: the send itself goes over cookie, but `image_key` and `file_key` must first come from the official API (`upload_image`, `upload_file`). Cards never go out over cookie — the server blocks that channel and always uses the bot. Live events work on feishu.cn only, since the international Lark WSClient at lark.com does not support them.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `LARK_COOKIE`, `LARK_APP_ID`, `LARK_APP_SECRET`, `LARK_USER_ACCESS_TOKEN`, `LARK_USER_REFRESH_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env LARK_COOKIE=<LARK_COOKIE> --env LARK_APP_ID=<LARK_APP_ID> --env LARK_APP_SECRET=<LARK_APP_SECRET> --env LARK_USER_ACCESS_TOKEN=<LARK_USER_ACCESS_TOKEN> --env LARK_USER_REFRESH_TOKEN=<LARK_USER_REFRESH_TOKEN> --transport stdio feishu-user-plugin -- npx -y feishu-user-plugin
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add feishu-user-plugin --env LARK_COOKIE=<LARK_COOKIE> --env LARK_APP_ID=<LARK_APP_ID> --env LARK_APP_SECRET=<LARK_APP_SECRET> --env LARK_USER_ACCESS_TOKEN=<LARK_USER_ACCESS_TOKEN> --env LARK_USER_REFRESH_TOKEN=<LARK_USER_REFRESH_TOKEN> -- npx -y feishu-user-plugin
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "feishu-user-plugin": {
            "command": "npx",
            "args": [
                "-y",
                "feishu-user-plugin"
            ],
            "env": {
                "LARK_COOKIE": "<LARK_COOKIE>",
                "LARK_APP_ID": "<LARK_APP_ID>",
                "LARK_APP_SECRET": "<LARK_APP_SECRET>",
                "LARK_USER_ACCESS_TOKEN": "<LARK_USER_ACCESS_TOKEN>",
                "LARK_USER_REFRESH_TOKEN": "<LARK_USER_REFRESH_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "feishu-user-plugin": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "feishu-user-plugin"
            ],
            "env": {
                "LARK_COOKIE": "<LARK_COOKIE>",
                "LARK_APP_ID": "<LARK_APP_ID>",
                "LARK_APP_SECRET": "<LARK_APP_SECRET>",
                "LARK_USER_ACCESS_TOKEN": "<LARK_USER_ACCESS_TOKEN>",
                "LARK_USER_REFRESH_TOKEN": "<LARK_USER_REFRESH_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e LARK_COOKIE=<LARK_COOKIE> -e LARK_APP_ID=<LARK_APP_ID> -e LARK_APP_SECRET=<LARK_APP_SECRET> -e LARK_USER_ACCESS_TOKEN=<LARK_USER_ACCESS_TOKEN> -e LARK_USER_REFRESH_TOKEN=<LARK_USER_REFRESH_TOKEN> feishu-user-plugin npx -y feishu-user-plugin
```
Replace <…> with your own values

## When to use it
- send a Feishu message as yourself without registering an app
- read P2P chats and a user's chat list
- digest a group discussion over a chosen window
- pull a document or Bitable into an agent workflow
- run several Feishu accounts from one machine

## Example prompts
- Send this as me on Feishu: reviewed the code, three nits left
- Read today's messages in the 工程组 group and write a digest
- Check all three auth layers with `/status`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
