@mosadd/mcp 3.0.0-alpha.55 → 3.0.0-alpha.57
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/CHANGELOG.md +15 -11
- package/README.md +152 -150
- package/dist/bin/mcp.js +1 -1
- package/dist/{chunk-IWUGKLDX.js → chunk-WEGSITAH.js} +30 -14
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/__tests__/blob-upload.test.ts +93 -93
- package/src/__tests__/channel-e2ee.test.ts +62 -62
- package/src/__tests__/flota-jawnie.test.ts +2 -2
- package/src/__tests__/golden-path.test.ts +139 -139
- package/src/__tests__/integration.test.ts +217 -182
- package/src/__tests__/label-room-owner.test.ts +22 -0
- package/src/__tests__/mdm-e2ee.test.ts +212 -212
- package/src/__tests__/mdm-mcp-readable.test.ts +390 -390
- package/src/__tests__/mirc-invite.test.ts +112 -112
- package/src/__tests__/mtalk.test.ts +122 -122
- package/src/__tests__/presence.test.ts +199 -199
- package/src/__tests__/server.test.ts +71 -71
- package/src/__tests__/tool-count-consistency.test.ts +259 -199
- package/src/__tests__/voice-fields.test.ts +24 -0
- package/src/bin/login.ts +138 -138
- package/src/bin/mcp.ts +145 -145
- package/src/config.ts +66 -66
- package/src/crypto/channel-e2ee.ts +288 -288
- package/src/crypto/mdm-session.ts +842 -842
- package/src/index.ts +19 -19
- package/src/observability/sentry.ts +79 -79
- package/src/providers/blob-upload.ts +162 -162
- package/src/providers/memory-voice.ts +79 -79
- package/src/providers/supabase-dm.ts +212 -202
- package/src/providers/supabase-voice.ts +103 -91
- package/src/server.ts +195 -195
- package/src/tools/actions.ts +166 -166
- package/src/tools/attachments.ts +276 -276
- package/src/tools/capabilities.ts +70 -70
- package/src/tools/channel-payload.ts +2 -2
- package/src/tools/embed.ts +110 -110
- package/src/tools/index.ts +181 -181
- package/src/tools/knowledge.ts +344 -344
- package/src/tools/mail-aliases.ts +25 -25
- package/src/tools/mail-provenance.ts +137 -137
- package/src/tools/mail.ts +403 -403
- package/src/tools/mdm-as-agent.ts +138 -126
- package/src/tools/mdm.ts +6 -4
- package/src/tools/mirc-edge.ts +196 -196
- package/src/tools/mirc-members.ts +287 -287
- package/src/tools/mirc-messages.ts +1 -1
- package/src/tools/mirc.ts +308 -308
- package/src/tools/mroom.ts +221 -221
- package/src/tools/mtalk.ts +131 -131
- package/src/tools/presence.ts +442 -442
- package/src/tools/voice-format.ts +43 -28
- package/src/types.ts +121 -121
- package/src/voice/floor.ts +132 -132
package/CHANGELOG.md
CHANGED
|
@@ -8,18 +8,22 @@ gateway (Phase 2) ships.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [3.0.0-alpha.57] — 2026-11-15
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **`mTALK_open {label}` opens a room you own.** The room id is now `mosadd-room-<your identity id>-<label>`;
|
|
15
|
+
you and your accepted contacts can join it, a stranger cannot (before: one shared `mosadd-room-<label>` for every
|
|
16
|
+
account, refused to everyone, including its creator).
|
|
17
|
+
- **`mDM_list` returns voice notes with their transcript and recording.** Voice/PTT messages carry
|
|
18
|
+
`voice: { transcript, audio_url, duration_ms }` (signed URL, read with the caller's own permissions) instead of a
|
|
19
|
+
bare caption.
|
|
20
|
+
|
|
21
|
+
## [3.0.0-alpha.56] — 2026-11-10
|
|
22
|
+
|
|
11
23
|
### Added
|
|
12
|
-
- **`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`wrapped_group_key` is passed; no code to redeem), a human or somebody else's agent gets an
|
|
16
|
-
**invite code** to redeem in the app. Why P0: `mIRC_join` adds the KEY's identity (the human),
|
|
17
|
-
while channel posts are signed by the AGENT — so every channel created from the toolkit was
|
|
18
|
-
mute (`agent_not_in_channel`) until its agent was added from the app's member drawer.
|
|
19
|
-
- **`mIRC_create` `invite_agents?: string[]`** — fan-out to `mIRC_invite` right after creation;
|
|
20
|
-
per-agent failures are reported in `invites[]`, the channel is never rolled back.
|
|
21
|
-
|
|
22
|
-
Tool count **84 → 85** (mIRC **24 → 25**); `TOOL_COUNT` (`= allTools.length`) stays the truth.
|
|
24
|
+
- **`mDM_send_as_agent` `thread_label?`** (LINEAR-6577) — same optional label alphabet as
|
|
25
|
+
`mDM_send` (`[a-zA-Z0-9._-]`, 1–120). Omit = MAIN unlabeled thread (ops lock for SOVEREIGN/King
|
|
26
|
+
until rename/UI merge). A new label opens a new `dm:A:B:label` thread.
|
|
23
27
|
|
|
24
28
|
## [3.0.0-alpha.55] — 2026-09-29
|
|
25
29
|
|
package/README.md
CHANGED
|
@@ -1,150 +1,152 @@
|
|
|
1
|
-
# @mosadd/mcp
|
|
2
|
-
|
|
3
|
-
**They're apps. We're the layer.** The MCP server for [mosADD](https://mosadd.com) — the omnichannel comms layer for humans, agents, and robots. It exposes the OS modules (m\*) — **mDM (1:1
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- `
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
| **
|
|
77
|
-
| **
|
|
78
|
-
| **
|
|
79
|
-
| **
|
|
80
|
-
| **
|
|
81
|
-
| **
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
│
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
|
129
|
-
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
- **
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
1
|
+
# @mosadd/mcp
|
|
2
|
+
|
|
3
|
+
**They're apps. We're the layer.** The MCP server for [mosADD](https://mosadd.com) — the omnichannel comms layer for humans, agents, and robots. It exposes the OS modules (m\*) — **mDM (1:1), mIRC (channels, including open-web mURL rooms), and mAYL (email 3.0)** — as Model Context Protocol tools, so any agent runtime becomes a first-class contact your team can message and direct: Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, or your own.
|
|
4
|
+
|
|
5
|
+
**Hosted path:** `https://mcp.mosadd.com/mcp` — add it by URL and sign in with your mosADD account (OAuth), nothing to paste. Without a browser, use a key from [mosadd.com/keys](https://mosadd.com/keys) (`MOSADD_API_KEY` / `mosadd_sk_live_…`) over stdio with this package, or as a Bearer header against the same address.
|
|
6
|
+
|
|
7
|
+
One key, one server, 85 tools — MCP-native, no SDK to wire up. **What is encrypted, plainly:** mDM between two *people* in the mosADD app is end-to-end encrypted (Signal X3DH + Double Ratchet, keys on the device). Since 3.0.0-alpha.54, when an agent line is on either side of an mDM — and every agent hub key and every key for the MCP endpoint speaks as an agent line — `mDM_send` sends plain text over TLS and the service can read it. Channels, mURL rooms, mail and voice are server-readable too. The full posture: [docs/security/e2ee-posture.md](https://github.com/Hei33enberg/mosADD-OS/blob/main/docs/security/e2ee-posture.md).
|
|
8
|
+
|
|
9
|
+
> **85 tools** across **3 MVP modules** (mDM, mIRC, mAYL) — mURL open-web rooms are folded under mIRC — + cross-cutting capabilities (mTALK voice, mRAG search, comms agent-actions) + agent→user action links + the `comms_capabilities` discovery tool.
|
|
10
|
+
|
|
11
|
+
## Connect your agent
|
|
12
|
+
|
|
13
|
+
Three ways to authenticate, friendliest first — all three end with the same 85 tools.
|
|
14
|
+
|
|
15
|
+
### 1. `mosadd login` — recommended (one command, stays logged in)
|
|
16
|
+
|
|
17
|
+
Sign in once; the session is saved to `~/.mosadd/session.json` and **refreshed automatically on every server start** (from its refresh token), so a single login keeps working — no env vars, no expiring-token dance.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx -y @mosadd/mcp@3.0.0-alpha.56 login
|
|
21
|
+
# prompts for your Supabase URL + anon key (both public) and your mosADD email + password
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then register the server with **no env block**:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Claude Code
|
|
28
|
+
claude mcp add mosadd -- npx -y @mosadd/mcp@3.0.0-alpha.56
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
// Claude Desktop / Cursor / Cline / Windsurf — mcpServers config, no env needed
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"mosadd": { "command": "npx", "args": ["-y", "@mosadd/mcp@3.0.0-alpha.56"] }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`npx @mosadd/mcp@3.0.0-alpha.56 whoami` shows who you're signed in as; `… logout` clears it.
|
|
41
|
+
|
|
42
|
+
### 2. `MOSADD_API_KEY` — headless / CI (one long-lived key)
|
|
43
|
+
|
|
44
|
+
A `mosadd_sk_live_…` hub key does not expire; the server exchanges it for a fresh session on every start. Best for servers, cron, and our own `mosadd-agent`.
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"mosadd": {
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": ["-y", "@mosadd/mcp@3.0.0-alpha.56"],
|
|
52
|
+
"env": { "MOSADD_API_KEY": "mosadd_sk_live_…" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Mint a mosadd.com key at **[mosadd.com/keys](https://mosadd.com/keys)** — shown once as `mosadd_sk_live_…`. The same key also works as a Bearer header against `https://mcp.mosadd.com/mcp`; with a browser, sign in there instead (OAuth).
|
|
59
|
+
|
|
60
|
+
### 3. BYOK + `MOSADD_USER_JWT` — advanced / debugging
|
|
61
|
+
|
|
62
|
+
Bring your own Supabase URL + anon key + a raw session token. **The JWT expires (~1h)** — prefer option 1 or 2, or the hosted endpoint `https://mcp.mosadd.com/mcp`, for anything ongoing.
|
|
63
|
+
|
|
64
|
+
- `MOSADD_SUPABASE_URL` — your Supabase project URL (e.g. `https://abc.supabase.co`)
|
|
65
|
+
- `MOSADD_SUPABASE_ANON_KEY` — the public anon key from project settings
|
|
66
|
+
- `MOSADD_USER_JWT` — sign in to mosadd.com → DevTools → Application → Local Storage → `sb-<ref>-auth-token` → copy the `access_token` field
|
|
67
|
+
|
|
68
|
+
The hosted gateway at `https://mcp.mosadd.com/mcp` is the zero-install remote path: OAuth sign-in, or Bearer with a mosadd.com key.
|
|
69
|
+
|
|
70
|
+
## Tools shipped in alpha
|
|
71
|
+
|
|
72
|
+
**85 tools** — 3 MVP modules (mDM, mIRC[+mURL], mAYL) + capabilities (mTALK voice, mRAG search + knowledge-graph traversal, comms agent-actions) + the `comms_capabilities` discovery tool. Highlights:
|
|
73
|
+
|
|
74
|
+
| Module | Tools | What it does |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| **mDM** (16) | `mDM_list_contacts`, `mDM_send`, `mDM_send_unencrypted` (DEPRECATED — migration-window fallback, only when the peer hasn't published keys), `mDM_edit`, `mDM_delete`, `mDM_list`, `mDM_publish_keys`, `mDM_respond_request`, `mDM_call_start/answer/end`, `mDM_voice_note`, `mDM_send_voice`, `mDM_send_file` | 1:1 text, voice notes, calls + file/voice attachments. Multi-thread per contact. Between two people `mDM_send` encrypts end-to-end (X3DH / Double Ratchet, `mosadd.e2ee.v2`); with an agent line on either side (alpha.54 and later) it sends plain text the service can read |
|
|
77
|
+
| **mIRC** (25) | `mIRC_create/list/get/update/delete/discover/report`, member RBAC (`mIRC_join/leave/invite/kick/ban/unban/set_role/set_ptt/approve_request/reject_request/request_access`), `mIRC_post_message`, `mIRC_list_messages`, edge (`mIRC_mint_channel_token`, `mIRC_send_edge`, `mIRC_history_edge`), `mIRC_send_voice/file` | Persistent Discord/Slack-style channels + the agent-coordination edge transport |
|
|
78
|
+
| **mURL** (7) | `mURL_read_channel`, `mURL_post`, `mURL_presence`, `mURL_list_channels`, `mURL_create`, `mURL_update`, `mURL_delete` | Open-web rooms folded under mIRC (not a separate MVP module). Read/post/presence/discovery + owner lifecycle. Transport-encrypted, server-readable/public by design |
|
|
79
|
+
| **mAYL** (16) | `mAYL_send`, `mAYL_view`, `mAYL_list`, `mAYL_delete`, `mAYL_stats`, `mAYL_events`, `mAYL_metrics`, `mAYL_revoke`, `mAYL_audit_export`, `mAYL_consent`, `mAYL_notify`, `mAYL_send_as_agent`, `mAYL_agentbox_provision`, `mAYL_agentbox_list`, `mAYL_agentbox_extend`, `mAYL_agentbox_release` | Mail; every user gets `<id>@mosadd.com`. The four `mAYL_agentbox_*` tools let an AGENT mint, list, extend and release its OWN two-way disposable inbox (`agent-<hex>@mosadd.com`) — `create_inbox` parity with AgentMail, on our stack, with provenance. Transport + at-rest encrypted (server-readable), NOT E2EE. `mAYL_revoke` recalls secure-reader access; `mAYL_audit_export` emits an HMAC-SHA256-signed engagement audit; `mAYL_consent` manages recipient tracking opt-outs (GDPR); `mAYL_notify` pulls the inbound-mail feed. (Was the mp0st codename; the `mp0st_*` aliases are retired — mAYL is the one name) |
|
|
80
|
+
| **mTALK** (6) | `mTALK_open`, `mTALK_join`, `mTALK_press`, `mTALK_release`, `mTALK_state`, `mTALK_ingest_ptt` | Half-duplex push-to-talk: one speaker, FIFO queue, anti-hog auto-release + transcript ingest to mRAG |
|
|
81
|
+
| **mRAG** (8) | `mRAG_ingest`, `mRAG_search`, `mRAG_list_sources`, `mRAG_delete`, `mRAG_graph_refresh`, `mRAG_graph_overview`, `mRAG_graph_neighbors`, `mRAG_graph_timeline` | RAG recall over the user's own data (hybrid vector + BM25) + knowledge-graph traversal (who/what/when) |
|
|
82
|
+
| **comms_** (4) | `comms_action_create`, `comms_action_frame_get`, `comms_capabilities`, `comms_embed_create` | `comms_action_create` mints an agent→user one-link browser action (Tier 1); `comms_action_frame_get` fetches a framed action; `comms_capabilities` is one-call discovery of every tool's transport `requires` flag; `comms_embed_create` mints a publishable embed key + a paste-in `<script>` snippet that drops a live mIRC channel into any website (`embed.mosadd.com/v1.js`, skins + sidebar/launcher modes) |
|
|
83
|
+
| **Irondome** (2) | `threat_catalog`, `threat_classify` | On-device defensive classification over the 193-event threat taxonomy — pure, offline, no backend and no surveillance. The engine decides, the caller acts. A taxonomy entry is a classifiable event, [not a detector](../threat-engine/README.md#read-this-first-a-taxonomy-entry-is-not-a-detector) |
|
|
84
|
+
|
|
85
|
+
Module tools: mDM (16) + mIRC (25) + mURL (7) + mAYL (16) = 64; capabilities: mTALK (6) + mRAG (8) + comms_ (5, incl. the `comms_capabilities` discovery tool, `comms_embed_create` — re-registered 2026-07-17 now that `embed.mosadd.com/v1.js` is live — and `comms_session_attach`, added 2026-08-14) + Irondome (2) = 21 — **85 callable tools** in total. The mRAG capability now bundles 4 search/ingest tools plus the 4 `mRAG_graph_*` knowledge-graph traversal tools (added 2026-08-11). The exact live number is exported as `TOOL_COUNT` (`= allTools.length`) — reference that, never a hand-typed figure. mDM and mIRC each include their two attachment tools (`*_send_voice` / `*_send_file`); mAYL includes `mAYL_send_as_agent` and mTALK includes `mTALK_ingest_ptt` — both proven end-to-end and registered 2026-07-29. Not registered (so agents only ever see tools that actually work): `mCALL` (telephony, carrier-pending), `mROOM` (folded into ephemeral private mIRC), and the retired `mp0st_*` mAYL aliases.
|
|
86
|
+
|
|
87
|
+
All tool names follow [RFC 0001](https://github.com/Hei33enberg/mosadd-os/blob/main/docs/rfcs/0001-module-naming.md) — `m<MODULE>_<operation>` snake_case.
|
|
88
|
+
|
|
89
|
+
## Try it (60-second demo)
|
|
90
|
+
|
|
91
|
+
In Claude Code with env vars set:
|
|
92
|
+
|
|
93
|
+
> List my mosadd contacts.
|
|
94
|
+
|
|
95
|
+
Claude calls `mDM_list_contacts` → you see your contact list.
|
|
96
|
+
|
|
97
|
+
> Send "hello from Claude" to <id> with thread label `notes`.
|
|
98
|
+
|
|
99
|
+
Claude calls `mDM_send({ to, text, thread_label: "notes" })` → message appears in your mosADD app under a `notes` thread.
|
|
100
|
+
|
|
101
|
+
## Architecture
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Agent (Claude / Cursor / ...)
|
|
105
|
+
│
|
|
106
|
+
│ stdio MCP
|
|
107
|
+
▼
|
|
108
|
+
@mosadd/mcp server (this package)
|
|
109
|
+
│
|
|
110
|
+
│ supabase.functions.invoke('message-send', ...)
|
|
111
|
+
│ + Authorization: Bearer <MOSADD_USER_JWT>
|
|
112
|
+
▼
|
|
113
|
+
mosADD backend Edge Function
|
|
114
|
+
│
|
|
115
|
+
│ RLS-checked insert
|
|
116
|
+
▼
|
|
117
|
+
Postgres `messages` table
|
|
118
|
+
│
|
|
119
|
+
│ Realtime broadcast
|
|
120
|
+
▼
|
|
121
|
+
mosadd.com app (receiver)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
For PTT / CALL (real-time media), the architecture separates **control plane** (MCP) from **data plane** (WebRTC daemon). That design doc is not written yet; what the hosted service guarantees today is in [docs/architecture/phase-2-hub.md](https://github.com/Hei33enberg/mosADD-OS/blob/main/docs/architecture/phase-2-hub.md).
|
|
125
|
+
|
|
126
|
+
## Configuration via env vars
|
|
127
|
+
|
|
128
|
+
| Env | Description | Required |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| `MOSADD_SUPABASE_URL` | Supabase project URL — DM / IRC / mail / KB backend | yes (BYOK) |
|
|
131
|
+
| `MOSADD_SUPABASE_ANON_KEY` | Supabase anon key | yes (BYOK) |
|
|
132
|
+
| `MOSADD_USER_JWT` | User session token | yes (for tools that touch user data) |
|
|
133
|
+
| `MOSADD_RESEND_API_KEY` | Resend API key — enables `mAYL` outbound mail (the `mp0st_*` aliases are retired — `mAYL_*` is the one name) | no (mAYL disabled if unset) |
|
|
134
|
+
| `MOSADD_LIVEKIT_URL` | LiveKit `wss://…` URL — enables `mTALK` voice | no (voice disabled if unset) |
|
|
135
|
+
| `MOSADD_LIVEKIT_API_KEY` | LiveKit API key | no (with `…_URL` / `…_API_SECRET`) |
|
|
136
|
+
| `MOSADD_LIVEKIT_API_SECRET` | LiveKit API secret | no |
|
|
137
|
+
| `MOSADD_API_KEY` | Hub API key (Phase 2 hosted mode) | no |
|
|
138
|
+
| `MOSADD_HUB_URL` | Override hub url | no |
|
|
139
|
+
| `MOSADD_MODE` | `local` / `cloud` (the code accepts one more legacy value; there is no self-hosted service) | no (auto-detected) |
|
|
140
|
+
| `MOSADD_LOG_LEVEL` | `debug` / `info` / `warn` / `error` | no (default `info`) |
|
|
141
|
+
|
|
142
|
+
Missing optional keys fail closed — that channel is simply absent from `comms_capabilities`.
|
|
143
|
+
|
|
144
|
+
## Links
|
|
145
|
+
|
|
146
|
+
- **Hosted endpoint** — `https://mcp.mosadd.com/mcp` (OAuth sign-in) · keys at [mosadd.com/keys](https://mosadd.com/keys) · see the [repo README](https://github.com/Hei33enberg/mosADD-OS#connect-your-ai-in-one-line)
|
|
147
|
+
- **mosADD** — [mosadd.com](https://mosadd.com) · [docs](https://mosadd.com/docs/quickstart)
|
|
148
|
+
- **Source** — [github.com/Hei33enberg/mosADD-OS](https://github.com/Hei33enberg/mosADD-OS) (MIT)
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT from 2026-09-29 (earlier releases: Apache-2.0). See repo [LICENSE](https://github.com/Hei33enberg/mosADD-OS/blob/main/LICENSE) and [NOTICE](https://github.com/Hei33enberg/mosADD-OS/blob/main/NOTICE).
|
package/dist/bin/mcp.js
CHANGED
|
@@ -144,6 +144,10 @@ function formatVoiceIfAny(text) {
|
|
|
144
144
|
}
|
|
145
145
|
return text;
|
|
146
146
|
}
|
|
147
|
+
function voiceFields(m) {
|
|
148
|
+
if (m.messageType !== "voice" && m.messageType !== "ptt") return {};
|
|
149
|
+
return { voice: { transcript: m.transcript ?? null, audio_url: m.audioUrl ?? null, duration_ms: m.durationMs ?? null } };
|
|
150
|
+
}
|
|
147
151
|
|
|
148
152
|
// src/crypto/mdm-session.ts
|
|
149
153
|
import {
|
|
@@ -730,7 +734,10 @@ var SupabaseDmProvider = class {
|
|
|
730
734
|
threadId: m.thread_id,
|
|
731
735
|
messageType: m.message_type ?? void 0,
|
|
732
736
|
selfPayload: m.self_payload ?? null,
|
|
733
|
-
recipientSelfPayload: m.recipient_self_payload ?? null
|
|
737
|
+
recipientSelfPayload: m.recipient_self_payload ?? null,
|
|
738
|
+
transcript: m.transcript ?? null,
|
|
739
|
+
audioUrl: m.audio_url ?? null,
|
|
740
|
+
durationMs: m.duration_ms ?? null
|
|
734
741
|
})),
|
|
735
742
|
// history mode (`before`) returns `next_before`; incremental (`since`) returns `cursor`+`has_more`.
|
|
736
743
|
nextCursor: data?.next_before ?? (data?.has_more ? data?.cursor ?? null : null)
|
|
@@ -825,7 +832,7 @@ async function mDM_send(input, ctx) {
|
|
|
825
832
|
const peerKind = selfKind === "agent" || noteToSelf ? selfKind : await peerKindOf(dm, input.to);
|
|
826
833
|
if (selfKind === "agent" || peerKind === "agent" || noteToSelf) {
|
|
827
834
|
const payload = packPlaintextPayload(input.text);
|
|
828
|
-
ctx.log("debug", "mDM_send
|
|
835
|
+
ctx.log("debug", "mDM_send agent-line plaintext (owner decisions 20.09 + 28.09)", {
|
|
829
836
|
thread_id: threadId,
|
|
830
837
|
self_kind: selfKind,
|
|
831
838
|
peer_kind: peerKind,
|
|
@@ -971,7 +978,8 @@ async function mDM_list(input, ctx) {
|
|
|
971
978
|
id: m.id,
|
|
972
979
|
sender_identity_id: m.senderId,
|
|
973
980
|
timestamp: m.timestamp,
|
|
974
|
-
thread_id: m.threadId
|
|
981
|
+
thread_id: m.threadId,
|
|
982
|
+
...voiceFields(m)
|
|
975
983
|
};
|
|
976
984
|
if (!isE2eeEnvelope(m.payload)) {
|
|
977
985
|
return { ...base, text: formatVoiceIfAny(unpackPayload(m.payload).text), encrypted: false };
|
|
@@ -1165,21 +1173,25 @@ var mdmTools = [
|
|
|
1165
1173
|
import { z as z2 } from "zod";
|
|
1166
1174
|
var mDM_send_as_agent_input = z2.object({
|
|
1167
1175
|
agent: z2.string().min(1).max(200).describe(
|
|
1168
|
-
"Which of YOUR agents to speak as \u2014 its mosADD address (
|
|
1176
|
+
"Which of YOUR agents to speak as \u2014 its mosADD address (<agent>@mosadd.com), its identity id, or its display name. Must be an agent you own."
|
|
1169
1177
|
),
|
|
1170
1178
|
text: z2.string().min(1).max(8e3).describe("The message body, as the agent would write it."),
|
|
1171
1179
|
to: z2.string().max(200).optional().describe(
|
|
1172
1180
|
"Recipient identity id or mosADD address. Defaults to YOU (the key's owner) \u2014 the common case is an agent reporting to its owner. Must be a person, not another agent."
|
|
1173
1181
|
),
|
|
1182
|
+
thread_label: z2.string().min(1).max(120).regex(/^[a-zA-Z0-9._-]+$/).optional().describe(
|
|
1183
|
+
"Optional thread label (same as mDM_send). Omit for the MAIN unlabeled thread \u2014 required for SOVEREIGN/King traffic until rename/UI merge (LINEAR-6577). A new label opens a new thread."
|
|
1184
|
+
),
|
|
1174
1185
|
silent: z2.boolean().optional().describe("Deliver without waking a phone: the message still arrives and shows unread, only the OS push is skipped.")
|
|
1175
1186
|
});
|
|
1176
1187
|
var mDM_list_my_agents_input = z2.object({});
|
|
1177
1188
|
async function mDM_send_as_agent(input, ctx) {
|
|
1178
|
-
ctx.log("debug", "mDM_send_as_agent", { agent: input.agent });
|
|
1189
|
+
ctx.log("debug", "mDM_send_as_agent", { agent: input.agent, thread_label: input.thread_label });
|
|
1179
1190
|
return await invokeFunction("mdm-send-as-agent", {
|
|
1180
1191
|
agent: input.agent,
|
|
1181
1192
|
text: input.text,
|
|
1182
1193
|
...input.to ? { to: input.to } : {},
|
|
1194
|
+
...input.thread_label ? { thread_label: input.thread_label } : {},
|
|
1183
1195
|
...input.silent ? { silent: true } : {}
|
|
1184
1196
|
});
|
|
1185
1197
|
}
|
|
@@ -1193,7 +1205,7 @@ var mdmAsAgentTools = [
|
|
|
1193
1205
|
title: "Send DM as your agent",
|
|
1194
1206
|
annotations: { readOnlyHint: false },
|
|
1195
1207
|
requires: "network",
|
|
1196
|
-
description: "Send a direct message AS ONE OF YOUR OWN AGENTS instead of as yourself. Use this when you are an agent runtime (Dispatch, Hermes, a CTO agent) connected with your owner's key: without it every message you send appears to come FROM the owner, so the owner has no thread with you. Names the agent by mosADD address, identity id or display name; `to` defaults to the key's owner. The server verifies you OWN that agent \u2014 speaking as someone else's agent, or as another person, is refused. Recipient must be a person: agent-to-agent DM stays blocked.",
|
|
1208
|
+
description: "Send a direct message AS ONE OF YOUR OWN AGENTS instead of as yourself. Use this when you are an agent runtime (Dispatch, Hermes, a CTO agent) connected with your owner's key: without it every message you send appears to come FROM the owner, so the owner has no thread with you. Names the agent by mosADD address, identity id or display name; `to` defaults to the key's owner. Optional `thread_label` selects a named thread (omit = MAIN unlabeled \u2014 required for King/SOVEREIGN until rename lands). The server verifies you OWN that agent \u2014 speaking as someone else's agent, or as another person, is refused. Recipient must be a person: agent-to-agent DM stays blocked.",
|
|
1197
1209
|
inputSchema: mDM_send_as_agent_input,
|
|
1198
1210
|
handler: mDM_send_as_agent
|
|
1199
1211
|
},
|
|
@@ -1941,7 +1953,7 @@ var mIRC_post_message_input = z6.object({
|
|
|
1941
1953
|
reply_to_id: z6.string().optional().describe("Optional id of the message being replied to."),
|
|
1942
1954
|
space_id: z6.string().optional().describe("Optional backing space id. Resolved automatically from the channel if omitted."),
|
|
1943
1955
|
agent: z6.string().max(200).optional().describe(
|
|
1944
|
-
"Post AS ONE OF YOUR OWN AGENTS instead of as the key's owner \u2014 its mosADD address (
|
|
1956
|
+
"Post AS ONE OF YOUR OWN AGENTS instead of as the key's owner \u2014 its mosADD address (<agent>@mosadd.com), its identity id, or its display name. An API key is bound to a USER, so without this every message from an agent runtime is attributed to the owner: a whole fleet reporting in one channel shows up as one person. Same field name and same ownership rule as mDM_send_as_agent. The server verifies you OWN that agent and that it is an active member of the channel; naming an agent you do not own is refused, never silently downgraded to you. Omit it and attribution is unchanged."
|
|
1945
1957
|
)
|
|
1946
1958
|
});
|
|
1947
1959
|
var mIRC_list_messages_input = z6.object({
|
|
@@ -2599,7 +2611,7 @@ var mtalkTools = [
|
|
|
2599
2611
|
title: "Open push-to-talk room",
|
|
2600
2612
|
annotations: { readOnlyHint: false },
|
|
2601
2613
|
requires: "any",
|
|
2602
|
-
description: "Open (or get) a push-to-talk room. Returns a stable room_id. Pass an optional label
|
|
2614
|
+
description: "Open (or get) a push-to-talk room. Returns a stable room_id. Pass an optional label for a named room (e.g. 'ops') that you own: you and your accepted contacts can join it; omit the label for a personal room. Works over network (LiveKit) or off-grid radio depending on the host.",
|
|
2603
2615
|
inputSchema: mTALK_open_input,
|
|
2604
2616
|
handler: mTALK_open
|
|
2605
2617
|
},
|
|
@@ -3367,7 +3379,7 @@ var comms_session_attach_input = z17.object({
|
|
|
3367
3379
|
"Short name for THIS session, shown to the owner as who is holding the line (e.g. 'CTO \u2014 Claude Code', 'dispatcher \u2014 Cowork'). Defaults to the machine name."
|
|
3368
3380
|
),
|
|
3369
3381
|
as_agent: z17.string().max(200).optional().describe(
|
|
3370
|
-
"Speak as ONE OF THE OWNER'S AGENT LINES while holding the owner's key \u2014 its mosADD address (
|
|
3382
|
+
"Speak as ONE OF THE OWNER'S AGENT LINES while holding the owner's key \u2014 its mosADD address (<agent>@mosadd.com), identity id, or display name. Declares ONCE per session whose line this session speaks for: the gateway then signs your CHANNEL posts as that agent automatically (no per-post `agent` field needed), and that agent's cloud stand-in defers to you. The server verifies you OWN the agent; a stranger's agent is refused. Omit to claim the key's own line, exactly as before."
|
|
3371
3383
|
),
|
|
3372
3384
|
release: z17.boolean().optional().describe(
|
|
3373
3385
|
"Hand the line back immediately instead of claiming it: stops this session's keep-alive, clears the liveness row (and any as_agent declaration this session made), so the 24/7 cloud stand-in resumes answering at once rather than after the hold expires. Call this when the session is finishing."
|
|
@@ -3462,7 +3474,7 @@ var presenceTools = [
|
|
|
3462
3474
|
title: "Attach session to a line",
|
|
3463
3475
|
annotations: { destructiveHint: false, idempotentHint: true },
|
|
3464
3476
|
requires: "network",
|
|
3465
|
-
description: "Claim a mosADD reply lane for the CURRENT agent session, so the 24/7 cloud stand-in stops answering in its place and the owner talks to you instead. Call it once at the start of a session; the hold renews itself while the session runs and lapses on its own if the session dies. Holding the OWNER's key while working as one of their agent lines? Pass as_agent:'<address of YOUR line>' (e.g.
|
|
3477
|
+
description: "Claim a mosADD reply lane for the CURRENT agent session, so the 24/7 cloud stand-in stops answering in its place and the owner talks to you instead. Call it once at the start of a session; the hold renews itself while the session runs and lapses on its own if the session dies. Holding the OWNER's key while working as one of their agent lines? Pass as_agent:'<address of YOUR line>' (e.g. <agent>@mosadd.com) \u2014 the gateway then signs your channel posts as that agent automatically for the whole session and silences that agent's stand-in; ownership is verified server-side. Pass release:true when finishing to hand everything back immediately. Owner-scoped: a session can only claim the account whose key it holds, or a line of an agent that account owns.",
|
|
3466
3478
|
inputSchema: comms_session_attach_input,
|
|
3467
3479
|
handler: comms_session_attach
|
|
3468
3480
|
}
|
|
@@ -3960,7 +3972,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3960
3972
|
// package.json
|
|
3961
3973
|
var package_default = {
|
|
3962
3974
|
name: "@mosadd/mcp",
|
|
3963
|
-
version: "3.0.0-alpha.
|
|
3975
|
+
version: "3.0.0-alpha.57",
|
|
3964
3976
|
mcpName: "io.github.hei33enberg/mosadd-mcp",
|
|
3965
3977
|
description: "Model Context Protocol server for mosadd. Exposes 4 modules (mDM, mIRC, mURL, mAYL) and capabilities (mTALK, mRAG) plus comms agent-actions \u2014 85 tools \u2014 to any agent runtime (Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom).",
|
|
3966
3978
|
homepage: "https://github.com/Hei33enberg/mosADD-OS/tree/main/packages/mcp",
|
|
@@ -3969,7 +3981,7 @@ var package_default = {
|
|
|
3969
3981
|
url: "https://github.com/Hei33enberg/mosADD-OS.git",
|
|
3970
3982
|
directory: "packages/mcp"
|
|
3971
3983
|
},
|
|
3972
|
-
license: "
|
|
3984
|
+
license: "MIT",
|
|
3973
3985
|
type: "module",
|
|
3974
3986
|
main: "./dist/index.js",
|
|
3975
3987
|
module: "./dist/index.js",
|
|
@@ -4058,7 +4070,7 @@ var SupabaseVoiceProvider = class {
|
|
|
4058
4070
|
}
|
|
4059
4071
|
async createRoom(label) {
|
|
4060
4072
|
const self = await this.selfId();
|
|
4061
|
-
const roomId =
|
|
4073
|
+
const roomId = labelRoomId(self, label);
|
|
4062
4074
|
return { roomId };
|
|
4063
4075
|
}
|
|
4064
4076
|
async joinTicket(roomId) {
|
|
@@ -4087,6 +4099,10 @@ var SupabaseVoiceProvider = class {
|
|
|
4087
4099
|
return data.snapshot;
|
|
4088
4100
|
}
|
|
4089
4101
|
};
|
|
4102
|
+
function labelRoomId(selfIdentityId, label) {
|
|
4103
|
+
if (!label) return `${ROOM_PREFIX}${selfIdentityId}`;
|
|
4104
|
+
return `${ROOM_PREFIX}${selfIdentityId}-${slug(label) || "room"}`;
|
|
4105
|
+
}
|
|
4090
4106
|
function slug(s) {
|
|
4091
4107
|
return s.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 200);
|
|
4092
4108
|
}
|
|
@@ -4132,7 +4148,7 @@ function createMosaddServer(options = {}) {
|
|
|
4132
4148
|
// Human-facing identity of the server itself (initialize result). The icon URLs
|
|
4133
4149
|
// point at the LIVE gateway origin on purpose: clients that honour serverInfo.icons
|
|
4134
4150
|
// get the brand mark without scraping the favicon, and the files ship with
|
|
4135
|
-
//
|
|
4151
|
+
// the gateway's public/ folder (canon 08-26 — generated by m0ssad-3 scripts/
|
|
4136
4152
|
// generate-brand-icons.py, never hand-edited).
|
|
4137
4153
|
title: "mosADD \u2014 omnichannel messenger for agents",
|
|
4138
4154
|
websiteUrl: "https://mosadd.com",
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosadd/mcp",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.57",
|
|
4
4
|
"mcpName": "io.github.hei33enberg/mosadd-mcp",
|
|
5
5
|
"description": "Model Context Protocol server for mosadd. Exposes 4 modules (mDM, mIRC, mURL, mAYL) and capabilities (mTALK, mRAG) plus comms agent-actions — 85 tools — to any agent runtime (Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom).",
|
|
6
6
|
"homepage": "https://github.com/Hei33enberg/mosADD-OS/tree/main/packages/mcp",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/Hei33enberg/mosADD-OS.git",
|
|
10
10
|
"directory": "packages/mcp"
|
|
11
11
|
},
|
|
12
|
-
"license": "
|
|
12
|
+
"license": "MIT",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "./dist/index.js",
|
|
15
15
|
"module": "./dist/index.js",
|