mcp-feishu-notifier
v1.0.1
Published
一个基于 Model Context Protocol (MCP) 的服务器,允许 AI 助手通过飞书机器人 Webhook 发送通知消息。
Downloads
267
Maintainers
Readme
mcp-feishu-notifier
mcp-feishu-notifier 是一个基于 Model Context Protocol (MCP) 的服务器,允许 AI 助手通过飞书 (Feishu/Lark) 机器人 Webhook 向飞书群组发送通知消息。
✨ 功能特性
本项目为 AI 提供了三种发送消息的工具:
send_feishu_text: 发送简单的纯文本消息。send_feishu_card(推荐): 发送交互式卡片消息,支持 Markdown 格式的正文和跳转按钮,视觉效果更佳。send_feishu_post: 发送富文本消息。
🚀 快速开始
1. 安装依赖
npm install2. 配置环境变量
在项目根目录下创建 .env 文件,并配置你的飞书机器人 Webhook 地址:
FEISHU_WEBHOOK=https://open.feishu.cn/open-apis/bot/v2/hook/your-webhook-id3. 运行/部署
该服务器使用标准输入输出 (Stdio) 进行通信。你可以直接运行:
npm start🛠 MCP 客户端配置
如果你使用 Claude Desktop,可以在配置文件中添加如下配置:
{
"mcpServers": {
"feishu-notifier": {
"command": "node",
"args": ["f:/gitee/mcp-feishu-notifier/index.js"],
"env": {
"FEISHU_WEBHOOK": "your-webhook-url-here"
}
}
}
}(请根据实际项目路径修改 args 中的路径)
📖 工具详解
send_feishu_text
- 用途: 发送纯文本。
- 参数:
text(string) - 要发送的内容。
send_feishu_card
- 用途: 发送交互式卡片。
- 参数:
title(string) - 卡片标题。markdown(string) - 正文内容,支持 Lark Markdown。buttonText(string) - 按钮文字。buttonUrl(string) - 按钮跳转链接。
send_feishu_post
- 用途: 发送富文本消息。
- 参数:
title(string) - 标题。contentText(string) - 正文内容。url(string) - 详情链接。
📄 许可证
MIT
