Feishu MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Feishu MCP Server Create a new document called 'Meeting Notes' and write today's agenda in it."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
飞书 MCP Server
让 Claude Code 以你的身份直接操作飞书——创建文档、写入内容、发送消息、调用任意飞书 API。
原理
你说"帮我写飞书文档" → Claude → MCP Server → 飞书 API(你的身份)
↑
OAuth 2.0 User Access Token不是用"机器人"身份,而是通过 OAuth 授权拿到你的用户 Token,飞书看到的所有操作都是你本人做的。
Related MCP server: Feishu MCP Server
准备工作
1. 创建飞书应用
打开 飞书开放平台,进入开发者后台
创建 企业自建应用
在 凭证与基础信息 中记录
App ID和App Secret
2. 配置权限
进入应用的 权限管理,添加以下权限:
docx:document— 文档读写docx:document:readonly— 文档读取drive:drive— 云空间操作
3. 配置 OAuth 重定向 URL
进入 安全设置 → 重定向 URL,添加:
http://localhost:3040/callback4. 发布应用
在 应用发布 中创建版本并发布(管理员审批后生效)。
安装
# 1. 克隆项目
git clone <repo-url>
cd feishu-mcp-server
# 2. 安装依赖
npm install
# 3. 配置凭证
cp .env.example .env
# 编辑 .env,填入 App ID 和 App Secret授权
node auth.js浏览器会自动打开飞书授权页 → 点「确认授权」→ refresh_token 自动写入 .env。
配置 Claude Code
编辑 用户级 settings.json(~/.claude/settings.json 或 C:\Users\<用户名>\.claude\settings.json):
{
"mcpServers": {
"feishu": {
"command": "node",
"args": ["<项目路径>/index.js"]
}
}
}用户级配置让所有项目共用,不需要每个项目重复配。
重启 Claude Code 后生效。
使用
通过 Claude Code(对话)
"帮我在飞书创建一个名为「周会纪要」的文档"
"把下面这段分析写到飞书文档 xxx 末尾"
"读取飞书文档 xxx 的内容,帮我总结一下"通过命令行(独立使用)
# 创建一个能被 Claude 读写的文档
node create-doc.js "文档标题"可用工具
工具 | 说明 |
| 创建新文档 |
| 写入内容(支持 Markdown) |
| 读取文档 |
| 发送消息 |
| 调用任意飞书 API |
文件结构
├── index.js # MCP Server 主程序
├── auth.js # OAuth 授权脚本(首次运行一次)
├── create-doc.js # 命令行创建文档工具
├── .env.example # 凭证模板
├── .env # 真实凭证(不提交 Git)
└── .gitignore
---
# Feishu MCP Server (English)
Let Claude Code operate Feishu/Lark **as you** — create documents, write content, send messages, call any Feishu API.
## How It Works
You: "Create a doc in Feishu" → Claude → MCP Server → Feishu API (your identity) ↑ OAuth 2.0 User Access Token
Instead of a bot identity, the server uses OAuth to obtain a **user access token**. Every action appears in Feishu as done by **you personally** — so you can see and edit everything.
## Prerequisites
### 1. Create a Feishu App
1. Go to [Feishu Open Platform](https://open.feishu.cn) → Developer Console
2. Create an **Enterprise Internal App**
3. Note the `App ID` and `App Secret` from **Credentials & Basic Info**
### 2. Configure Permissions
Navigate to **Permission Management** and add:
- `docx:document` — Read & write documents
- `docx:document:readonly` — Read documents
- `drive:drive` — Cloud drive operations
### 3. Configure OAuth Redirect URL
Go to **Security Settings** → Redirect URL, add:
http://localhost:3040/callback
### 4. Publish the App
Create a version under **App Publish** and submit for admin approval.
---
## Installation
```bash
git clone <repo-url>
cd feishu-mcp-server
npm install
cp .env.example .env
# Edit .env with your App ID and App SecretAuthorization
node auth.jsA browser window opens → authorize the app → refresh_token is saved to .env automatically.
Configure Claude Code
Edit your user-level settings.json (~/.claude/settings.json on macOS/Linux, or C:\Users\<username>\.claude\settings.json on Windows):
{
"mcpServers": {
"feishu": {
"command": "node",
"args": ["<path-to-project>/index.js"]
}
}
}User-level config means it works across all projects. Restart Claude Code to load.
Usage
Via Claude Code
"Create a new doc in Feishu called 'Meeting Notes'"
"Append this analysis to Feishu doc xxx"
"Read Feishu doc xxx and summarize it"Command Line
# Create a doc that Claude can read & write
node create-doc.js "Document Title"Tools
Tool | Description |
| Create a new document |
| Write content (supports Markdown) |
| Read a document |
| Send a message to a user or chat |
| Call any Feishu API directly |
File Structure
├── index.js # MCP Server entry point
├── auth.js # OAuth authorization script (run once)
├── create-doc.js # CLI document creation tool
├── .env.example # Credential template
├── .env # Real credentials (gitignored)
└── .gitignoreLicense
MIT
Available Tools
5 toolsfeishu_call_apiA
通用飞书 API 调用工具。当封装的工具不满足需求时,用这个直接调用任意飞书开放平台接口。 会自动处理认证 token。 参考文档: https://open.feishu.cn/document
Inputs: path (required), method (required), body.
feishu_create_documentA
在飞书中创建一个新文档,返回文档 ID 和链接。默认创建到「Claude生成」文件夹中,可通过 folder_token 参数指定其他文件夹。
Inputs: title (required), folder_token.
feishu_get_documentC
获取飞书文档的内容(纯文本格式)
Inputs: document_id (required).
feishu_send_messageA
通过飞书发送文本消息给用户或群聊。 需要先在飞书开放平台配置「获取用户 ID」等相关权限。
Inputs: text (required), receive_id (required), receive_id_type.
feishu_write_document_contentA
向飞书文档写入内容。支持 Markdown 格式:标题(#)、列表(-/*或数字)、普通段落。 如果文档是新建的空文档,内容会直接写入;如果文档已有内容,会追加到末尾。 返回文档链接供浏览器打开。
Inputs: content (required), document_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each of the four wrapped tools targets a distinct action (create doc, write content, get doc, send message), and the boundaries are explained in the descriptions. The only fuzziness is feishu_call_api, which overlaps with everything, but it is explicitly framed as a fallback for uncovered cases.
All five tools use the same feishu_ prefix followed by a snake_case verb_noun pattern (create_document, write_document_content, get_document, send_message, call_api). Fully predictable and readable.
Five tools is a well-scoped surface for a Feishu integration: three document operations, one messaging operation, and one generic API escape hatch. Nothing feels redundant or padded.
Document creation, writing, and reading are covered, plus messaging, but there is no delete/replace-document, no document or folder listing, and messaging is send-only. The generic feishu_call_api tool gives agents a viable workaround for these gaps, so they are minor rather than blocking.
Maintenance
Related MCP Connectors
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Your SMB workspace in Claude or ChatGPT: tasks, notes, sales and Michèle's memory, via OAuth.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI models to interact with Feishu (Lark) APIs for document management, bot messaging, chat operations, and multi-dimensional table (Bitable) CRUD operations through natural language.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read and interact with Feishu (Lark) documents, spreadsheets, and multi-dimensional tables. It provides tools for extracting content and metadata from various Feishu resources through secure OAuth or tenant-level authentication.3-
- AlicenseBqualityCmaintenanceAll-in-one Feishu/Lark MCP for Claude Code & Codex. 84 tools, 3 auth layers, send-as-user (cookie + protobuf protocol path). Covers IM, docs, bitable, wiki, drive, calendar, tasks v2, OKR, realtime WS events.84204 npm12MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Feishu (Lark) through structured tools for messaging, calendar, tasks, and documents.3MIT