@mosadd/mcp 3.0.0-alpha.15 → 3.0.0-alpha.17

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 ADDED
@@ -0,0 +1,71 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@mosadd/mcp` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project follows the `3.0.0-alpha.N` pre-release line until the hosted
7
+ gateway (Phase 2) ships.
8
+
9
+ ## [3.0.0-alpha.17] — 2026-06-18
10
+
11
+ ### Added
12
+ - **Action Links — screen share.** `comms_action_create` gains a `screen_share` action
13
+ type, and a new `comms_action_frame_get` tool lets the creating agent read frames of the
14
+ recipient's shared screen (consent-gated, browser-sandbox only). Turns Action Links into
15
+ "remote-desktop-lite" — the agent sees what the human chooses to share.
16
+
17
+ ### Changed
18
+ - **Durable `mosadd login`.** The saved session (`~/.mosadd/session.json`) is now refreshed
19
+ from its refresh token at server boot, so a single `mosadd login` keeps working across
20
+ restarts — no more re-login when the access token expires.
21
+ - Onboarding README restructured (recommended auth path — `mosadd login` — first; hub API
22
+ key second; DevTools JWT demoted), and the 61→70 / `mosadd.dev`→`mosadd.com` reconciliation
23
+ (first shipped on the published package with this release).
24
+
25
+ ## [3.0.0-alpha.16] — 2026-06-17
26
+
27
+ ### Fixed
28
+ - `mAIL_view` now calls the `mp0st-get` Edge Function (read a message by id,
29
+ owner-scoped) instead of `mp0st-view` (the tracking-pixel endpoint, which
30
+ returned "Missing tracking ID"). ([LINEAR-2917])
31
+ - CI publish drops `--provenance` — npm returned 422 because the source repo
32
+ (`mosadd-os`) is private, so provenance attestation is not available.
33
+
34
+ ### Added (cumulative since alpha.4 — tool count 61 → 70)
35
+ - **Action links (Tier 1):** `comms_action_create` mints a one-link browser
36
+ action an agent can hand to a human (run-with-consent in the mosadd sandbox).
37
+ - **mAIL provenance:** `mAIL_send_as_agent` stamps agent/human provenance on the
38
+ message so the recipient sees who actually sent it.
39
+ - **File & voice attachments:** `mDM_send_voice` / `mDM_send_file`,
40
+ `mROOM_send_voice` / `mROOM_send_file`, `mIRC_send_voice` / `mIRC_send_file`
41
+ (reuse the existing `chat-files` bucket — no new transport).
42
+ - **mTALK → RAG:** `mTALK_ingest_ptt` feeds push-to-talk audio into the RAG index
43
+ (opt-in, gated server-side).
44
+ - **mROOM:** `mROOM_create_guest_link` (single-call, no-account guest links) and
45
+ `mROOM_voice_join`.
46
+ - **mIRC edge transport:** `mIRC_mint_channel_token`, `mIRC_send_edge`,
47
+ `mIRC_history_edge` — the low-latency path the agent-coordination skill rides.
48
+
49
+ ### Changed
50
+ - README, `package.json`, and the plugin `marketplace.json` reconciled to the
51
+ current surface: **70 tools across 6 modules** + `comms_capabilities`
52
+ discovery (71 callable), version `alpha.16`, and `mosadd.dev` → `mosadd.com`
53
+ (the dev surface was consolidated into the main site). ([LINEAR-3391])
54
+ - `mCALL` (telephony, carrier-pending) and `mURL` (brand/consumer surface)
55
+ remain **unregistered** in `tools/index.ts` — an agent only ever discovers
56
+ tools that actually work.
57
+
58
+ ## [3.0.0-alpha.4]
59
+
60
+ ### Added
61
+ - Initial public alpha: **61 tools across 6 live modules** — mDM (incl. voice),
62
+ mIRC, mROOM, mAIL, mTALK, mRAG — plus the `comms_capabilities` discovery tool.
63
+ - BYOK mode: the server talks to your own mosadd Supabase backend via
64
+ `MOSADD_SUPABASE_URL` / `MOSADD_SUPABASE_ANON_KEY` / `MOSADD_USER_JWT`.
65
+ - Apache-2.0 license; tool names follow [RFC 0001] (`m<MODULE>_<operation>`).
66
+
67
+ [3.0.0-alpha.16]: https://github.com/Hei33enberg/mosadd-os/tree/main/packages/mcp
68
+ [3.0.0-alpha.4]: https://github.com/Hei33enberg/mosadd-os/tree/main/packages/mcp
69
+ [LINEAR-2917]: https://linear.app/ip-ra/issue/LINEAR-2917
70
+ [LINEAR-3391]: https://linear.app/ip-ra/issue/LINEAR-3391
71
+ [RFC 0001]: https://github.com/Hei33enberg/mosadd-os/blob/main/docs/rfcs/0001-module-naming.md
package/README.md CHANGED
@@ -1,20 +1,43 @@
1
1
  # @mosadd/mcp
2
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.
3
+ MCP server for [mosadd](https://mosadd.com) — 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
4
 
5
- > **3.0.0-alpha.4** — **61 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 166-event radar in front.
5
+ > **3.0.0-alpha.16** — **70 live tools across 6 live modules** (mDM incl. voice + files, mIRC, mROOM, mAIL incl. provenance, mTALK, mRAG) + agent→user action links + 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 166-event radar in front.
6
6
 
7
- ## Install
7
+ ## Connect your agent
8
8
 
9
- ### Claude Code
9
+ Three ways to authenticate, friendliest first — all three end with the same ~70 tools.
10
+
11
+ ### 1. `mosadd login` — recommended (one command, stays logged in)
12
+
13
+ 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.
10
14
 
11
15
  ```bash
16
+ npx -y @mosadd/mcp@alpha login
17
+ # prompts for your Supabase URL + anon key (both public) and your mosadd email + password
18
+ ```
19
+
20
+ Then register the server with **no env block**:
21
+
22
+ ```bash
23
+ # Claude Code
12
24
  claude mcp add mosadd -- npx -y @mosadd/mcp@alpha
13
25
  ```
14
26
 
15
- ### Cursor
27
+ ```json
28
+ // Claude Desktop / Cursor / Cline / Windsurf — mcpServers config, no env needed
29
+ {
30
+ "mcpServers": {
31
+ "mosadd": { "command": "npx", "args": ["-y", "@mosadd/mcp@alpha"] }
32
+ }
33
+ }
34
+ ```
35
+
36
+ `npx @mosadd/mcp@alpha whoami` shows who you're signed in as; `… logout` clears it.
37
+
38
+ ### 2. `MOSADD_API_KEY` — headless / CI (one long-lived key)
16
39
 
17
- `~/.cursor/mcp.json`:
40
+ 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`.
18
41
 
19
42
  ```json
20
43
  {
@@ -22,47 +45,39 @@ claude mcp add mosadd -- npx -y @mosadd/mcp@alpha
22
45
  "mosadd": {
23
46
  "command": "npx",
24
47
  "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
- }
48
+ "env": { "MOSADD_API_KEY": "mosadd_sk_live_…" }
30
49
  }
31
50
  }
32
51
  }
33
52
  ```
34
53
 
35
- ### Standalone
54
+ Mint a key by POSTing to the `hub-keys` Edge Function with your user JWT (it returns the secret once). A one-click "API keys" screen on mosadd.com is the planned UX.
36
55
 
37
- ```bash
38
- MOSADD_SUPABASE_URL=... MOSADD_SUPABASE_ANON_KEY=... MOSADD_USER_JWT=... npx @mosadd/mcp@alpha
39
- ```
56
+ ### 3. BYOK + `MOSADD_USER_JWT` — advanced / debugging
40
57
 
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.
58
+ Bring your own Supabase URL + anon key + a raw session token. **The JWT expires (~1h)** — prefer option 1 or 2 for anything ongoing.
44
59
 
45
60
  - `MOSADD_SUPABASE_URL` — your Supabase project URL (e.g. `https://abc.supabase.co`)
46
61
  - `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
62
+ - `MOSADD_USER_JWT` — sign in to mosadd.com → DevTools → Application → Local Storage → `sb-<ref>-auth-token` → copy the `access_token` field
51
63
 
52
- In Phase 2, run `mosadd login` to OAuth into hub.mosadd.com — no JWT-juggling required.
64
+ In Phase 2 the hosted gateway at `mcp.mosadd.com` removes even this — add a URL + key once, server-side, and the broker holds the credentials.
53
65
 
54
66
  ## Tools shipped in alpha
55
67
 
56
- **61 live tools across 6 live modules** (mDM, mIRC, mROOM, mAIL, mTALK, mRAG) + the `comms_capabilities` discovery tool. Highlights per module:
68
+ **70 live tools across 6 live modules** (mDM, mIRC, mROOM, mAIL, mTALK, mRAG) + agent→user action links + the `comms_capabilities` discovery tool. Highlights per module:
57
69
 
58
70
  | Module | Tools | What it does |
59
71
  |---|---|---|
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** (11) | `mAIL_send`, `mAIL_view`, `mAIL_list`, `mAIL_delete`, `mAIL_stats`, `mAIL_events`, `mAIL_metrics`, `mAIL_revoke`, `mAIL_audit_export`, `mAIL_consent`, `mAIL_notify` | Mail; every user gets `<id>@mosadd.com`. `mAIL_revoke` recalls secure-reader access; `mAIL_audit_export` emits an HMAC-SHA256-signed engagement audit; `mAIL_consent` manages recipient tracking opt-outs (GDPR); `mAIL_notify` pulls the inbound-mail notification feed |
72
+ | **mDM** (14) | `mDM_list_contacts`, `mDM_send`, `mDM_send_unencrypted`, `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, X3DH / Double-Ratchet E2EE on `mDM_send` |
73
+ | **mIRC** (22) | `mIRC_create/list/get/update/delete`, member RBAC (`mIRC_join/leave/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 |
74
+ | **mROOM** (11) | `mROOM_create`, **`mROOM_create_guest_link`**, `mROOM_join/leave/close/list`, `mROOM_voice_join`, `mROOM_send_message`, `mROOM_list_messages`, `mROOM_send_voice/file` | Ephemeral rooms + single-call no-account guest links |
75
+ | **mAIL** (12) | `mAIL_send`, `mAIL_view`, `mAIL_list`, `mAIL_delete`, `mAIL_stats`, `mAIL_events`, `mAIL_metrics`, `mAIL_revoke`, `mAIL_audit_export`, `mAIL_consent`, `mAIL_notify`, `mAIL_send_as_agent` | Mail; every user gets `<id>@mosadd.com`. `mAIL_send_as_agent` stamps agent/human provenance; `mAIL_revoke` recalls secure-reader access; `mAIL_audit_export` emits an HMAC-SHA256-signed engagement audit; `mAIL_consent` manages recipient tracking opt-outs (GDPR); `mAIL_notify` pulls the inbound-mail feed |
76
+ | **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; `mTALK_ingest_ptt` feeds PTT audio to RAG |
65
77
  | **mRAG** (4) | `mRAG_ingest`, `mRAG_search`, `mRAG_list_sources`, `mRAG_delete` | RAG recall over the user's own data (hybrid vector + BM25) |
78
+ | **comms_** (2) | `comms_action_create`, `comms_capabilities` | `comms_action_create` mints an agent→user one-link browser action (Tier 1); `comms_capabilities` is one-call discovery of every tool's transport `requires` flag |
79
+
80
+ Counts by module prefix sum to **70 channel tools**; `comms_capabilities` (discovery) makes **71 callable** in total. `mCALL` (telephony) and `mURL` (brand surface) tools exist in the source but are **not registered** — agents only ever see tools that actually work.
66
81
 
67
82
  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
83
 
package/dist/bin/mcp.js CHANGED
@@ -1,11 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createMosaddServer
4
- } from "../chunk-ZT7IBWW7.js";
5
- import "../chunk-Z7WR52GE.js";
4
+ } from "../chunk-5ZMJB5YU.js";
5
+ import {
6
+ isSessionExpired,
7
+ loadSession,
8
+ saveSession
9
+ } from "../chunk-Z7WR52GE.js";
6
10
 
7
11
  // src/bin/mcp.ts
8
12
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
13
+ import { createClient } from "@supabase/supabase-js";
9
14
  var DEFAULT_EXCHANGE = "https://rooffhgbxafyjcwmwpsy.supabase.co/functions/v1/hub-key-exchange";
10
15
  async function bootstrapFromApiKey() {
11
16
  const apiKey = process.env.MOSADD_API_KEY;
@@ -33,6 +38,36 @@ async function bootstrapFromApiKey() {
33
38
  );
34
39
  }
35
40
  }
41
+ async function bootstrapFromSavedSession() {
42
+ if (process.env.MOSADD_USER_JWT) return;
43
+ const session = loadSession();
44
+ if (!session?.refreshToken) return;
45
+ if (!isSessionExpired(session)) return;
46
+ try {
47
+ const client = createClient(session.url, session.anonKey, {
48
+ auth: { persistSession: false, autoRefreshToken: false, detectSessionInUrl: false }
49
+ });
50
+ const { data, error } = await client.auth.refreshSession({ refresh_token: session.refreshToken });
51
+ if (error || !data.session) {
52
+ process.stderr.write(
53
+ JSON.stringify({ level: "warn", msg: "mosadd session refresh failed \u2014 run `mosadd login`", error: error?.message }) + "\n"
54
+ );
55
+ return;
56
+ }
57
+ saveSession({
58
+ url: session.url,
59
+ anonKey: session.anonKey,
60
+ accessToken: data.session.access_token,
61
+ refreshToken: data.session.refresh_token ?? session.refreshToken,
62
+ expiresAt: data.session.expires_at,
63
+ email: data.user?.email ?? session.email
64
+ });
65
+ } catch (err) {
66
+ process.stderr.write(
67
+ JSON.stringify({ level: "warn", msg: "mosadd session refresh error \u2014 run `mosadd login`", error: String(err) }) + "\n"
68
+ );
69
+ }
70
+ }
36
71
  async function main() {
37
72
  const sub = process.argv[2];
38
73
  if (sub === "login" || sub === "logout" || sub === "whoami") {
@@ -41,6 +76,7 @@ async function main() {
41
76
  return;
42
77
  }
43
78
  await bootstrapFromApiKey();
79
+ await bootstrapFromSavedSession();
44
80
  const server = createMosaddServer({
45
81
  apiKey: process.env.MOSADD_API_KEY,
46
82
  hubUrl: process.env.MOSADD_HUB_URL,