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.5.tar.gz (19.5 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.5-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yuppie_mcp_lark-0.1.5.tar.gz
  • Upload date:
  • Size: 19.5 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.5.tar.gz
Algorithm Hash digest
SHA256 15f7519d9175eb9bb0f2913d0c44e5bac3995f74eddbdbd1f932945306e63c72
MD5 55aa17be89aaa3d74378014b0e1ccf32
BLAKE2b-256 c2bc450b23ce198ad80018d617d2cb7c20999b23f958d8481c1eedf944666fd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yuppie_mcp_lark-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 28.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d74328d09e1e5493f08d8b87a4df4d7ed6c7c099cb351903117f9c57cf80e5
MD5 d1098e06d12b04b45f6232b200e8f3bb
BLAKE2b-256 3bd6d04947f2f901f6d945b4cf2f30f11809fc76402e142309f787759f0ecf55

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