feishu-bot-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@feishu-bot-mcpsend a message to the default chat: Project update is ready."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
feishu-bot-mcp
飞书机器人 MCP 服务器 — 通过 Model Context Protocol 向飞书发送文本、文件和图片消息。
适用于 Claude Code、AionUI 等支持 MCP 的 AI 工具。
功能
工具 | 说明 |
| 发送文本消息 |
| 上传并发送文件 |
| 上传并发送图片 |
| 仅上传文件(返回 file_key) |
| 发送已上传的文件 |
| 发送已上传的图片 |
所有发送类工具的 receive_id 参数均可留空,自动使用 .env 中配置的默认群组。
Related MCP server: feishu-enhance-mcp
前置条件
创建 飞书开放平台 应用,获取 App ID 和 App Secret
为应用开启 机器人 能力
添加权限:
im:message:send_as_bot、im:file、im:image将机器人添加到目标群组
安装
# 克隆项目
git clone https://github.com/<your-username>/feishu-bot-mcp.git
cd feishu-bot-mcp
# 创建虚拟环境
python3 -m venv .venv
source .venv/bin/activate
# 安装依赖
pip install -r requirements.txt
# 配置环境变量
cp .env.example .env
# 编辑 .env 填入真实凭证配置
复制 .env.example 为 .env,填入你的飞书应用凭证:
# 飞书应用凭证(必填)
FEISHU_APP_ID=your_app_id_here
FEISHU_APP_SECRET=your_app_secret_here
# 默认消息接收群组 ID(选填)
FEISHU_CHAT_ID=your_chat_id_here配置优先级:环境变量 > .env 文件 > 调用时传参
MCP 集成配置
Claude Code
claude mcp add -s user \
-e "FEISHU_CHAT_ID=your_chat_id" \
-- feishu-bot \
/path/to/.venv/bin/python3 \
/path/to/feishu-bot-mcp/server.py或手动编辑 ~/.claude.json:
{
"mcpServers": {
"feishu-bot": {
"command": "/path/to/.venv/bin/python3",
"args": ["/path/to/feishu-bot-mcp/server.py"],
"env": {
"FEISHU_CHAT_ID": "your_chat_id"
}
}
}
}AionUI
在 MCP 设置中添加:
{
"feishu-bot": {
"command": "/path/to/.venv/bin/python3",
"args": ["/path/to/feishu-bot-mcp/server.py"],
"env": {
"FEISHU_CHAT_ID": "your_chat_id"
}
}
}注意:如果
.env文件已配置好凭证,MCP 配置中的env字段可以省略。环境变量会覆盖.env中的值。
使用示例
配置完成后,在 AI 工具中可以直接使用:
# 发送文本(自动发到默认群组)
→ feishu_send_text_message(text="Hello from MCP!")
# 发送文件
→ feishu_send_file(file_path="/path/to/report.pdf")
# 发送图片
→ feishu_send_image(image_path="/path/to/screenshot.png")
# 发送到指定群组
→ feishu_send_text_message(text="Hi", receive_id="oc_xxx")支持的文件类型
file_type | 说明 |
| 通用二进制流(默认) |
| PDF 文档 |
| Word 文档 |
| Excel 表格 |
| PowerPoint 演示文稿 |
| 视频文件 |
| 音频文件 |
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Drive WhatsApp from any MCP client: pair devices, send text and media, manage contacts and groups.
Hosted MCP messaging across owners, tools, and machines, with readable transcripts.
Let Claude or ChatGPT search, read and send your WhatsApp messages over MCP. OAuth sign-in.
Agent communication platform for agent to agent messaging via MCP. Messages, channels, skills.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables Claude/Cursor to interact with Feishu (Lark) bots through MCP, allowing LLMs to execute business logic via Feishu robot APIs.18-
- AlicenseNot gradedqualityDmaintenanceEnables real-time Feishu message monitoring, sending, file upload to cloud documents, and supports async and scheduled tasks via MCP.5MIT
- AlicenseBqualityDmaintenanceEnables remote chat between Feishu (Lark) and AI agents like Cursor/Claude via MCP, allowing users to send messages from Feishu groups and receive streaming replies.45 npmMIT
- AlicenseBqualityDmaintenanceEnables interaction with Feishu (Lark) via MCP for sending messages, managing calendar events, searching documents, and reading/writing bitable records.8Apache 2.0