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 中添加:

{
  "mcpServers": {
    "lark": {
      "type": "stdio",
      "command": "uvx",
      "args": ["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.1.tar.gz (17.3 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.1-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yuppie_mcp_lark-0.1.1.tar.gz
  • Upload date:
  • Size: 17.3 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.1.tar.gz
Algorithm Hash digest
SHA256 9170fca3c899ad6d2c062ac9ab2eb952d50e7e8dd4e12afebdb6d6b09d473ec8
MD5 6db2d687c6ab6084ec33468f37bd115d
BLAKE2b-256 9e4c47816135420e4fb1cd72e0fe1a59706c01c23b37745f2cd3e1a37ff42a41

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yuppie_mcp_lark-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8421bf6967d67c9ca6b1a3711e111914c77f3385d46e95760a253597246c7f43
MD5 cd7b4a8f8f9db5560cf9e0a6bb4a2972
BLAKE2b-256 612a534afdd193d996e0b45573c7972614ef56a00bd2ba19b256b72638e38642

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