Metadata-Version: 2.4
Name: mcp-feishu-notify
Version: 0.1.0
Summary: MCP server that sends Feishu/Lark custom-bot notifications, intended for sensitive-operation audit alerts
Project-URL: Homepage, https://github.com/kuncheng/feishu-notify-mcp
Author: kuncheng
License: MIT
Keywords: audit,feishu,lark,mcp,notification
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Requires-Dist: mcp[cli]>=1.0.0
Description-Content-Type: text/markdown

# feishu-notify-mcp

一个用于发送飞书（Lark）自定义机器人通知的 MCP server，主要用于敏感操作前的审计提醒。

## 安装

通过 `uvx` 直接运行（推荐）：

```bash
uvx feishu-notify-mcp --webhook-url <你的 webhook> [--secret <secret>]
```

或先安装：

```bash
pip install feishu-notify-mcp
```

## MCP 配置

在 `~/.kiro/settings/mcp.json` 或对应客户端的 MCP 配置文件中：

```jsonc
{
  "mcpServers": {
    "feishu-notify": {
      "command": "uvx",
      "args": ["feishu-notify-mcp"],
      "env": {
        "FEISHU_WEBHOOK_URL": "https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxx",
        "FEISHU_SECRET": "your-secret-or-empty"
      },
      "disabled": false,
      "autoApprove": ["send_feishu_notification"]
    }
  }
}
```

如果机器人没有开启签名校验，可以不传 `FEISHU_SECRET`。也可以通过 `args` 传 `--webhook-url` / `--secret`，CLI 参数优先级高于环境变量。

## 工具

- `send_feishu_notification(tool_name, operation_summary)`：发送一条文本通知，内容形如：

  ```
  ⚠️ Kiro 敏感操作通知
  操作: <tool_name>
  内容: <operation_summary>
  ```

## 飞书签名

签名算法：`key = timestamp + "\n" + secret`，对空字符串做 HMAC-SHA256，再做 Base64 编码。仅在配置了 `secret` 时启用。
