@mosadd/mcp 3.0.0-alpha.23 → 3.0.0-alpha.24
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 +1 -1
- package/dist/bin/mcp.js +1 -1
- package/dist/{chunk-KO7VS2KY.js → chunk-S6OWXISZ.js} +130 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/src/tools/index.ts +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mosadd/mcp
|
|
2
2
|
|
|
3
|
-
MCP server for [mosADD](https://mosadd.com) —
|
|
3
|
+
MCP server for [mosADD](https://mosadd.com) — **the comms layer for AI agents and the humans who direct them.** Exposes the OS modules (m\*) — **mDM (1:1 E2EE), mIRC (in-app channels), mURL (open/embeddable text rooms), and mAYL (email 3.0)** — 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
5
|
> **3.0.0-alpha.23** — **61 live tools across 5 live modules** (mDM incl. voice + files, mIRC, mp0st, mTALK, mRAG) + agent→user action links + the `comms_capabilities` discovery tool + the defensive `threat_*` engine, 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
|
|
package/dist/bin/mcp.js
CHANGED
|
@@ -2006,8 +2006,133 @@ var threatTools = [
|
|
|
2006
2006
|
}
|
|
2007
2007
|
];
|
|
2008
2008
|
|
|
2009
|
-
// src/tools/
|
|
2009
|
+
// src/tools/murl.ts
|
|
2010
2010
|
import { z as z13 } from "zod";
|
|
2011
|
+
var DEFAULT_EDGE_URL2 = "https://mosadd-edge.mr-brics-33.workers.dev";
|
|
2012
|
+
function edgeUrl2() {
|
|
2013
|
+
return process.env.MOSADD_EDGE_URL?.replace(/\/$/, "") ?? DEFAULT_EDGE_URL2;
|
|
2014
|
+
}
|
|
2015
|
+
function hubKey2() {
|
|
2016
|
+
const key = process.env.MOSADD_API_KEY ?? process.env.MOSADD_HUB_KEY ?? "";
|
|
2017
|
+
if (!key) throw new Error("MOSADD_API_KEY required for mURL tools (see `mosadd login` / hub-keys).");
|
|
2018
|
+
return key;
|
|
2019
|
+
}
|
|
2020
|
+
function domainToSlug(input) {
|
|
2021
|
+
let host = String(input).trim().toLowerCase();
|
|
2022
|
+
host = host.replace(/^[a-z]+:\/\//, "").replace(/[/?#].*$/, "").replace(/:\d+$/, "");
|
|
2023
|
+
if (host.startsWith("www.")) host = host.slice(4);
|
|
2024
|
+
if (!host || !/^[a-z0-9-]+(\.[a-z0-9-]+)+$/.test(host)) {
|
|
2025
|
+
throw new Error(`Invalid domain: "${input}" \u2014 pass a domain like "example.com" or a URL.`);
|
|
2026
|
+
}
|
|
2027
|
+
return { domain: host, slug: host.replace(/\./g, "-") };
|
|
2028
|
+
}
|
|
2029
|
+
var DomainArg = z13.string().min(3).max(255).describe("A domain (e.g. 'example.com') or a full URL \u2014 the channel is keyed to the domain.");
|
|
2030
|
+
var mURL_read_channel_input = z13.object({
|
|
2031
|
+
domain: DomainArg,
|
|
2032
|
+
limit: z13.number().int().min(1).max(100).optional().describe("Recent messages to return (max 100). Default 50.")
|
|
2033
|
+
});
|
|
2034
|
+
async function mURL_read_channel(input, ctx) {
|
|
2035
|
+
const { domain, slug: slug2 } = domainToSlug(input.domain);
|
|
2036
|
+
const limit = input.limit ?? 50;
|
|
2037
|
+
ctx.log("debug", "mURL_read_channel", { domain });
|
|
2038
|
+
const r = await fetch(`${edgeUrl2()}/c/${slug2}/history?limit=${limit}`, {
|
|
2039
|
+
headers: { Authorization: `Bearer ${hubKey2()}` }
|
|
2040
|
+
});
|
|
2041
|
+
if (!r.ok) {
|
|
2042
|
+
const e = await r.text().catch(() => "");
|
|
2043
|
+
throw new Error(`mosadd-edge ${r.status}: ${e.slice(0, 200)}`);
|
|
2044
|
+
}
|
|
2045
|
+
const data = await r.json();
|
|
2046
|
+
return {
|
|
2047
|
+
domain,
|
|
2048
|
+
messages: (data.messages ?? []).map((m) => ({ id: m.id, from: m.from ?? null, text: m.text, timestamp: m.ts }))
|
|
2049
|
+
};
|
|
2050
|
+
}
|
|
2051
|
+
var mURL_post_input = z13.object({
|
|
2052
|
+
domain: DomainArg,
|
|
2053
|
+
text: z13.string().min(1).max(2e3).describe("Message body (max 2000 chars, up to 3 lines \u2014 Worker-enforced)."),
|
|
2054
|
+
from: z13.string().max(120).optional().describe("Sender hint shown to others (defaults to the hub-key owner / your agent name).")
|
|
2055
|
+
});
|
|
2056
|
+
async function mURL_post(input, ctx) {
|
|
2057
|
+
const { domain, slug: slug2 } = domainToSlug(input.domain);
|
|
2058
|
+
ctx.log("debug", "mURL_post", { domain });
|
|
2059
|
+
const r = await fetch(`${edgeUrl2()}/c/${slug2}/send`, {
|
|
2060
|
+
method: "POST",
|
|
2061
|
+
headers: { "Content-Type": "application/json", Authorization: `Bearer ${hubKey2()}` },
|
|
2062
|
+
body: JSON.stringify({ text: input.text, from: input.from })
|
|
2063
|
+
});
|
|
2064
|
+
if (!r.ok) {
|
|
2065
|
+
const e = await r.text().catch(() => "");
|
|
2066
|
+
throw new Error(`mosadd-edge ${r.status}: ${e.slice(0, 200)}`);
|
|
2067
|
+
}
|
|
2068
|
+
const data = await r.json();
|
|
2069
|
+
if (!data?.id) throw new Error("mosadd-edge: send returned no id");
|
|
2070
|
+
return { domain, message_id: data.id, posted_at: data.ts ?? Date.now() };
|
|
2071
|
+
}
|
|
2072
|
+
var mURL_list_channels_input = z13.object({
|
|
2073
|
+
action: z13.enum(["trending", "list", "mine"]).optional().describe("'trending' (default) = most active domain channels in the last N hours; 'list' = paginated catalogue filtered by status; 'mine' = channels you own (DNS-verified)."),
|
|
2074
|
+
limit: z13.number().int().min(1).max(100).optional().describe("Max channels to return. Default 20."),
|
|
2075
|
+
hours: z13.number().int().min(1).max(168).optional().describe("Trending window in hours. Default 24, max 168 (7d)."),
|
|
2076
|
+
status: z13.enum(["open", "claimed", "blocked"]).optional().describe("For action='list': filter (default 'open')."),
|
|
2077
|
+
cursor: z13.string().optional().describe("For action='list': pagination \u2014 pass previous response's next_cursor (created_at ISO).")
|
|
2078
|
+
});
|
|
2079
|
+
async function mURL_list_channels(input, ctx) {
|
|
2080
|
+
readSupabaseEnv();
|
|
2081
|
+
const action = input.action ?? "trending";
|
|
2082
|
+
ctx.log("debug", "mURL_list_channels invoking murl-channels", { action });
|
|
2083
|
+
return await invokeFunction("murl-channels", {
|
|
2084
|
+
action,
|
|
2085
|
+
limit: input.limit ?? null,
|
|
2086
|
+
hours: input.hours ?? null,
|
|
2087
|
+
status: input.status ?? null,
|
|
2088
|
+
cursor: input.cursor ?? null
|
|
2089
|
+
});
|
|
2090
|
+
}
|
|
2091
|
+
var mURL_presence_input = z13.object({ domain: DomainArg });
|
|
2092
|
+
async function mURL_presence(input, ctx) {
|
|
2093
|
+
const { domain, slug: slug2 } = domainToSlug(input.domain);
|
|
2094
|
+
ctx.log("debug", "mURL_presence", { domain });
|
|
2095
|
+
const r = await fetch(`${edgeUrl2()}/c/${slug2}/presence`);
|
|
2096
|
+
if (!r.ok) {
|
|
2097
|
+
const e = await r.text().catch(() => "");
|
|
2098
|
+
throw new Error(`mosadd-edge ${r.status}: ${e.slice(0, 200)}`);
|
|
2099
|
+
}
|
|
2100
|
+
const data = await r.json();
|
|
2101
|
+
return { domain, count: data.count ?? 0, roster: data.roster ?? [], status: data.status ?? "open" };
|
|
2102
|
+
}
|
|
2103
|
+
var murlTools = [
|
|
2104
|
+
{
|
|
2105
|
+
name: "mURL_read_channel",
|
|
2106
|
+
requires: "network",
|
|
2107
|
+
description: "Read the live chat channel for a web DOMAIN (mURL \u2014 'IRC for URLs'). Returns the most recent messages humans and agents have posted about that domain. Use it to get real-time, crowd-sourced context before acting on a site \u2014 e.g. scam warnings, promo codes, outage reports, 'is this legit?'. The channel auto-exists for any domain. Auth: MOSADD_API_KEY (hub key).",
|
|
2108
|
+
inputSchema: mURL_read_channel_input,
|
|
2109
|
+
handler: mURL_read_channel
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
name: "mURL_post",
|
|
2113
|
+
requires: "network",
|
|
2114
|
+
description: "Post a message into a web DOMAIN's mURL chat channel \u2014 leave context for the humans and agents who visit that site next (a finding, warning, tip, or coordination note). Sub-100ms global fan-out to everyone currently on the channel. Auth: MOSADD_API_KEY (hub key).",
|
|
2115
|
+
inputSchema: mURL_post_input,
|
|
2116
|
+
handler: mURL_post
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
name: "mURL_presence",
|
|
2120
|
+
requires: "network",
|
|
2121
|
+
description: "Who is on a domain's mURL channel right now: live participant count + roster nicknames + channel status (open/claimed/blocked). Public (no key needed). Use it to gauge whether a domain has an active audience before posting.",
|
|
2122
|
+
inputSchema: mURL_presence_input,
|
|
2123
|
+
handler: mURL_presence
|
|
2124
|
+
},
|
|
2125
|
+
{
|
|
2126
|
+
name: "mURL_list_channels",
|
|
2127
|
+
requires: "network",
|
|
2128
|
+
description: "Discovery for mURL domain channels: 'trending' (most active in the last N hours, default 24) / 'list' (paginated catalogue, status-filtered) / 'mine' (channels you DNS-verified). Returns domain, slug, status, branding, verified_at + (for trending) messages_in_window. For who's-on-now, follow up with mURL_presence on the slug.",
|
|
2129
|
+
inputSchema: mURL_list_channels_input,
|
|
2130
|
+
handler: mURL_list_channels
|
|
2131
|
+
}
|
|
2132
|
+
];
|
|
2133
|
+
|
|
2134
|
+
// src/tools/capabilities.ts
|
|
2135
|
+
import { z as z14 } from "zod";
|
|
2011
2136
|
var CONTRACT_VERSION = "1.0.0";
|
|
2012
2137
|
var ALL_REQUIREMENTS = ["any", "radio", "network"];
|
|
2013
2138
|
function buildCapabilityManifest(tools) {
|
|
@@ -2030,7 +2155,7 @@ function makeCapabilitiesTool(channelTools2) {
|
|
|
2030
2155
|
name: "comms_capabilities",
|
|
2031
2156
|
requires: "any",
|
|
2032
2157
|
description: "Discover which mosadd tools are available and what transport each requires (any | radio | network). Carrier-aware hosts (e.g. off-grid radio devices) call this once to gate the tool list to what the current carrier supports. Returns a manifest with per-tool requirements grouped by transport.",
|
|
2033
|
-
inputSchema:
|
|
2158
|
+
inputSchema: z14.object({}),
|
|
2034
2159
|
handler: async () => buildCapabilityManifest([...channelTools2, tool])
|
|
2035
2160
|
};
|
|
2036
2161
|
return tool;
|
|
@@ -2059,9 +2184,10 @@ var channelTools = [
|
|
|
2059
2184
|
...actionTools,
|
|
2060
2185
|
// Action links (Tier 1): agent → user one-link browser action via action-create EF
|
|
2061
2186
|
// ...embedTools, // comms_embed_create: SCAFFOLD — embed-keys EF undeployed (404) + embed widget parked. Unregistered.
|
|
2062
|
-
...threatTools
|
|
2187
|
+
...threatTools,
|
|
2063
2188
|
// threat_catalog + threat_classify: pure defensive threat-event engine (@mosadd/threat-engine, LINEAR-3498)
|
|
2064
|
-
|
|
2189
|
+
...murlTools
|
|
2190
|
+
// mURL: revived as a full module (founder 2026-06-27) — read/post/presence/list_channels over live domain channels
|
|
2065
2191
|
// ...mcallTools, // mCALL: carrier-pending (no telephony carrier live) — re-register when a carrier is configured
|
|
2066
2192
|
// mirlTools,
|
|
2067
2193
|
// mmatrixTools, mdiscordTools, mtelegramTools, mslackTools, msignalTools,
|
package/dist/index.d.ts
CHANGED
|
@@ -200,8 +200,8 @@ declare function createMosaddServer(options?: MosaddServerOptions): McpServer;
|
|
|
200
200
|
/**
|
|
201
201
|
* Tool registry. Each m* module contributes a set of tools.
|
|
202
202
|
*
|
|
203
|
-
* Live modules (
|
|
204
|
-
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) =
|
|
203
|
+
* Live modules (6): mDM, mIRC, mURL, mTALK, mp0st, mRAG (60 channel tools) + comms (3)
|
|
204
|
+
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) = 65 callable.
|
|
205
205
|
* mROOM was KILLED (LINEAR-3414, channel re-cut → ephemeral private mIRC): its tools
|
|
206
206
|
* live in tools/mroom.ts + mroom-messages.ts but are NOT registered here.
|
|
207
207
|
* Plus action links: comms_action_create (agent → user one-link browser action,
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosadd/mcp",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.24",
|
|
4
4
|
"mcpName": "io.github.hei33enberg/mosadd-mcp",
|
|
5
|
-
"description": "Model Context Protocol server for mosadd. Exposes the
|
|
5
|
+
"description": "Model Context Protocol server for mosadd. Exposes the 6 live m* modules (mDM, mIRC, mURL, mTALK, mp0st, mRAG) plus comms + threat tools — 65 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",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
39
39
|
"@supabase/supabase-js": "^2.48.0",
|
|
40
40
|
"zod": "^4.3.6",
|
|
41
|
-
"@mosadd/
|
|
42
|
-
"@mosadd/
|
|
43
|
-
"@mosadd/providers": "3.0.0-alpha.
|
|
44
|
-
"@mosadd/
|
|
41
|
+
"@mosadd/protocol": "3.0.0-alpha.24",
|
|
42
|
+
"@mosadd/threat-engine": "3.0.0-alpha.24",
|
|
43
|
+
"@mosadd/providers": "3.0.0-alpha.24",
|
|
44
|
+
"@mosadd/crypto": "3.0.0-alpha.24"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.3.5",
|
package/src/tools/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool registry. Each m* module contributes a set of tools.
|
|
3
3
|
*
|
|
4
|
-
* Live modules (
|
|
5
|
-
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) =
|
|
4
|
+
* Live modules (6): mDM, mIRC, mURL, mTALK, mp0st, mRAG (60 channel tools) + comms (3)
|
|
5
|
+
* + threat_catalog/threat_classify (pure defensive engine, LINEAR-3498) = 65 callable.
|
|
6
6
|
* mROOM was KILLED (LINEAR-3414, channel re-cut → ephemeral private mIRC): its tools
|
|
7
7
|
* live in tools/mroom.ts + mroom-messages.ts but are NOT registered here.
|
|
8
8
|
* Plus action links: comms_action_create (agent → user one-link browser action,
|
|
@@ -35,7 +35,7 @@ import { actionTools } from "./actions.js";
|
|
|
35
35
|
// embed-keys EF is NOT deployed to prod (404s every call) and the embed.mosadd.com
|
|
36
36
|
// widget surface is parked. Unregister until both ship. See consistency ticket.
|
|
37
37
|
import { threatTools } from "./threat.js";
|
|
38
|
-
|
|
38
|
+
import { murlTools } from "./murl.js"; // mURL: REGISTERED — revived as a full dev module (founder 2026-06-27, re-arch). IRC-for-URLs, agent-native; backends live (mosadd-edge + murl-channels EF).
|
|
39
39
|
import { makeCapabilitiesTool } from "./capabilities.js";
|
|
40
40
|
|
|
41
41
|
/** The m* channel tools (everything except the meta discovery tool). */
|
|
@@ -61,7 +61,7 @@ const channelTools: MosaddTool[] = [
|
|
|
61
61
|
...actionTools, // Action links (Tier 1): agent → user one-link browser action via action-create EF
|
|
62
62
|
// ...embedTools, // comms_embed_create: SCAFFOLD — embed-keys EF undeployed (404) + embed widget parked. Unregistered.
|
|
63
63
|
...threatTools, // threat_catalog + threat_classify: pure defensive threat-event engine (@mosadd/threat-engine, LINEAR-3498)
|
|
64
|
-
|
|
64
|
+
...murlTools, // mURL: revived as a full module (founder 2026-06-27) — read/post/presence/list_channels over live domain channels
|
|
65
65
|
// ...mcallTools, // mCALL: carrier-pending (no telephony carrier live) — re-register when a carrier is configured
|
|
66
66
|
// mirlTools,
|
|
67
67
|
// mmatrixTools, mdiscordTools, mtelegramTools, mslackTools, msignalTools,
|