moab-notify 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -37
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -1,49 +1,74 @@
|
|
|
1
|
-
# moab-notify
|
|
1
|
+
# moab-notify — MCP server for moab.tools notifications
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Connect Claude Code (or any MCP client) to `apprise.moab.tools` and manage your notification
|
|
4
|
+
**address book** in natural language: list recipients, register or update a recipient's channels
|
|
5
|
+
(Telegram and/or email), remove a recipient, and send a test notification.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
The server is a thin local stdio client: it forwards each tool call to the `apprise.moab.tools`
|
|
8
|
+
admin API with your Bearer token. No secrets live in the package — access is protected by Keycloak
|
|
9
|
+
and requires the `apprise-admin` role. (Applications send notifications through the gateway's
|
|
10
|
+
in-cluster API; this MCP only manages who-gets-what.)
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```json
|
|
19
|
-
{
|
|
20
|
-
"mcpServers": {
|
|
21
|
-
"moab-notify": { "command": "npx", "args": ["-y", "moab-notify"] }
|
|
22
|
-
}
|
|
23
|
-
}
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
claude mcp add notify --scope user -- npx -y moab-notify
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
On **Windows**, wrap with `cmd /c` (npx is a `.cmd` shim):
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
claude mcp add notify --scope user -- cmd /c npx -y moab-notify
|
|
24
22
|
```
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
(`notify` is just the local name — call it whatever you like. Requires Node.js 20+.)
|
|
25
|
+
|
|
26
|
+
## Sign in
|
|
27
|
+
|
|
28
|
+
On your first operation the server asks you to sign in. Run the **`login`** tool — it returns a link
|
|
29
|
+
and a short code; open the link in a browser, confirm via `auth.moab.tools` (the same corporate
|
|
30
|
+
account as the portal `lk.moab.tools`), then repeat your request. You need the **`apprise-admin`**
|
|
31
|
+
role. The token refreshes automatically; you won't need to sign in again while the session is active.
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
- `auth_status` — who is signed in.
|
|
34
|
+
- `auth_logout` — sign out (removes stored tokens).
|
|
35
|
+
|
|
36
|
+
## Tools
|
|
37
|
+
|
|
38
|
+
| Tool | Purpose |
|
|
29
39
|
|---|---|
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
40
|
+
| `recipient_list` | list the address book (recipients and their channels) |
|
|
41
|
+
| `recipient_set` | create or update a recipient by email id; set channels (Telegram chat_id and/or email). Given fields are overwritten, omitted ones are kept |
|
|
42
|
+
| `recipient_remove` | remove a recipient from the address book |
|
|
43
|
+
| `notify_test` | send a test notification to a recipient over their channels |
|
|
34
44
|
|
|
35
|
-
|
|
45
|
+
### Identity & channels
|
|
36
46
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
A recipient is identified by **email** (the same person across all tools). Channels are an arbitrary
|
|
48
|
+
set: a Telegram `chat_id` and/or email delivery. **Telegram-only** = set just `telegram_chat_id`,
|
|
49
|
+
leave `email_enabled` off — the email is only an identifier then, nothing is mailed to it.
|
|
50
|
+
|
|
51
|
+
## Getting a Telegram chat_id
|
|
52
|
+
|
|
53
|
+
The recipient presses **Start** in `@MoabAlertsBot`. Their numeric id (their Telegram user id, which
|
|
54
|
+
equals the private-chat id) is the `chat_id`. A future `pending_starts` tool will read it
|
|
55
|
+
automatically; for now obtain it out-of-band and pass it to `recipient_set`.
|
|
42
56
|
|
|
43
|
-
|
|
57
|
+
## Examples
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
Ask in plain language, e.g.:
|
|
46
60
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
- "register ivan@moab.pro with telegram chat id 358024411"
|
|
62
|
+
- "show the address book"
|
|
63
|
+
- "also enable email for ivan@moab.pro"
|
|
64
|
+
- "send a test notification to ivan@moab.pro"
|
|
65
|
+
- "remove client@acme.com from notifications"
|
|
66
|
+
|
|
67
|
+
## Configuration (env, optional)
|
|
68
|
+
|
|
69
|
+
| Variable | Default |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `NOTIFY_API_BASE` | `https://apprise.moab.tools` |
|
|
72
|
+
| `KEYCLOAK_AUTHORITY` | `https://auth.moab.tools/realms/moab` |
|
|
73
|
+
| `KEYCLOAK_CLIENT` | `apprise-cli` |
|
|
74
|
+
| `MOAB_CONFIG_DIR` | `~/.moab` (tokens stored in `~/.moab/notify-mcp/credentials.json`) |
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moab-notify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "MCP server for moab.tools notifications (apprise.moab.tools) — manage notification recipients (Telegram + email) from an LLM.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
"bin": {
|
|
7
|
+
"moab-notify": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20"
|
|
14
|
+
},
|
|
9
15
|
"scripts": {
|
|
10
16
|
"build": "tsc -p tsconfig.json",
|
|
11
17
|
"test": "vitest run",
|