loading…
Search for a command to run...
loading…
Enables Claude to read and interact with Feishu (Lark) documents, spreadsheets, and multi-dimensional tables. It provides tools for extracting content and metad
Enables 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.
让 Claude 读取飞书文档、电子表格和多维表格。
pnpm install
前往飞书开放平台创建一个自建应用:
sheets:spreadsheet:readonly — 读取电子表格docx:document:readonly — 读取文档bitable:app:readonly — 读取多维表格drive:drive:readonly — 读取云空间http://localhost:3000/callback应用需要发布版本后,权限才会生效。如果只在开发环境使用,可以创建测试版本并添加可用性范围。
npx tsx src/oauth.ts -a <APP_ID> -s <APP_SECRET>
浏览器会打开飞书授权页面,登录授权后令牌会自动保存到 ~/.feishu-mcp/tokens.json。令牌过期后服务端会自动使用 refresh token 续期。
在 Claude 的 MCP 配置中添加:
{
"mcpServers": {
"feishu": {
"command": "npx",
"args": [
"tsx", "/absolute/path/to/src/index.ts",
"-a", "<APP_ID>",
"-s", "<APP_SECRET>"
]
}
}
}
| 参数 | 说明 |
|---|---|
-a |
飞书应用 App ID |
-s |
飞书应用 App Secret |
服务端会自动从 ~/.feishu-mcp/tokens.json 加载用户令牌,无需在配置中写入 -u 和 -r。省略用户令牌则使用 tenant token,只能访问应用本身有权限的资源。
用户令牌有效期约 2 小时,refresh token 有效期约 30 天。服务端会在令牌过期时自动续期。如果 refresh token 也过期,重新运行步骤 1 即可。
| URL 路径 | 提取内容 |
|---|---|
feishu.cn/docx/<id> |
文档 ID |
feishu.cn/sheets/<token> |
电子表格 token |
feishu.cn/base/<token> |
多维表格 app token |
~/.feishu-mcp/tokens.json,个人凭据,每人需自行运行步骤 1 获取。Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"feishu-mcp-server": {
"command": "npx",
"args": []
}
}
}