内容
# @pingfyr/mcp
将您的 AI 助手连接到 Pingfyr, 通过自然对话管理提醒。
一次 API 调用,七种渠道。您的提醒会自动触发 - 无需外部 cron,无需轮询,无需人工干预。
作为本地 npm 包或托管服务器 `mcp.pingfyr.com` 提供 - 无需本地安装。
## 安装
```bash
npm install -g @pingfyr/mcp
```
或使用 npx 直接运行:
```bash
npx @pingfyr/mcp
```
## 配置
### 本地设置(stdio)
作为本地进程运行 MCP 服务器。 需要 Node.js 18+。
添加到您的 MCP 客户端配置(Claude Code、Cursor、Windsurf 等):
```json
{
"mcpServers": {
"pingfyr": {
"command": "pingfyr-mcp",
"env": {
"PINGFYR_API_KEY": "rm_your_api_key"
}
}
}
}
```
在 [pingfyr.com](https://pingfyr.com) 注册以获取您的 API 密钥。
### 托管设置
无需安装。直接使用 HTTP 传输连接到 `mcp.pingfyr.com`。您的 API 密钥作为 Bearer token 发送每个请求。
```json
{
"mcpServers": {
"pingfyr": {
"type": "http",
"url": "https://mcp.pingfyr.com",
"headers": {
"Authorization": "Bearer rm_your_api_key"
}
}
}
}
```
HTTP 传输支持 Claude Code 和 Cursor。Claude Desktop 需要上述本地(stdio)选项。
## 可用工具
| 工具 | 描述 |
| ----------------- | -------------------------------------------------------------------------------------------------- |
| `create_reminder` | 通过电子邮件、Webhook、Slack、Discord、Telegram、OpenClaw 或 Google Calendar 安排新提醒 |
| `list_reminders` | 列出所有提醒,可选按状态、限制和偏移量筛选 |
| `update_reminder` | 更新待处理提醒(标题、正文、触发时间、渠道、收件人、重复、时区) |
| `cancel_reminder` | 取消待处理提醒 |
### `create_reminder` 参数
| 参数 | 必需 | 类型 | 描述 |
| ----------------- | -------- | -------- | --------------------------------------------------------------------------------- |
| `title` | 是 | 字符串 | 提醒标题(最多 200 个字符) |
| `fire_at` | 是 | 字符串 | 触发时间(ISO 8601 日期时间,必须在未来) |
| `channel` | 是 | 枚举 | `email`、`webhook`、`slack`、`discord`、`telegram`、`openclaw`、`google_calendar` |
| `recipients` | 是 | 字符串[] | 投递地址(参见每个渠道的格式) |
| `body` | 否 | 字符串 | 提醒正文(最多 2000 个字符) |
| `repeat` | 否 | 枚举 | `daily`、`weekly`、`monthly`、`custom` |
| `cron_expression` | 否 | 字符串 | Cron 表达式(当 `repeat` 为 `custom` 时必填) |
| `timezone` | 否 | 字符串 | 重复提醒的 IANA 时区(默认:UTC) |
| `metadata` | 否 | 对象 | 附加到提醒的任意键值元数据 |
### `list_reminders` 参数
| 参数 | 必需 | 类型 | 描述 |
| --------- | -------- | ------ | ----------------------------------------------------------- |
| `status` | 否 | 枚举 | `pending`、`processing`、`delivered`、`failed`、`cancelled` |
| `limit` | 否 | 数值 | 最大结果数(默认:50,最大:100) |
| `offset` | 否 | 数值 | 分页偏移量(默认:0) |
### `update_reminder` 参数
| 参数 | 必需 | 类型 | 描述 |
| ------------ | -------- | -------- | ------------------------------------ |
| `id` | 是 | 字符串 | 要更新的提醒的 UUID |
| `title` | 否 | 字符串 | 新标题 |
| `body` | 否 | 字符串 | 新正文 |
| `fire_at` | 否 | 字符串 | 新触发时间(ISO 8601) |
| `channel` | 否 | 枚举 | 新渠道 |
| `recipients` | 否 | 字符串[] | 更新的投递地址 |
| `repeat` | 否 | 枚举 | 新重复计划(null 以删除) |
| `timezone` | 否 | 字符串 | 新时区 |
## 示例
### 电子邮件提醒(多收件人)
```json
{
"title": "项目截止日期提醒",
"fire_at": "2026-12-15T08:00:00Z",
"channel": "email",
"recipients": ["alice@example.com", "bob@example.com"]
}
```
### Slack 提醒
```json
{
"title": "每周团队同步提醒",
"fire_at": "2026-12-01T09:00:00Z",
"channel": "slack",
"recipients": ["https://hooks.slack.com/services/T.../B.../xxx"],
"repeat": "weekly",
"timezone": "America/New_York"
}
```
### Discord 通知
```json
{
"title": "部署通知",
"fire_at": "2026-12-01T17:00:00Z",
"channel": "discord",
"recipients": ["https://discord.com/api/webhooks/xxx/yyy"]
}
```
### Telegram 提醒
```json
{
"title": "每日站会",
"fire_at": "2026-12-01T09:00:00Z",
"channel": "telegram",
"recipients": ["bot:your-bot-uuid:your-chat-id"],
"repeat": "daily",
"timezone": "Europe/Berlin"
}
```
在 Pingfyr 仪表盘的设置 → Telegram 机器人中找到您的 `bot_id`。
### OpenClaw 通知
```json
{
"title": "代理任务完成",
"fire_at": "2026-12-01T10:00:00Z",
"channel": "openclaw",
"recipients": ["https://openclaw.example.com/webhook"]
}
```
### Google Calendar 事件(需要 Starter+ 计划)
在用户的连接的 Google 账户上创建 Google Calendar 事件。
在 Pingfyr 仪表盘的设置 → Google Calendar 中连接您的账户。
```json
{
"title": "团队同步",
"fire_at": "2026-12-01T09:00:00Z",
"channel": "google_calendar",
"recipients": ["google"]
}
```
### Webhook(代理唤醒)
```json
{
"title": "检查新订单",
"fire_at": "2026-12-01T10:00:00Z",
"channel": "webhook",
"recipients": ["https://your-agent.example.com/webhook"],
"repeat": "daily"
}
```
### 自定义 cron 调度
```json
{
"title": "工作日早晨检查",
"fire_at": "2026-12-01T09:00:00Z",
"channel": "webhook",
"recipients": ["https://your-agent.example.com/webhook"],
"repeat": "custom",
"cron_expression": "0 9 * * MON-FRI",
"timezone": "America/New_York"
}
```
## 渠道
| 渠道 | `recipients` 格式 | 描述 |
| ----------------- | -------------------------- | --------------------------------------------------------------------------------- |
| `email` | 电子邮件地址 | 投递到一个或多个电子邮件邮箱(需要 Starter+ 计划) |
| `webhook` | HTTP/HTTPS URL | POST 请求唤醒代理 |
| `slack` | Slack 传入 Webhook URL | 向 Slack 频道发布消息 |
| `discord` | Discord Webhook URL | 向 Discord 频道发布消息 |
| `telegram` | `bot:<bot_id>:<chat_id>` | 通过 Telegram 机器人发送消息(在设置 → Telegram 机器人中注册) |
| `openclaw` | OpenClaw URL | 向 OpenClaw 端点发送 POST 请求 |
| `google_calendar` | `google`(字面值) | 在连接的账户上创建 Google Calendar 事件(需要 Starter+ 计划) |
## 计划
| 计划 | 价格 | 每月提醒 | 每月收件人 |
| ---------- | ------- | --------------- | ---------------- |
| 免费 | $0 | 50 | 100 |
| Starter | $59/mo | 10,000 | 20,000 |
| Pro | $269/mo | 50,000 | 100,000 |
| Enterprise | 联系 | 无限 | 无限 |
免费计划包括 Webhook、Slack、Discord、Telegram 和 OpenClaw 渠道。电子邮件和 Google Calendar 需要付费计划(Starter+)。
## 环境变量
| 变量 | 必需 | 描述 |
| ----------------- | -------- | --------------------------------------------- |
| `PINGFYR_API_KEY` | 是 | 您的 Pingfyr API 密钥 |
| `PINGFYR_API_URL` | 否 | API 基本 URL(默认:`https://pingfyr.com`) |
## 许可证
MIT