@mosadd/mcp 3.0.0-alpha.3 → 3.0.0-alpha.5
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 +126 -116
- package/dist/bin/mcp.js +1 -1
- package/dist/{chunk-HD5RLE5K.js → chunk-4C36JDTJ.js} +734 -91
- package/dist/index.d.ts +26 -3
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/src/__tests__/golden-path.test.ts +137 -132
- package/src/__tests__/integration.test.ts +178 -175
- package/src/__tests__/mdm-e2ee.test.ts +178 -149
- package/src/__tests__/mtalk.test.ts +122 -0
- package/src/__tests__/server.test.ts +67 -67
- package/src/bin/login.ts +138 -138
- package/src/bin/mcp.ts +97 -97
- package/src/config.ts +66 -66
- package/src/crypto/mdm-session.ts +403 -378
- package/src/index.ts +17 -17
- package/src/observability/sentry.ts +79 -79
- package/src/providers/memory-voice.ts +79 -0
- package/src/providers/supabase-dm.ts +117 -117
- package/src/providers/supabase-voice.ts +91 -0
- package/src/providers/supabase.ts +96 -96
- package/src/server.ts +105 -103
- package/src/tools/capabilities.ts +68 -68
- package/src/tools/index.ts +51 -37
- package/src/tools/knowledge.ts +132 -0
- package/src/tools/mail.ts +157 -89
- package/src/tools/mcall.ts +216 -0
- package/src/tools/mdm-voice.ts +206 -0
- package/src/tools/mdm.ts +448 -379
- package/src/tools/mirc-edge.ts +190 -0
- package/src/tools/mirc-members.ts +177 -177
- package/src/tools/mirc-messages.ts +156 -0
- package/src/tools/mirc.ts +170 -170
- package/src/tools/mroom-messages.ts +142 -142
- package/src/tools/mroom.ts +221 -189
- package/src/tools/mtalk.ts +121 -0
- package/src/types.ts +85 -79
- package/src/voice/floor.ts +132 -0
package/README.md
CHANGED
|
@@ -1,116 +1,126 @@
|
|
|
1
|
-
# @mosadd/mcp
|
|
2
|
-
|
|
3
|
-
MCP server for [mosadd](https://mosadd.dev) — exposes the OS modules (m\*) as Model Context Protocol tools so any agent runtime can talk to mosadd: Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom.
|
|
4
|
-
|
|
5
|
-
> **3.0.0-alpha** —
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
### Claude Code
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
claude mcp add mosadd npx
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Cursor
|
|
16
|
-
|
|
17
|
-
`~/.cursor/mcp.json`:
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"mcpServers": {
|
|
22
|
-
"mosadd": {
|
|
23
|
-
"command": "npx",
|
|
24
|
-
"args": ["-y", "@mosadd/mcp"],
|
|
25
|
-
"env": {
|
|
26
|
-
"MOSADD_SUPABASE_URL": "https://<your-project>.supabase.co",
|
|
27
|
-
"MOSADD_SUPABASE_ANON_KEY": "<anon key>",
|
|
28
|
-
"MOSADD_USER_JWT": "<your session JWT>"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Standalone
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
MOSADD_SUPABASE_URL=... MOSADD_SUPABASE_ANON_KEY=... MOSADD_USER_JWT=... npx @mosadd/mcp
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## BYOK — get your env values
|
|
42
|
-
|
|
43
|
-
While the hosted gateway is in development, the alpha runs in **local BYOK mode** — you supply your own Supabase credentials to talk to your own
|
|
44
|
-
|
|
45
|
-
- `MOSADD_SUPABASE_URL` — your Supabase project URL (e.g. `https://abc.supabase.co`)
|
|
46
|
-
- `MOSADD_SUPABASE_ANON_KEY` — the public anon key from project settings
|
|
47
|
-
- `MOSADD_USER_JWT` — a Supabase session token for your mosadd user. Get it from the browser:
|
|
48
|
-
1. Sign in to mosadd.com
|
|
49
|
-
2. Open DevTools → Application → Local Storage → `sb-<ref>-auth-token`
|
|
50
|
-
3. Copy the `access_token` field
|
|
51
|
-
|
|
52
|
-
In Phase 2, run `mosadd login` to OAuth into hub.mosadd.com — no JWT-juggling required.
|
|
53
|
-
|
|
54
|
-
## Tools shipped in alpha
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
|
59
|
-
|
|
60
|
-
| `mDM_list` |
|
|
61
|
-
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Claude
|
|
72
|
-
|
|
73
|
-
>
|
|
74
|
-
|
|
75
|
-
Claude calls `
|
|
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
|
-
|
|
1
|
+
# @mosadd/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for [mosadd](https://mosadd.dev) — exposes the OS modules (m\*) as Model Context Protocol tools so any agent runtime can talk to mosadd: Claude Code, Cursor, Windsurf, Cline, ChatGPT Apps, Lovable, Bolt, Goose, Manus, custom.
|
|
4
|
+
|
|
5
|
+
> **3.0.0-alpha.4** — **52 live tools across 6 live modules** (mDM incl. voice, mIRC, mROOM, mAIL, mTALK, mRAG) + the `comms_capabilities` discovery tool, wired to the mosadd backend (BYOK) as a strangler-fig step. Phase 2 routes through the hosted gateway at `mcp.mosadd.com` with the 167-event radar in front.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
### Claude Code
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
claude mcp add mosadd -- npx -y @mosadd/mcp@alpha
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Cursor
|
|
16
|
+
|
|
17
|
+
`~/.cursor/mcp.json`:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"mosadd": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "@mosadd/mcp@alpha"],
|
|
25
|
+
"env": {
|
|
26
|
+
"MOSADD_SUPABASE_URL": "https://<your-project>.supabase.co",
|
|
27
|
+
"MOSADD_SUPABASE_ANON_KEY": "<anon key>",
|
|
28
|
+
"MOSADD_USER_JWT": "<your session JWT>"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Standalone
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
MOSADD_SUPABASE_URL=... MOSADD_SUPABASE_ANON_KEY=... MOSADD_USER_JWT=... npx @mosadd/mcp@alpha
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## BYOK — get your env values
|
|
42
|
+
|
|
43
|
+
While the hosted gateway is in development, the alpha runs in **local BYOK mode** — you supply your own Supabase credentials to talk to your own mosadd backend.
|
|
44
|
+
|
|
45
|
+
- `MOSADD_SUPABASE_URL` — your Supabase project URL (e.g. `https://abc.supabase.co`)
|
|
46
|
+
- `MOSADD_SUPABASE_ANON_KEY` — the public anon key from project settings
|
|
47
|
+
- `MOSADD_USER_JWT` — a Supabase session token for your mosadd user. Get it from the browser:
|
|
48
|
+
1. Sign in to mosadd.com
|
|
49
|
+
2. Open DevTools → Application → Local Storage → `sb-<ref>-auth-token`
|
|
50
|
+
3. Copy the `access_token` field
|
|
51
|
+
|
|
52
|
+
In Phase 2, run `mosadd login` to OAuth into hub.mosadd.com — no JWT-juggling required.
|
|
53
|
+
|
|
54
|
+
## Tools shipped in alpha
|
|
55
|
+
|
|
56
|
+
**52 live tools across 6 live modules** (mDM, mIRC, mROOM, mAIL, mTALK, mRAG) + the `comms_capabilities` discovery tool. Highlights per module:
|
|
57
|
+
|
|
58
|
+
| Module | Tools | What it does |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| **mDM** (12) | `mDM_list_contacts`, `mDM_send`, `mDM_send_unencrypted`, `mDM_edit`, `mDM_delete`, `mDM_list`, `mDM_publish_keys`, `mDM_respond_request` + 4 voice ops | 1:1 text + voice. Multi-thread per contact, X3DH / Double-Ratchet E2EE on `mDM_send` |
|
|
61
|
+
| **mIRC** (20) | `mIRC_create/list/get/update/delete`, member RBAC ops, `mIRC_post_message`, `mIRC_list_messages` + admin | Persistent Discord/Slack-style channels |
|
|
62
|
+
| **mROOM** (9) | `mROOM_create`, **`mROOM_create_guest_link`**, `mROOM_join/leave/close/list`, `mROOM_send_message`, `mROOM_list_messages` | Ephemeral rooms + single-call no-account guest links |
|
|
63
|
+
| **mTALK** (5) | `mTALK_open`, `mTALK_join`, `mTALK_press`, `mTALK_release`, `mTALK_state` | Half-duplex push-to-talk: one speaker, FIFO queue, anti-hog auto-release |
|
|
64
|
+
| **mAIL** (4) | `mAIL_send`, `mAIL_view`, `mAIL_list`, `mAIL_delete` | Mail; every user gets `<id>@mosadd.com` |
|
|
65
|
+
| **mRAG** (2) | `mRAG_ingest`, `mRAG_search` | RAG recall over the user's own data (hybrid vector + BM25) |
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
## Try it (60-second demo)
|
|
70
|
+
|
|
71
|
+
In Claude Code with env vars set:
|
|
72
|
+
|
|
73
|
+
> List my mosadd contacts.
|
|
74
|
+
|
|
75
|
+
Claude calls `mDM_list_contacts` → you see your contact list.
|
|
76
|
+
|
|
77
|
+
> Send "hello from Claude" to <id> with thread label `notes`.
|
|
78
|
+
|
|
79
|
+
Claude calls `mDM_send({ to, text, thread_label: "notes" })` → message appears in your mosadd app under a `notes` thread.
|
|
80
|
+
|
|
81
|
+
## Architecture
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Agent (Claude / Cursor / ...)
|
|
85
|
+
│
|
|
86
|
+
│ stdio MCP
|
|
87
|
+
▼
|
|
88
|
+
@mosadd/mcp server (this package)
|
|
89
|
+
│
|
|
90
|
+
│ supabase.functions.invoke('message-send', ...)
|
|
91
|
+
│ + Authorization: Bearer <MOSADD_USER_JWT>
|
|
92
|
+
▼
|
|
93
|
+
mosadd backend Edge Function
|
|
94
|
+
│
|
|
95
|
+
│ RLS-checked insert
|
|
96
|
+
▼
|
|
97
|
+
Postgres `messages` table
|
|
98
|
+
│
|
|
99
|
+
│ Realtime broadcast
|
|
100
|
+
▼
|
|
101
|
+
mosadd.com app (receiver)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
For PTT / CALL / ROOM (real-time media), the architecture separates **control plane** (MCP) from **data plane** (WebRTC daemon). See [docs/architecture/control-data-plane.md](https://github.com/Hei33enberg/mosadd-os/blob/main/docs/architecture/control-data-plane.md) when it lands.
|
|
105
|
+
|
|
106
|
+
## Configuration via env vars
|
|
107
|
+
|
|
108
|
+
| Env | Description | Required |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `MOSADD_SUPABASE_URL` | Supabase project URL — DM / IRC / ROOM / KB backend | yes (BYOK) |
|
|
111
|
+
| `MOSADD_SUPABASE_ANON_KEY` | Supabase anon key | yes (BYOK) |
|
|
112
|
+
| `MOSADD_USER_JWT` | User session token | yes (for tools that touch user data) |
|
|
113
|
+
| `MOSADD_RESEND_API_KEY` | Resend API key — enables `mAIL` outbound | no (mAIL disabled if unset) |
|
|
114
|
+
| `MOSADD_LIVEKIT_URL` | LiveKit `wss://…` URL — enables `mTALK` / `mROOM` voice | no (voice disabled if unset) |
|
|
115
|
+
| `MOSADD_LIVEKIT_API_KEY` | LiveKit API key | no (with `…_URL` / `…_API_SECRET`) |
|
|
116
|
+
| `MOSADD_LIVEKIT_API_SECRET` | LiveKit API secret | no |
|
|
117
|
+
| `MOSADD_API_KEY` | Hub API key (Phase 2 hosted mode) | no |
|
|
118
|
+
| `MOSADD_HUB_URL` | Override hub url | no |
|
|
119
|
+
| `MOSADD_MODE` | `local` / `cloud` / `self-host` | no (auto-detected) |
|
|
120
|
+
| `MOSADD_LOG_LEVEL` | `debug` / `info` / `warn` / `error` | no (default `info`) |
|
|
121
|
+
|
|
122
|
+
Missing optional keys fail closed — that channel is simply absent from `comms_capabilities`.
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
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).
|