A Feishu bot using MCP (Model Context Protocol)
Project description
Feishu MCP Server
集成飞书(Lark)的 MCP 服务器,支持消息、Drive 与多维表(Bitable)操作。
新增 Bitable 字段相关工具
已注册以下 MCP 工具:
-
bitable_query_fields(app_token, table_id)- 获取指定表的所有字段信息,返回 Markdown。
- 示例:
{ "tool": "bitable_query_fields", "args": {"app_token": "bitable_app_token_xxx", "table_id": "tbl_xxx"} }
-
bitable_upsert_fields(app_token, table_id, fields)- 批量新增或更新字段(Upsert):
- 若对象包含
field_id则更新; - 若无
field_id但提供field_name且同名字段存在,则更新; - 其他情况为新增。
- 若对象包含
- 字段对象示例:
[ {"field_name": "状态", "type": 3, "property": {"options": [{"name": "Open"}, {"name": "Closed"}]}}, {"field_id": "fld_123", "field_name": "负责人", "type": 11, "description": "任务负责人"} ]
- 调用示例:
{ "tool": "bitable_upsert_fields", "args": {"app_token": "bitable_app_token_xxx", "table_id": "tbl_xxx", "fields": [/* 如上 */]} }
- 批量新增或更新字段(Upsert):
-
bitable_delete_fields(app_token, table_id, field_ids=None)- 批量删除字段:仅支持通过
field_ids指定。 - 调用示例:
{ "tool": "bitable_delete_fields", "args": {"app_token": "bitable_app_token_xxx", "table_id": "tbl_xxx", "field_ids": ["fld_1", "fld_2"]} }
- 批量删除字段:仅支持通过
新增 Bitable 表创建工具(Create-only)
bitable_create_table(app_token, table_name, fields=None)- 仅创建数据表:
- 若同名表已存在:返回存在提示,不进行任何字段更新。
- 若不存在同名表:创建新表。
fields参数将被忽略,请使用bitable_upsert_fields管理字段。
- 调用示例:
{ "tool": "bitable_create_table", "args": {"app_token": "bitable_app_token_xxx", "table_name": "任务列表"} }
- 仅创建数据表:
环境变量
在运行前确保配置:
FEISHU_APP_IDFEISHU_APP_SECRET
注意事项
type需使用飞书多维表字段类型编码(如:3=单选、4=多选、11=人员等)。- 批量新增/更新会拉取已有字段以做名称到 ID 匹配,字段很多时请求耗时会增长。
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
mcp_feishu_bot-0.2.4.tar.gz
(36.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_feishu_bot-0.2.4.tar.gz.
File metadata
- Download URL: mcp_feishu_bot-0.2.4.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1081adcea26e0bbe4c5ab0515203b4cd263841183320377126d5b75a24c70097
|
|
| MD5 |
8817a0d3f1c34694f03df3c6e6759c6a
|
|
| BLAKE2b-256 |
b81b71721a6d2f6ac0e75287e5598e4531edc383e7b7e9cc0925bed5823f4353
|
File details
Details for the file mcp_feishu_bot-0.2.4-py3-none-any.whl.
File metadata
- Download URL: mcp_feishu_bot-0.2.4-py3-none-any.whl
- Upload date:
- Size: 39.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d47550b29d7ab88784d593d3b3d5d71219194e296f3c322f91a28a8540834566
|
|
| MD5 |
58dd45b323967b71f56573af18834b31
|
|
| BLAKE2b-256 |
1f9c23c1ce447f95b24fa2c092d858703231bbc57d614294200f04bfa35c5132
|