内容
="center">
<ahttps://three.ws"><imghttps://three.ws/three-mcp-icon.svg" alt="three.ws" width="88" height="88"></a>
</p>
="center">@three-wifications-mcp</h1>
="center"><strong>您的 three.ws 通知 inbox、投递偏好设置以及 Web Push 设备 — 来自任意 AI 代理。</strong></p>
<p align="center">
<a href="https://www.npmjs.com/package/@three-ws/notifications-mcp"><img alt="npm" src="https://img.shields.io/npm/v/@three-ws/notifications-mcp?logo=npm&color=cb3837"></a>
<img alt="license" src="https://img.shields.io/npm/l/@three-ws/notifications-mcp?color=3b82f6">
<img alt="node"https://img.shields.io/node/v/@three-ws-mcp?color=339=node.js">
<a href://registry.modelcontextprotocol.io/?q=io.github.nirholimg alt="MCP Registry" src="https://img.shields.io%20Registry-io.github.nirholas-0ea5ea>
<a href="https://three.ws"><img alt="three.ws" src="https://img.shields.io/badge/built%20by-three.ws-000"></a>
</p>
---
> 一个 [模型上下文协议](https://modelcontextprotocol.io,为 AI 助手提供.ws **通知 inbox + 投递控制**,通过 stdio。事件(泵/市场警销售和收益、购买收提及、现实世界交互/安全)、标记它们为已读、调整每个类别 → 每个通道的投递矩阵,并注册 Web Push 设备 — 所有操作都是实按帐户范围的。
每次读取和写入都会调用真正的 three.ws服务器是 **经过身份验证:它携带一个 three.ws API 密钥(或 OAuth 访问令牌)作为 `Bearer` 凭证,并在每次调用时解析所属帐户。它不会在本地签名任何内容,也不持有其他秘密。
## 安装
```bash
npm install @three-ws/notifications-mcp
```
或使用 `` 运行(无需安装):
npx @three/notifications-mcp
```
快速入门
**Claude,一行:
```bash
_WS_API_KEY=sk_live_… claude mcp add notifications -- npx -y @three-ws/notifications-mcp
```
## 工具
| 工具 | 功能 |
|------|------|--------------|
| `list_notifications` | 收件箱,按最新优先 `type` 过滤,并附带 `unread_count`。 `mark_read` | 写入 | 将一个通知(或所有未读通知)标记为已读。 |
| `delete_notification`写入 ⚠️ | 永久删除一个通知(不可逆)。 |
| `get_preferences` | 读取 | 每个类别 → 每个通道的矩阵(`in_app``、`email`、`telegram`)。 |
| `set_preferences 写入 | 修补哪些每个类别投递。 |
register_push_device` | 写入 | 从浏览器 `PushSubscription` 注册 Web Push 设备。 |
| `unregister_push_device` | 写入 ⚠️ | 删除 Web Push 设备向其投递)。 |
## 配置
| 环境变量 | 是否必需 | 默认值 | 描述 |
|---------|----------|---------|-------------|
| `THREE_WS_API_KEY` | **是** | — | three.ws API 密钥(`sk_live_…` / `sk_test_…`)或帐户的 OAuth 访问令牌。别名:`THREE_WS_TOKEN`、`THREE_WS_BEARER`。像密码一样对待。 |
| `_WS_BASE` | 否 | `https://three.ws` | API 基本 URL。只有在自托管或针对预览环境时。 |
| `TH_TIMEOUT_MS` | 否 | `20000` | 每个请求的超时时间(毫秒)。 |
每个端点都是按帐户范围的,如果没有有效的凭证,则返回 `401` — 此服务器永远无法读取或更改其他帐户。
## 许可证
版权所有 © 2026 nirholas。保留所有权利。
该软件是专有的 — 请参阅 [LICENSE](./LICENSE)。未经版权所有者明确书面许可,不得授予任何权利。