
Lark Mcp
- 3.1k installs
- 38 repo stars
- Updated March 21, 2026
- whatevertogo/feishuskill
lark-mcp is an agent skill that documents the official Feishu/Lark MCP tools for messaging, Bitable records, document search, and wiki access with correct request shapes and OAuth rules.
About
lark-mcp is the official Feishu/Lark MCP integration skill documenting messaging, group management, Bitable CRUD, document search, import, and wiki node access for agent-driven workflows. It enforces the mcp__lark-mcp__ tool prefix, separates path, params, and data request shapes, and explains useUAT tenant versus user identity for resource creation and private data access. OAuth is required for docx_builtin_search and wiki_v1_node_search; without it callers hit 99991663 permission errors. Common pitfalls are documented: content must be a JSON string, Bitable filter values must be arrays, group creation needs owner_id, and doc search uses search_key while wiki search uses query. Quick examples cover im_v1_message_create, im_v1_chat_create, bitable_v1_appTableRecord_create, and docx_builtin_search with ID prefix tables for ou_, oc_, bascn, tbl, doxcn, and wikcn tokens. Developers reach for lark-mcp when wiring agents to Feishu messaging, multidimensional tables, or knowledge bases instead of hand-authoring Open API payloads.
- Documents im, chat, Bitable, document, and wiki MCP tools with YAML request examples and reference links.
- Explains useUAT true for user-owned resources and OAuth-gated doc or wiki search to avoid 99991663 errors.
- Lists ID prefix conventions for users, chats, Bitable apps, tables, documents, and wiki nodes.
- Captures common traps: JSON-string content, array filter values, owner_id on chat create, and token type mismatches.
- Provides error quick-reference for tool-not-found, permission, not-found, and invalid content failures.
Lark Mcp by the numbers
- 3,101 all-time installs (skills.sh)
- +3 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #146 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
lark-mcp capabilities & compatibility
- Capabilities
- feishu/lark messaging and group management · bitable record create and search · document search and import · wiki node lookup · oauth and useuat guidance
- Use cases
- orchestration · api development
What lark-mcp says it does
搜索文档/知识库必须配置 OAuth
content 必须是 JSON 字符串
创建群组必须指定 owner_id,否则群主为机器人
npx skills add https://github.com/whatevertogo/feishuskill --skill lark-mcpAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3.1k |
|---|---|
| repo stars | ★ 38 |
| Security audit | 2 / 3 scanners passed |
| Last updated | March 21, 2026 |
| Repository | whatevertogo/feishuskill ↗ |
How do I call Feishu/Lark MCP tools for messages, Bitable, and document search without hitting permission or parameter format errors?
Connect Claude, Cursor or custom agents directly to Feishu/Lark for reading Bitable records, sending formatted messages, and automating project workflows.
Who is it for?
Teams wiring Claude, Cursor, or custom agents to Feishu messaging, multidimensional tables, or Lark document and wiki APIs.
Skip if: Skip when you are not using Feishu/Lark or need generic chat integrations without the Lark MCP server.
When should I use this skill?
User mentions Feishu, Lark, Bitable, bitable,飞书文档,飞书群, or needs MCP patterns for Lark messaging and table automation.
What you get
Correct MCP tool calls with proper path, params, data, useUAT, OAuth-aware search, and troubleshootable error handling for Feishu/Lark automation.
- Bitable query configs
- formatted Lark messages
- workflow automation scripts
By the numbers
- Documents four Bitable filter operators: is, contains, isGreater, isEmpty
- Includes multi-condition and/or conjunction filter examples in YAML
Files
Lark MCP
⚠️ 重要提醒
搜索文档/知识库必须配置 OAuth:
docx_builtin_search→ 需要--oauthwiki_v1_node_search→ 需要--oauth
否则返回 99991663 错误。配置方法见 installation.md
---
核心规则
# 工具命名(连字符,非下划线)
✅ mcp__lark-mcp__tool_name
❌ mcp__lark_mcp__tool_name
# 参数结构
path: {app_token, table_id} # URL路径参数
params: {page_size, ...} # 查询参数
data: {fields, ...} # 请求体
useUAT: false # true=用户身份, false=租户身份常见陷阱
# content 必须是 JSON 字符串
❌ content: {"text": "hello"}
✅ content: '{"text": "hello"}'
# 过滤条件 value 必须是数组
❌ value: "已完成"
✅ value: ["已完成"]
# 创建群组必须指定 owner_id,否则群主为机器人
owner_id: "ou_xxxxx"
# 参数名差异
docx_builtin_search: search_key # 不是 query
wiki_v1_node_search: query # 不是 search_key
# token 类型
wiki_v2_space_getNode: 用 wikcn... # 不能用 doxcn...
docx_v1_document_rawContent: 用 doxcn...useUAT 选择
| 场景 | useUAT |
|---|---|
| 创建资源(想让用户可访问) | true |
| 搜索文档/知识库 | true |
| 访问用户私有数据 | true |
| 查询公共数据 | false |
工具速查
| 类别 | 工具 | 文档 |
|---|---|---|
| 消息 | im_v1_message_create, im_v1_message_list | im.md |
| 群组 | im_v1_chat_create, im_v1_chat_list, im_v1_chatMembers_get | chat.md |
| 多维表格 | bitable_v1_app_create, bitable_v1_appTableRecord_search/create/update | bitable.md |
| 文档 | docx_builtin_search, docx_v1_document_rawContent, docx_builtin_import | documents.md |
| 知识库 | wiki_v1_node_search, wiki_v2_space_getNode | wiki.md |
ID 类型
| 前缀 | 类型 | 来源 |
|---|---|---|
ou_ | 用户ID | API返回 |
oc_ | 群聊ID | im_v1_chat_list |
bascn | 多维表格 | URL中 base/ 后 |
tbl | 数据表 | URL参数 table= |
doxcn | 文档 | 搜索结果或URL |
wikcn | 知识库节点 | 知识库URL |
快速示例
# 发送消息
工具: mcp__lark-mcp__im_v1_message_create
data:
receive_id: "oc_xxxxx"
msg_type: "text"
content: '{"text": "消息内容"}'
params:
receive_id_type: "chat_id"
# 创建群组
工具: mcp__lark-mcp__im_v1_chat_create
data:
name: "群名"
chat_mode: "group"
owner_id: "ou_xxxxx"
user_id_list: ["ou_xxxxx"]
params:
user_id_type: "open_id"
# 创建多维表格记录
工具: mcp__lark-mcp__bitable_v1_appTableRecord_create
path:
app_token: "bascnxxxxxx"
table_id: "tblxxxxxx"
data:
fields:
文本字段: "值"
单选字段: "选项名"
useUAT: true
# 搜索文档
工具: mcp__lark-mcp__docx_builtin_search
data:
search_key: "关键词"
count: 10
useUAT: true错误速查
| 错误 | 原因 | 解决 |
|---|---|---|
| tool not found | 服务器名错误 | 使用 mcp__lark-mcp__ 前缀 |
| 99991663 | 权限不足 | useUAT: true 或配置 OAuth |
| 131005 not found | token 类型错误 | 检查用 wikcn 还是 doxcn |
| 创建资源无法访问 | 租户身份创建 | 使用 useUAT: true |
| field not found | 字段名错误 | 用 appTableField_list 确认 |
| invalid content | 格式错误 | content 用单引号包裹 JSON |
详细文档: troubleshooting.md | installation.md
Bitable 查询示例
常用查询
精确匹配
data:
filter:
conjunction: "and"
conditions:
- field_name: "状态"
operator: "is"
value: ["已完成"]文本包含
data:
filter:
conditions:
- field_name: "任务名称"
operator: "contains"
value: ["关键词"]数值/日期范围
data:
filter:
conditions:
- field_name: "优先级"
operator: "isGreater"
value: ["3"]空值检查
data:
filter:
conditions:
- field_name: "负责人"
operator: "isEmpty"
value: []多条件
data:
filter:
conjunction: "and" # 或 "or"
conditions:
- field_name: "状态"
operator: "is"
value: ["待处理"]
- field_name: "优先级"
operator: "isGreater"
value: ["3"]操作符
| operator | 适用类型 |
|---|---|
| is | 所有 |
| isNot | 除日期外 |
| contains | 文本 |
| isEmpty | 所有 |
| isGreater | 数字、日期 |
| isLess | 数字、日期 |
消息格式示例
文本
{"text": "消息内容"}富文本
基础
{
"post": {
"zh_cn": {
"title": "标题",
"content": [[{"tag": "text", "text": "内容"}]]
}
}
}样式
[
{"tag": "text", "text": "普通"},
{"tag": "text", "text": "加粗", "style": ["bold"]},
{"tag": "a", "text": "链接", "href": "https://example.com"},
{"tag": "at", "user_id": "ou_xxxxx"}
]元素
| tag | 示例 |
|---|---|
| text | {"tag": "text", "text": "内容"} |
| a | {"tag": "a", "text": "链接", "href": "URL"} |
| at | {"tag": "at", "user_id": "ou_xxx"} |
样式
bold- 加粗italic- 斜体strikethrough- 删除线
{
"name": "lark-mcp",
"version": "1.0.0",
"description": "集成飞书/Feishu 服务,操作多维表格、文档、消息、群组等",
"author": "whatevertogo",
"repository": {
"type": "git",
"url": "https://github.com/whatevertogo/FeiShuSkill"
},
"skills": [
"SKILL.md"
],
"mcpServers": {
"lark-mcp": {
"command": "npx",
"args": [
"-y",
"@larksuiteoapi/lark-mcp",
"mcp",
"-a",
"<your_app_id>",
"-s",
"<your_app_secret>",
"--oauth"
]
}
},
"envHints": {
"your_app_id": {
"description": "飞书应用 ID",
"url": "https://open.feishu.cn/app"
},
"your_app_secret": {
"description": "飞书应用密钥",
"url": "https://open.feishu.cn/app",
"secret": true
}
},
"installNotes": [
"安装后请将 <your_app_id> 替换为飞书应用 ID",
"安装后请将 <your_app_secret> 替换为飞书应用密钥",
"获取凭证请访问:https://open.feishu.cn/app",
"详细配置指南:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mcp_integration/mcp_installation"
]
}
多维表格 (Bitable)
核心规则
# 创建资源用用户身份
useUAT: true
# 过滤条件 value 必须是数组
✅ value: ["已完成"]
❌ value: "已完成"
# 使用 field_name 而非 field_id
field_name: "状态"URL 解析
https://xxx.feishu.cn/base/bascnxxxxxx?table=tblxxxxxx
↑app_token ↑table_id工作流
1. 创建 Base
工具: mcp__lark-mcp__bitable_v1_app_create
data:
name: "Base名称"
useUAT: true返回 app_token 和 default_table_id。
2. 创建数据表
工具: mcp__lark-mcp__bitable_v1_appTable_create
path:
app_token: "bascnxxxxxx"
data:
table:
name: "表名"
fields:
- field_name: "文本"
ui_type: "Text"
- field_name: "单选"
ui_type: "SingleSelect"
property:
options:
- name: "选项1"
- field_name: "日期"
ui_type: "DateTime"
useUAT: true3. 查询记录
工具: mcp__lark-mcp__bitable_v1_appTableRecord_search
path:
app_token: "bascnxxxxxx"
table_id: "tblxxxxxx"
data:
filter:
conjunction: "and"
conditions:
- field_name: "状态"
operator: "is"
value: ["已完成"]4. 创建记录
工具: mcp__lark-mcp__bitable_v1_appTableRecord_create
path:
app_token: "bascnxxxxxx"
table_id: "tblxxxxxx"
data:
fields:
文本字段: "值"
单选字段: "选项名"
日期字段: 1705276800000
useUAT: true5. 更新记录
工具: mcp__lark-mcp__bitable_v1_appTableRecord_update
path:
app_token: "bascnxxxxxx"
table_id: "tblxxxxxx"
record_id: "recxxxxxx"
data:
fields:
状态: "已完成"
useUAT: true字段类型
| ui_type | 说明 | 示例值 |
|---|---|---|
| Text | 文本 | "内容" |
| Number | 数字 | 123 |
| SingleSelect | 单选 | "选项名" |
| MultiSelect | 多选 | ["选项1", "选项2"] |
| DateTime | 日期 | 1705276800000 (毫秒) |
| User | 人员 | "ou_xxxxx" |
| Checkbox | 复选框 | true/false |
操作符
| operator | 说明 |
|---|---|
is | 等于 |
isNot | 不等于 |
contains | 包含 |
isEmpty | 为空 |
isGreater | 大于 |
isLess | 小于 |
辅助工具
# 获取数据表列表
工具: mcp__lark-mcp__bitable_v1_appTable_list
path:
app_token: "bascnxxxxxx"
# 获取字段列表
工具: mcp__lark-mcp__bitable_v1_appTableField_list
path:
app_token: "bascnxxxxxx"
table_id: "tblxxxxxx"常见错误
| 错误 | 解决 |
|---|---|
| field not found | 用 appTableField_list 确认字段名 |
| invalid filter | value 使用数组格式 ["值"] |
| 创建后无法访问 | 使用 useUAT: true |
群组管理
核心规则
# 必须指定 owner_id,否则群主为机器人
data:
owner_id: "ou_xxxxx"
user_id_list: ["ou_xxxxx"]创建群组
工具: mcp__lark-mcp__im_v1_chat_create
data:
name: "群名"
chat_mode: "group"
chat_type: "private" # private/public
owner_id: "ou_xxxxx"
user_id_list: ["ou_xxxxx"]
params:
user_id_type: "open_id"最简参数:
data:
chat_mode: "group"
params:
user_id_type: "open_id"返回 chat_id 格式为 oc_ 开头。
获取群组列表
工具: mcp__lark-mcp__im_v1_chat_list
params:
page_size: 50可直接调用,无需参数。返回机器人所在的所有群组。
获取群成员
工具: mcp__lark-mcp__im_v1_chatMembers_get
path:
chat_id: "oc_xxxxx"
params:
member_id_type: "open_id"群组类型
| 类型 | 特点 |
|---|---|
| private | 需邀请加入 |
| public | 可搜索加入,名称≥2字符 |
常见错误
| 错误 | 解决 |
|---|---|
| user not found | 检查 user_id_type |
| chat name too short | 公开群名称至少2字符 |
通用概念
参数结构
path: {app_token, table_id, chat_id} # URL路径参数
params: {page_size, user_id_type} # 查询参数
data: {fields, content, ...} # 请求体
useUAT: false # true=用户身份, false=租户身份useUAT 选择
| 场景 | useUAT | 说明 |
|---|---|---|
| 创建资源 | true | 创建者=当前用户 |
| 访问用户私有数据 | true | 需要用户权限 |
| 查询公共数据 | false | 默认,租户身份 |
ID 类型
| 前缀 | 类型 | 来源 |
|---|---|---|
ou_ | 用户ID | API返回 |
oc_ | 群聊ID | im_v1_chat_list 或 URL |
bascn | 多维表格 | URL中 base/ 后 |
tbl | 数据表 | URL参数 table= |
rec | 记录ID | API返回 |
doxcn | 文档 | 搜索结果或URL |
wikcn | 知识库节点 | 知识库URL |
分页
params:
page_size: 50
page_token: "" # 首次为空,后续用返回值响应包含 has_more 和 page_token。
错误码
| 错误码 | 解决 |
|---|---|
| 99991663 | useUAT: true 或配置 OAuth |
| 131005 | 检查 token 类型和权限 |
| 230001 | 检查 chat_id 格式 |
| 1063001 | 外部邮箱权限需用户身份 |
联系人
通过邮箱/手机号获取用户ID
工具: mcp__lark-mcp__contact_v3_user_batchGetId
data:
emails: ["user@example.com"]
mobiles: ["+8613800138000"]
params:
user_id_type: "open_id"注意: 手机号格式为 国家码+号码,如 +8613800138000
响应
{
"user_list": [
{"email": "user@example.com", "open_id": "ou_xxxxx"}
],
"fail_user_list": [
{"email": "notexist@example.com", "message": "user not found"}
]
}典型场景
# 1. 通过手机号获取 open_id
工具: mcp__lark-mcp__contact_v3_user_batchGetId
data:
mobiles: ["+8613800138000"]
# 2. 使用 open_id 添加权限
工具: mcp__lark-mcp__drive_v1_permissionMember_create
data:
member_type: "openid"
member_id: "ou_xxxxx"
perm: "view"文档操作
核心规则
# 搜索文档必须使用用户身份
useUAT: true
# 参数名注意
docx_builtin_search: search_key # 不是 query
wiki_v1_node_search: query # 不是 search_key搜索文档
工具: mcp__lark-mcp__docx_builtin_search
data:
search_key: "关键词"
count: 20
useUAT: true响应:
{
"docs_entities": [
{
"docs_token": "doxcnxxxxxx",
"title": "文档标题",
"docs_type": "docx"
}
]
}获取文档内容
工具: mcp__lark-mcp__docx_v1_document_rawContent
path:
document_id: "doxcnxxxxxx"
params:
lang: 0 # 0=中文, 1=英文
useUAT: true导入 Markdown
工具: mcp__lark-mcp__docx_builtin_import
data:
markdown: "# 标题\n\n正文内容..."
file_name: "文档.md"
useUAT: true返回文档 URL 和 token。
docs_types 可选值
| 类型 | 说明 |
|---|---|
docx | 新版文档 |
doc | 旧版文档 |
sheet | 电子表格 |
bitable | 多维表格 |
mindnote | 思维导图 |
file | 云空间文件 |
从 URL 获取 document_id
https://xxx.feishu.cn/docx/doxcnxxxxxx
↑ document_id常见错误
| 错误 | 解决 |
|---|---|
| User access token not configured | 配置 OAuth |
| permission denied | 使用 useUAT: true |
| document not found | 检查 document_id |
工作流:导入并分享
# 1. 导入 Markdown
工具: mcp__lark-mcp__docx_builtin_import
data:
markdown: "# 报告\n\n内容..."
# 2. 添加权限(使用返回的 token)
工具: mcp__lark-mcp__drive_v1_permissionMember_create
path:
token: "返回的token"
params:
type: "docx"
data:
member_type: "email"
member_id: "user@example.com"
perm: "view"消息操作
核心规则
# content 必须是 JSON 字符串
❌ content: {"text": "hello"}
✅ content: '{"text": "hello"}'
# receive_id_type 必须匹配 receive_id 类型
receive_id: "oc_xxxxx"
receive_id_type: "chat_id"发送消息
工具: mcp__lark-mcp__im_v1_message_create
data:
receive_id: "oc_xxxxx"
msg_type: "text"
content: '{"text": "消息内容"}'
params:
receive_id_type: "chat_id"消息类型
| msg_type | content |
|---|---|
| text | {"text": "文本"} |
| post | 富文本 JSON |
| image | {"image_key": "xxx"} |
| file | {"file_key": "xxx"} |
富文本元素
content: '{
"post": {
"zh_cn": {
"title": "标题",
"content": [
[{"tag": "text", "text": "正文"}],
[{"tag": "at", "user_id": "ou_xxx", "text": "@张三"}]
]
}
}
}'| 标签 | 示例 |
|---|---|
| 文本 | {"tag": "text", "text": "内容"} |
| 加粗 | {"tag": "text", "text": "内容", "style": ["bold"]} |
| 链接 | {"tag": "a", "text": "文字", "href": "URL"} |
| @用户 | {"tag": "at", "user_id": "ou_xxx"} |
| @所有人 | {"tag": "at", "user_id": "all"} |
获取消息历史
工具: mcp__lark-mcp__im_v1_message_list
params:
container_id_type: "chat"
container_id: "oc_xxxxx"
page_size: 50时间范围过滤:
params:
start_time: "1705276800" # 秒级时间戳
end_time: "1705363200"常见错误
| 错误 | 解决 |
|---|---|
| invalid content format | content 用单引号包裹 JSON |
| receive_id not found | 检查 receive_id_type 是否匹配 |
| permission denied | 邀请机器人加入群组 |
安装配置
快速配置
{
"mcpServers": {
"lark-mcp": {
"command": "npx",
"args": ["-y", "@larksuiteoapi/lark-mcp", "mcp", "-a", "<app_id>", "-s", "<app_secret>"]
}
}
}注意: 不要使用 -t 限制工具,否则只会加载指定工具。
参数
| 参数 | 必需 | 说明 |
|---|---|---|
-a | ✅ | App ID |
-s | ✅ | App Secret |
--oauth | ❌ | 启用用户身份认证 |
--token-mode | ❌ | user_access_token |
--domain | ❌ | 国际版用 https://open.larksuite.com |
OAuth 配置
以下工具需要用户令牌:
docx_builtin_search(搜索文档)wiki_v1_node_search(搜索知识库)
⚠️ 常见坑
只加 `--oauth` 不够,必须同时加 `--token-mode user_access_token`:
// ❌ 错误:只加 --oauth,仍返回 99991663
{"args": ["-y", "@larksuiteoapi/lark-mcp", "mcp", "-a", "cli_xxx", "-s", "xxx", "--oauth"]}
// ✅ 正确:必须同时添加
{"args": ["-y", "@larksuiteoapi/lark-mcp", "mcp", "-a", "cli_xxx", "-s", "xxx", "--oauth", "--token-mode", "user_access_token"]}弄好之后需要重启agent工具
配置步骤
1. 终端登录
npx -y @larksuiteoapi/lark-mcp login -a cli_xxx -s xxx2. 更新配置
{
"mcpServers": {
"lark-mcp": {
"args": [
"-y", "@larksuiteoapi/lark-mcp", "mcp",
"-a", "cli_xxx", "-s", "xxx",
"--oauth",
"--token-mode", "user_access_token"
]
}
}
}3. 配置重定向 URL
飞书开放平台 → 应用 → 安全设置 → 添加:
http://localhost:3000/callback4. 重启 Claude Code
OAuth 效果
| 场景 | 无 OAuth | 有 OAuth |
|---|---|---|
| 创建资源 | 创建者=飞书助手 | 创建者=当前用户 |
| 搜索文档/知识库 | ❌ | ✅ |
| 访问私有资源 | ❌ | ✅ |
常见问题
| 问题 | 原因 | 解决 |
|---|---|---|
| 只有 3 个工具 | 使用了 -t | 移除 -t 参数 |
| 99991663 错误 | OAuth 不完整 | 同时添加 --oauth 和 --token-mode user_access_token |
| redirect_uri_mismatch | 未配置重定向 | 添加 http://localhost:3000/callback |
预设工具集
| 预设 | 用途 |
|---|---|
preset.default | 默认,常用功能 |
preset.im.default | 即时消息 |
preset.base.default | 多维表格 |
preset.doc.default | 文档操作 |
获取凭证
1. 访问 飞书开放平台 2. 创建企业自建应用 3. 获取 App ID 和 App Secret 4. 添加所需权限
相关链接
权限管理
核心规则
# member_type 必须与 member_id 匹配
member_type: "openid"
member_id: "ou_xxxxx"
member_type: "email"
member_id: "user@example.com"添加权限
工具: mcp__lark-mcp__drive_v1_permissionMember_create
path:
token: "doxcnxxxxxx"
data:
member_type: "openid"
member_id: "ou_xxxxx"
perm: "edit"
params:
type: "docx"
useUAT: truemember_type
| member_type | member_id |
|---|---|
openid | ou_xxxxx |
email | user@example.com |
openchat | oc_xxxxx |
opendepartmentid | od_xxxxx |
权限类型
| perm | 说明 |
|---|---|
view | 只读 |
edit | 可编辑 |
full_access | 完全控制 |
资源类型
| type | token 格式 |
|---|---|
docx | doxcnxxxxxx |
sheet | 表格 token |
bitable | bascnxxxxxx |
常见错误
| 错误 | 解决 |
|---|---|
| member not found | 检查 member_type 和 member_id 匹配 |
| 1063001 | 外部邮箱权限需用户身份 |
故障排查
错误速查
| 错误 | 原因 | 解决 |
|---|---|---|
| tool not found | 服务器名错误 | 使用 mcp__lark-mcp__ 前缀 |
| 99991663 | 权限不足 | useUAT: true 或配置 OAuth |
| 131005 | token 无效 | 检查 token 类型和权限 |
| 230001 | container_id 无效 | 检查 chat_id 格式 |
| 1063001 | 外部邮箱权限 | 使用用户身份 |
常见问题
tool not found
检查工具名称格式:
✅ mcp__lark-mcp__tool_name
❌ mcp__lark_mcp__tool_name99991663 Invalid access token
原因: 知识库/文档搜索需要用户令牌
解决: 1. 配置 OAuth(见 installation.md) 2. 或在工具调用中使用 useUAT: true
131005 document is not in wiki
原因: wiki_v2_space_getNode 使用了文档 token
解决: 使用 wikcn 开头的知识库节点 token
知识库节点 token: wikcnxxxxxx ✅
文档 token: doxcnxxxxxx ❌创建的资源无法访问
原因: 使用租户身份创建,创建者是"飞书助手"
解决:
useUAT: truefield not found
原因: 字段名错误或使用了 field_id
解决: 用 bitable_v1_appTableField_list 确认字段名
invalid request
常见原因:
1. content 格式错误
❌ content: {"text": "hello"}
✅ content: '{"text": "hello"}'2. 过滤 value 不是数组
❌ value: "已完成"
✅ value: ["已完成"]3. 缺少 path 参数
path:
app_token: "bascnxxxxxx"
table_id: "tblxxxxxx"群主显示为机器人
解决: 创建群组时指定 owner_id
data:
owner_id: "ou_xxxxx"调试技巧
1. 检查 MCP 服务
工具: mcp__lark-mcp__im_v1_chat_list
params:
page_size: 12. 最小参数测试
先用必需参数测试,再逐步添加可选参数。
3. 查看错误详情
错误响应格式:
{
"code": 99991663,
"msg": "具体错误信息"
}获取帮助
知识库 (Wiki)
⚠️ 必须配置 OAuth
知识库工具需要用户令牌,否则返回 99991663 错误。
配置方法: 见 installation.md
搜索知识库节点
工具: mcp__lark-mcp__wiki_v1_node_search
data:
query: "关键词" # 参数名是 query,不是 search_key
page_size: 20响应:
{
"items": [
{
"node_id": "wikcnxxxxxx",
"obj_token": "doxcnxxxxxx",
"obj_type": 8,
"title": "节点标题"
}
]
}获取节点信息
工具: mcp__lark-mcp__wiki_v2_space_getNode
params:
token: "wikcnxxxxxx" # 必须是知识库节点 token注意: token 必须以 wik 开头,不能用文档 token (doxcn)。
Token 类型
| 前缀 | 类型 | 用途 |
|---|---|---|
wikcn | 知识库节点 | wiki_v2_space_getNode |
doxcn | 文档 | docx_v1_document_rawContent |
从 URL 获取 token
知识库节点: https://xxx.feishu.cn/wiki/wikcnxxxxxx
↑ 知识库节点 token
文档: https://xxx.feishu.cn/docx/doxcnxxxxxx
↑ 文档 token(不能用于 wiki_v2_space_getNode)常见错误
| 错误 | 原因 | 解决 |
|---|---|---|
| 99991663 | 未配置用户令牌 | 配置 OAuth |
| 131005 document not in wiki | 使用了文档 token | 使用 wikcn 开头的节点 token |
与文档工具配合
# 1. 搜索知识库
工具: mcp__lark-mcp__wiki_v1_node_search
data:
query: "关键词"
# 2. 用 obj_token 读取文档内容
工具: mcp__lark-mcp__docx_v1_document_rawContent
path:
document_id: "obj_token值"
useUAT: trueRelated skills
FAQ
Why does document search return error 99991663?
docx_builtin_search and wiki_v1_node_search require OAuth configured with --oauth; without it the API returns permission error 99991663.
When should useUAT be true?
Set useUAT true when creating resources users must access, searching documents or wikis, or reading private user data; use false for public tenant queries.
How must message content be formatted?
The content field must be a JSON string such as '{"text": "hello"}', not a raw JSON object.
Is Lark Mcp safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.