Skip to main content

MCP Server for Lark/Feishu OpenAPI

Project description

yuppie-mcp-lark

飞书(Lark / Feishu)MCP Server — 让 AI 助手通过 MCP 协议操作飞书消息、多维表格、电子表格。

特性

  • 消息:发送单聊/群聊消息
  • 多维表格:搜索记录(支持分页、排序、过滤)
  • 电子表格:元信息查询、工作表增删复制、范围读写、追加数据、删除行列
  • 快捷操作:列过滤、批次索引、批量更新、批量追加、按批次读取
  • 鉴权:基于飞书应用 tenant_access_token,自动刷新
  • 部署:仅 stdio,本地 AI 助手友好

快速开始

Claude Code

.mcp.json 中添加(--refresh 强制拉取 PyPI 最新版,忽略本地缓存):

{
  "mcpServers": {
    "lark": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--refresh", "yuppie-mcp-lark"],
      "env": {
        "LARK_APP_ID": "cli_xxx",
        "LARK_APP_SECRET": "xxx"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json 中添加同上配置。

Cherry Studio / Claude Desktop / OpenCode

参照上方 env 字段,按各自 MCP 配置格式填入即可。

环境变量

变量 必填 默认值 说明
LARK_APP_ID - 飞书应用 App ID
LARK_APP_SECRET - 飞书应用 App Secret
LARK_BASE_URL https://open.feishu.cn 国际版设为 https://open.larksuite.com

可用工具(共 17 个)

消息

工具 说明
lark_send_message 发送消息(支持 text/post/image/interactive 等)

多维表格

工具 说明
lark_search_records 搜索记录(支持分页、排序、过滤)

电子表格通用

工具 说明
lark_get_spreadsheet_metainfo 获取电子表格元信息
lark_add_sheet 添加工作表
lark_delete_sheet 删除工作表
lark_copy_sheet 复制工作表
lark_read_range 读取范围数据
lark_write_range 写入范围数据
lark_append_data 追加数据
lark_delete_dimension 删除行列

电子表格快捷操作

工具 说明
lark_quick_filter_sheet_columns 只保留指定列,删除其余列
lark_quick_set_batch_index 按列设置批次索引
lark_quick_set_header_list 写入新表头
lark_quick_get_column_last_value 获取列最后一个非空值
lark_quick_get_rows_by_batch 按批次读取行
lark_quick_batch_update 批量更新行
lark_quick_batch_append 批量追加行

测试与调试

uv pip install -e ".[dev]"
uv run pytest -v

使用 MCP Inspector 调试(需先在 .env 配置 LARK_APP_ID / LARK_APP_SECRET):

npx @modelcontextprotocol/inspector uv run yuppie-mcp-lark

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yuppie_mcp_lark-0.1.6.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yuppie_mcp_lark-0.1.6-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file yuppie_mcp_lark-0.1.6.tar.gz.

File metadata

  • Download URL: yuppie_mcp_lark-0.1.6.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yuppie_mcp_lark-0.1.6.tar.gz
Algorithm Hash digest
SHA256 fe07266cdc3be0861bedd1dcc20b6a74e7c347342b1833c90f3158465582931b
MD5 0923133f9f41db7064d87c6ee765ad5a
BLAKE2b-256 c7c5854c7547760ffacf1e7b1de7f0cd7b879710d76bc132e0655dc4d72b0111

See more details on using hashes here.

File details

Details for the file yuppie_mcp_lark-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: yuppie_mcp_lark-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yuppie_mcp_lark-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 282f586364545e52b5753ea0acc9e534c0dcfee45988f1710b470dd7528a8ff3
MD5 44e1b7da6f0210a56c9d038fabc44467
BLAKE2b-256 516e95acf4046845ae6f07af3d340e55f0e45aabd630592a2569f129fcf91fc5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page