@coffeerunhobby/mcp-ha-connect 1.7.2 → 1.7.4
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/AGENTS.md +396 -0
- package/dist/permissions/index.js +7 -1
- package/dist/permissions/index.js.map +1 -1
- package/dist/server/http.d.ts +11 -0
- package/dist/server/http.js +23 -0
- package/dist/server/http.js.map +1 -1
- package/dist/tools/common.d.ts +0 -19
- package/dist/tools/common.js +0 -8
- package/dist/tools/common.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/CHANGELOG.md +67 -231
- package/openapi.json +3 -22
- package/package.json +3 -3
- package/src/permissions/index.ts +8 -1
- package/src/server/http.ts +25 -0
- package/src/tools/common.ts +0 -9
- package/src/version.ts +1 -1
- package/tests/server/http.test.ts +27 -0
- package/dist/wrapper.d.ts +0 -7
- package/dist/wrapper.js +0 -301
- package/dist/wrapper.js.map +0 -1
- package/src/wrapper.ts +0 -340
package/dist/tools/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/tools/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAExF,sCAAsC;AACtC,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB;;;;;;;;;;;GAWG;AACH,IAAI,cAAc,GAAG,KAAK,CAAC;AAE3B,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,cAAc,GAAG,OAAO,CAAC;AAC3B,CAAC;AAQD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAgB;IACnD,OAAQ,KAAK,CAAC,QAAQ,EAAE,KAA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G.md
CHANGED
|
@@ -1,255 +1,91 @@
|
|
|
1
|
+
### 1.7.4
|
|
2
|
+
- **Security — cleared every advisory in the dependency tree** (`npm audit` and `npm audit --omit=dev` both report 0). Runtime range declarations are unchanged; all fixes are in-range lockfile bumps:
|
|
3
|
+
- Production: `undici` 6.28.0→6.29.0 (WebSocket DoS ×2, retry-interceptor response splitting), `fast-uri` 3.1.6→3.1.8 (authority injection / host confusion; via ajv), `hono` 4.13.3→4.13.11, `ip-address` 10.5.0→10.7.2, `qs` 6.15.3→6.16.0 (all three transitive under the SDK's express stack).
|
|
4
|
+
- Dev-only: `vitest` + `@vitest/coverage-v8` 4.1.10→4.1.11 (devDependency floor raised to `^4.1.11`), `brace-expansion`, `js-yaml`, `nanoid`, `postcss`; `esbuild` pinned back to 0.27.2 (the advisory covers 0.27.3–0.28.0).
|
|
5
|
+
- None of the production advisories were reachable here — the vulnerable surfaces (undici's WebSocket/retry interceptor, hono/express/qs request parsing, ip-address) are never imported by this server — but they failed the `npm audit` CI gate.
|
|
6
|
+
- **Image rebuilt on the current base**: Node 24.19.0→24.21.0 (bundled OpenSSL 3.5.7→3.5.8, bundled undici 7.29.0→7.29.1), Alpine 3.24.1→3.24.2, `curl` 8.21.0→8.22.0, `libssl3`/`libcrypto3` 3.5.8. No source changes.
|
|
7
|
+
|
|
8
|
+
### 1.7.3
|
|
9
|
+
- **Fix — stateless `GET /mcp` now returns `405 Method Not Allowed` instead of hanging forever.** In stateless mode every request gets a fresh transport, so the SDK's standalone SSE GET opened a stream that never emitted a byte and never ended. That eternal zero-byte response pinned the Cloudflare→origin keep-alive socket, and HTTP/1.1 serial semantics stalled every request queued behind it — mcp-remote's own `WWW-Authenticate` probe GET poisoned the socket its `initialize` POST was then queued on, surfacing as intermittent "Request timed out" (and occasional CF 502) for Claude Desktop / Cowork sessions. Also fixes the resource leak (each hung GET pinned a socket + a full McpServer instance). Stateful mode is unchanged. +4 regression tests (`isStatelessMcpGet`).
|
|
10
|
+
- Removed `src/wrapper.ts` — a dead legacy HTTP wrapper (unauthenticated, spawn-per-request) that nothing referenced but still compiled into the shipped image. Verified unused: n8n calls the native `/mcp` endpoint; the live server already 404'd the wrapper's `POST /` route.
|
|
11
|
+
- `openapi.json`: dropped the stale `POST /` "raw JSON-RPC passthrough" advertisement (the endpoint 404s; n8n uses `/mcp`).
|
|
12
|
+
- Removed the unused `customRequestSchema` export (never registered as a tool).
|
|
13
|
+
- `parsePermissionsConfig` now logs a warning when `MCP_PERMISSIONS_CONFIG` is invalid JSON instead of silently resolving every caller to NONE (still fail-closed).
|
|
14
|
+
- Track `AGENTS.md` (agent instructions for the repo), updated to the current release process (CI OIDC npm publish, WSL Docker build) and current facts (REST bridge is RBAC-gated).
|
|
15
|
+
|
|
1
16
|
### 1.7.2
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
server fault. `parseBody` now tags a JSON parse failure `400` and the request handler
|
|
6
|
-
surfaces `400 Bad Request` with the parse detail (safe — it describes the client's own
|
|
7
|
-
body, not our internals). Oversize bodies still return `413`; genuine faults still `500`.
|
|
17
|
+
- Fix: a malformed JSON request body now returns `400 Bad Request` (was `500`) — `parseBody` tags the parse failure and the handler returns the parse detail; oversize bodies still `413`, genuine faults still `500`.
|
|
18
|
+
- Security: cleared every high/moderate advisory in the production tree via already-in-range bumps (no `overrides`, no hard-dep downgrades, `package.json` unchanged; `npm audit --omit=dev` now 0): `ip-address` 10.2.0→10.5.0 (SSRF), `fast-uri` 3.1.3→3.1.6, `@hono/node-server` 1.19.14→1.19.17 (serve-static path traversal), `hono` 4.12.29→4.13.3 (middleware DoS), `undici` 6.27.0→6.28.0.
|
|
19
|
+
- Remaining `npm audit` findings are dev-only tooling (esbuild/vitest/tsx) that never ships.
|
|
8
20
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`
|
|
12
|
-
|
|
13
|
-
- `ip-address` 10.2.0 → 10.5.0 (SSRF / trust-boundary bypass; via express-rate-limit, unused by us)
|
|
14
|
-
- `fast-uri` 3.1.3 → 3.1.6 (via ajv)
|
|
15
|
-
- `@hono/node-server` 1.19.14 → 1.19.17 (Windows path traversal in serve-static)
|
|
16
|
-
- `hono` 4.12.29 → 4.13.3 (algorithmic-complexity DoS in language middleware)
|
|
17
|
-
- `undici` 6.27.0 → 6.28.0 (our direct dep)
|
|
21
|
+
### 1.7.1
|
|
22
|
+
- Per-action cooldown on `invokeAction`: a minimum interval between firings (default 60s, 0 disables) so an injected model can't loop a *legitimate* remote-hands action into a deploy storm / endpoint DoS. Check-and-claim runs before the fetch; a failed call still consumes the slot.
|
|
23
|
+
- Fix: undici pairing — dispatcher requests now use undici's own `fetch`. An npm-undici-6 `Agent` passed to Node's built-in fetch broke on Node 26 ("invalid onError method" → "fetch failed"); the real root cause of the v1.5.5 crash-loop.
|
|
24
|
+
- README npm badge → shields.io (badge.fury.io served a stale cached version).
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
### 1.7.0
|
|
27
|
+
- Unified chat-face registry: one source generates the OpenAPI spec and the `MCP_CHAT_TOOLS` slice; Omada tools made chat-eligible.
|
|
28
|
+
- Fix two stale OC200-v6 integration tests (totalTraffic rename, required threat-list params).
|
|
21
29
|
|
|
22
|
-
### 1.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
resolves them, cutting the retry loops and wrong guesses that waste round-trips:
|
|
26
|
-
- `getState`, `entityAction`, and the `hass://entities/{id}` resources now return a
|
|
27
|
-
`hint` field on a missing/malformed `entity_id`, pointing at `searchEntities` (and the
|
|
28
|
-
required `domain.name` format).
|
|
29
|
-
- Omada `resolveSiteId` with no site configured now hints to `omada_browse` at `/` to
|
|
30
|
-
discover available sites and their IDs.
|
|
31
|
-
- Omada SSID getters with a missing `wlanId`/`ssidId` had stale tool references
|
|
32
|
-
(`getWlanGroupList`/`getSsidList`) corrected to the real graph-mode paths
|
|
33
|
-
(`omada_read /wifi/groups`, `omada_read /wifi/ssids`).
|
|
30
|
+
### 1.6.0
|
|
31
|
+
- Remote-hands actions: `invokeAction` fires pre-registered REST actions (`MCP_REST_ACTIONS`) — deploy triggers / webhooks, each individually gated (name-only lookup, no arbitrary URLs).
|
|
32
|
+
- package.json: add repository / homepage / bugs metadata.
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
### 1.5.6
|
|
35
|
+
- Runtime base → `node:24-alpine` LTS (node:26 broke the old-kernel NAS's first fetch); npm stripped from the runtime image.
|
|
36
|
+
- CI: boot-test the built image (mock HA + `/health`) so a release is never the image's first run; auto-create the GitHub Release on `v*` tags; tokenless npm publish via OIDC trusted publishing; also test on Node 26 (the image runtime).
|
|
37
|
+
|
|
38
|
+
### 1.5.5
|
|
39
|
+
- CVE patch: refresh dependencies, `node:26` base (node:25 EOL), `apk upgrade`, drop unused `--experimental-quic`.
|
|
40
|
+
- Fix: regenerate the lockfile on Linux — a Windows-generated lock omitted `@emnapi/*` optional deps, failing `npm ci` in the Docker/CI build.
|
|
41
|
+
|
|
42
|
+
### 1.5.4
|
|
43
|
+
- Actionable error hints so agents self-correct: `getState` / `entityAction` / `hass://entities/{id}` return a `hint` toward `searchEntities` on a missing/malformed `entity_id`; Omada `resolveSiteId` with no site hints to `omada_browse /`; corrected stale Omada SSID getter refs to graph paths (`omada_read /wifi/groups`, `/wifi/ssids`). Additive — error text only, no API/behavior change.
|
|
37
44
|
|
|
38
45
|
### 1.5.3
|
|
39
|
-
|
|
40
|
-
Open WebUI sends an `x-session-id` header on every OpenAPI tool call. The REST bridge's
|
|
41
|
-
CORS preflight only advertised `Access-Control-Allow-Headers: Content-Type, Authorization`,
|
|
42
|
-
so the browser's preflight check failed on the unlisted header and blocked the request
|
|
43
|
-
before it was sent — surfacing (yet again) as *"NetworkError when attempting to fetch
|
|
44
|
-
resource."* `Access-Control-Allow-Headers` now includes `x-session-id`. This was the final
|
|
45
|
-
piece: combined with v1.5.1 (https scheme) and v1.5.2 (CORS on 401/429), Open WebUI tool
|
|
46
|
-
calls against the `/api/*` bridge now complete.
|
|
46
|
+
- Fix: add `x-session-id` to `Access-Control-Allow-Headers` so Open WebUI's OpenAPI tool calls pass CORS preflight (the browser was blocking every call on the unlisted header → "NetworkError"). Final piece with v1.5.1 (https scheme) + v1.5.2 (CORS on 401/429) to make `/api/*` calls complete.
|
|
47
47
|
|
|
48
48
|
### 1.5.2
|
|
49
|
-
|
|
50
|
-
failures stop masquerading as "NetworkError".**
|
|
51
|
-
The REST-bridge CORS headers were applied only *inside* the route handlers, which run
|
|
52
|
-
**after** the auth and rate-limit middleware. So a `401 Unauthorized` (bad/missing token)
|
|
53
|
-
or a `429` (rate limited) on a browser-facing endpoint went back with **no**
|
|
54
|
-
`Access-Control-Allow-Origin` header. A browser that receives a cross-origin response
|
|
55
|
-
without that header discards it and reports the generic *"NetworkError when attempting to
|
|
56
|
-
fetch resource"* — completely hiding the real `401`. This made an Open WebUI auth
|
|
57
|
-
misconfiguration look identical to a network/tunnel failure.
|
|
58
|
-
|
|
59
|
-
CORS headers for the browser-facing REST surface (`/openapi.json`, `/api/*`, the SSE
|
|
60
|
-
events path) are now applied **before** rate limiting and authentication, so every
|
|
61
|
-
rejection carries `Access-Control-Allow-Origin` and the browser surfaces the true status.
|
|
62
|
-
The path test is extracted into the `isRestApiCorsPath()` helper (shared by the preflight
|
|
63
|
-
and the new early-CORS step); `addRestApiCors()` is unchanged. No behavior change for a
|
|
64
|
-
successful (200) request — it already carried CORS.
|
|
49
|
+
- Fix: apply REST-bridge CORS (`/openapi.json`, `/api/*`, SSE path) **before** auth / rate-limit, so a `401` / `429` still carries `Access-Control-Allow-Origin`. A browser discards a header-less cross-origin response and reports "NetworkError", hiding the real `401` — making an auth misconfig look like a tunnel failure. Path test extracted to `isRestApiCorsPath()`; 200s unchanged.
|
|
65
50
|
|
|
66
51
|
### 1.5.1
|
|
67
|
-
|
|
68
|
-
The OpenAPI document's `servers[0].url` was built with a hardcoded `http://`. Behind the
|
|
69
|
-
Cloudflare tunnel (which terminates TLS and forwards to the origin over plain HTTP), the
|
|
70
|
-
spec therefore advertised an `http://` server URL even though the public endpoint is
|
|
71
|
-
`https://`. An OpenAPI tool client loaded on an **https** page (e.g. Open WebUI) then
|
|
72
|
-
refused to call any tool, because the browser blocks `http://` subresource fetches from an
|
|
73
|
-
https origin as **mixed content** — surfacing as *"NetworkError when attempting to fetch
|
|
74
|
-
resource."*
|
|
75
|
-
|
|
76
|
-
The handler now honors the `X-Forwarded-Proto` header (set by Cloudflare / reverse
|
|
77
|
-
proxies) when constructing the advertised base URL, so a TLS-terminated deployment
|
|
78
|
-
advertises `https://`. The new `resolveForwardedProto()` helper validates the header
|
|
79
|
-
against an allowlist — anything other than a literal `https` falls back to `http`, and
|
|
80
|
-
comma-separated proxy chains take the first hop — so a spoofed value can't inject an
|
|
81
|
-
arbitrary scheme into the spec. No behavior change for plain-HTTP deployments.
|
|
52
|
+
- Fix: `/openapi.json` honors `X-Forwarded-Proto` so `servers[0].url` advertises `https` behind the TLS-terminating Cloudflare tunnel (was hardcoded `http://`, blocked as mixed content on an https page → "NetworkError"). New `resolveForwardedProto()` validates against an allowlist (spoof-safe; first hop of a comma chain). No change for plain-HTTP.
|
|
82
53
|
|
|
83
54
|
### 1.5.0
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
new
|
|
90
|
-
|
|
91
|
-
- *VPN status* (`/vpn`) — `/vpn/site-to-site` (list, or a single tunnel via `id`),
|
|
92
|
-
`/vpn/client-to-site/servers`, `/vpn/client-to-site/clients`, `/vpn/wireguard`, and the
|
|
93
|
-
paginated `/vpn/ipsec-stats`.
|
|
94
|
-
- *Profiles* (`/profiles`) — `/profiles/ppsk` (per-device Wi-Fi keys; **requires** `params.type`:
|
|
95
|
-
0 = without RADIUS, 1 = with RADIUS) and `/profiles/time-range`.
|
|
96
|
-
- *Schedules* (`/schedules`) — `/schedules/poe`, `/schedules/port`, `/schedules/upgrade`.
|
|
97
|
-
(Reboot schedules are site-template-scoped enterprise config and are intentionally omitted.)
|
|
98
|
-
- *Backup status* (`/backup`) — `/backup/files` and `/backup/result`.
|
|
99
|
-
- *Audit logs* (`/audit`) — **ADMIN-gated** (like `/security`): `/audit/site` (site-scoped) and
|
|
100
|
-
`/audit/global` (controller-wide, not site-scoped). Both paginated, with optional epoch-ms
|
|
101
|
-
`startTime`/`endTime` + `searchKey` filters via the new `auditFilters` helper.
|
|
102
|
-
|
|
103
|
-
This is the first subtree beyond `/security` to require ADMIN, further exercising per-path RBAC.
|
|
104
|
-
Suite grew by the corresponding namespace wiring + `auditFilters` tests.
|
|
55
|
+
- Feature — Omada resource graph Tier 4 reads (still just `omada_browse` + `omada_read`, zero tool-schema cost), grounded in the reference API client, over the existing `OmadaClient.readResource()`:
|
|
56
|
+
- VPN (`/vpn`): `/site-to-site` (list or single via `id`), `/client-to-site/servers`, `/client-to-site/clients`, `/wireguard`, paginated `/ipsec-stats`.
|
|
57
|
+
- Profiles (`/profiles`): `/ppsk` (**requires** `params.type` 0/1) and `/time-range`.
|
|
58
|
+
- Schedules (`/schedules`): `/poe`, `/port`, `/upgrade`.
|
|
59
|
+
- Backup (`/backup`): `/files`, `/result`.
|
|
60
|
+
- Audit (`/audit`) — **ADMIN-gated**: `/site` and `/global`, paginated with optional epoch-ms `startTime`/`endTime` + `searchKey` (new `auditFilters` helper).
|
|
61
|
+
- First ADMIN subtree beyond `/security`, further exercising per-path RBAC.
|
|
105
62
|
|
|
106
63
|
### 1.4.0
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
OpenAPI spec (required params verified) and the reference TP-Link Omada API client, then
|
|
113
|
-
backed by the existing generic `OmadaClient.readResource()` primitive (no new client code):
|
|
114
|
-
|
|
115
|
-
- *Completed the typed-read parity set* — `/devices/search` (global device search) and
|
|
116
|
-
`/network/load-balance` (multi-WAN status) close the last gaps so every typed Omada read
|
|
117
|
-
getter now has a graph node.
|
|
118
|
-
- *Tier 2 (network insight)* — `/devices/cable-test` (`/ports`, `/results`, `/logs`; requires
|
|
119
|
-
`switchMac`), `/network/port-forwarding/rules` (the full NAT rule list, vs. status only),
|
|
120
|
-
`/network/dhcp-leases` (active leases), and dashboard analytics
|
|
121
|
-
`/dashboard/client-distribution`, `/dashboard/traffic-distribution`,
|
|
122
|
-
`/dashboard/traffic-activities` (the latter two default to a last-24h epoch-seconds window).
|
|
123
|
-
- *Tier 3 (curated home-relevant subset)* — selected from the controller's ~900-endpoint
|
|
124
|
-
long tail, skipping enterprise gear (fiber/OLT, site-templates, RADIUS/LDAP, enterprise
|
|
125
|
-
VPN): `/devices/poe`, `/devices/lldp`, `/network/dhcp-reservations`, `/network/static-routes`,
|
|
126
|
-
`/network/ip-mac-binding`, `/network/attack-defense`, `/network/acls/{gateway,switch,eap}`,
|
|
127
|
-
`/network/url-filters/{gateway,eap}`, `/network/mac-filters/{allow,deny}`, and
|
|
128
|
-
`/wifi/band-steering`. All read-only and QUERY-gated, consistent with `/network/firewall`.
|
|
129
|
-
|
|
130
|
-
Paginated nodes forward a single `page`/`pageSize` to one GET (no page-walking). Suite grew
|
|
131
|
-
by the corresponding namespace wiring tests.
|
|
64
|
+
- Feature — Omada resource graph widened from ~33 to **54 readable nodes** at the same two-tool surface (`omada_browse` + `omada_read`), zero tool-schema cost; every node grounded in the controller OpenAPI spec + reference client, over `OmadaClient.readResource()`:
|
|
65
|
+
- Typed-read parity: `/devices/search`, `/network/load-balance` — every typed getter now has a graph node.
|
|
66
|
+
- Tier 2 (insight): `/devices/cable-test` (requires `switchMac`), `/network/port-forwarding/rules`, `/network/dhcp-leases`, dashboard `/client-distribution`, `/traffic-distribution`, `/traffic-activities`.
|
|
67
|
+
- Tier 3 (home subset, skipping enterprise gear): `/devices/poe`, `/lldp`, `/network/dhcp-reservations`, `/static-routes`, `/ip-mac-binding`, `/attack-defense`, `/acls/{gateway,switch,eap}`, `/url-filters/{gateway,eap}`, `/mac-filters/{allow,deny}`, `/wifi/band-steering` — all read-only, QUERY-gated.
|
|
68
|
+
- Paginated nodes forward one `page`/`pageSize` (no page-walking).
|
|
132
69
|
|
|
133
70
|
### 1.3.4
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
graph
|
|
137
|
-
tools — `omada_browse` (navigate a permission-filtered tree of resource **types**, never
|
|
138
|
-
instances) and `omada_read` (generic, per-path-RBAC data fetch with single-page
|
|
139
|
-
pagination) — plus the 5 typed write/action tools, in place of the ~21 individual read
|
|
140
|
-
getters. `eager` (default) is unchanged. A single `OmadaClient.readResource()` primitive
|
|
141
|
-
(path-template driven) backs newly-exposed endpoints (gateway WAN/health, AP speed-test,
|
|
142
|
-
rogue-AP/WIDS, event/alert logs, dashboard CPU/memory, firmware info + controller-wide
|
|
143
|
-
critical-firmware) with no per-endpoint client code. `graph` mode is now a **complete
|
|
144
|
-
superset** of `eager` reads: the ADMIN-gated IDS/IPS threat-management log is exposed at
|
|
145
|
-
`/security/threats`, with its mandatory epoch time-window enforced via required
|
|
146
|
-
`params.startTime`/`params.endTime` (epoch seconds) validated before any controller call —
|
|
147
|
-
the first node to require a higher permission bit (ADMIN) than QUERY, demonstrating the
|
|
148
|
-
per-path RBAC. New manifest (`namespace.ts`) + tools (`graph.ts`); `getCallerPermissions()`
|
|
149
|
-
extracted in `tools/common.ts` and reused for per-path checks. Suite grew by 47 unit tests
|
|
150
|
-
(namespace + graph + config parsing).
|
|
151
|
-
|
|
152
|
-
**Fix — `OMADA_SITE_ID` is validated against the live controller at startup.** The Omada
|
|
153
|
-
controller's site list is now treated as the source of truth; `OMADA_SITE_ID` is only a
|
|
154
|
-
selector against it. At boot (reusing the existing `listSites()` connection test) a
|
|
155
|
-
configured `OMADA_SITE_ID` that is **not** present on the controller — e.g. a site id that
|
|
156
|
-
drifted after a controller migration, the same way `OMADA_OMADAC_ID` does — now disables the
|
|
157
|
-
**Omada plugin** with a clear, actionable error that names the bad value and lists the valid
|
|
158
|
-
sites, instead of silently scoping every site-scoped read to a dead site and surfacing later
|
|
159
|
-
as a confusing "user does not have permissions to access this site" error. The failure is
|
|
160
|
-
scoped to the Omada plugin only — Home Assistant and Local AI keep working (graceful
|
|
161
|
-
degradation preserved). Default-site auto-resolution for site-scoped reads is otherwise
|
|
162
|
-
unchanged: callers still need not pass `siteId` when a valid default is configured. New pure
|
|
163
|
-
`checkConfiguredSite()` helper + 4 unit tests.
|
|
164
|
-
|
|
165
|
-
**Fix — graph reads that require query parameters now send them (events/alerts, dashboard
|
|
166
|
-
CPU/memory, rogue-AP/WIDS, pending devices).** Seven graph nodes were authored from endpoint
|
|
167
|
-
paths alone and never sent the query parameters the controller requires, so every call
|
|
168
|
-
returned a bare framework `400 Bad Request` (rejected before reaching the Omada handler — no
|
|
169
|
-
`errorCode`/`msg` envelope). Verified against the live controller's own OpenAPI spec and
|
|
170
|
-
fixed:
|
|
171
|
-
- `/events` and `/events/alerts` now send the mandatory `filters.timeStart`/`filters.timeEnd`
|
|
172
|
-
window (epoch **milliseconds**). The window is optional to the caller and **defaults to the
|
|
173
|
-
last 7 days**, so a bare `omada_read('/events')` works; override via `params.startTime` /
|
|
174
|
-
`params.endTime`, with optional `params.module` (and `params.resolved` for alerts).
|
|
175
|
-
- `/dashboard/cpu` and `/dashboard/memory` now send the mandatory `start`/`end` window
|
|
176
|
-
(epoch **seconds**), defaulting to the **last 24 h**; override via `params.startTime` /
|
|
177
|
-
`params.endTime`.
|
|
178
|
-
- `/wifi/rogue`, `/wifi/wids`, and `/devices/pending` are now declared `paginated` so they
|
|
179
|
-
forward `page`/`pageSize` (all three are paginated list endpoints). `/wifi/wids` is
|
|
180
|
-
documented as Omada **Pro-only** — on a standard controller it returns a clear "Pro only"
|
|
181
|
-
message rather than data.
|
|
182
|
-
Two pure, unit-tested window helpers (`resolveLogWindowMs`, `resolveUsageWindowSec`) back the
|
|
183
|
-
defaults. Also surfaces the controller's own `errorCode`/`msg` in `RequestHandler`'s thrown
|
|
184
|
-
HTTP-error message (when present) so a rejected request explains itself instead of collapsing
|
|
185
|
-
to `"400 "` — internal hostnames/headers are still kept out of the message. Suite grew by 10
|
|
186
|
-
unit tests (window helpers + fixed-node wiring).
|
|
71
|
+
- Feature — Omada resource-graph tool registration (`MCP_TOOL_REGISTRATION_MODE=graph`): registers `omada_browse` (permission-filtered tree of resource **types**) + `omada_read` (per-path-RBAC fetch, single-page pagination) + the 5 typed write/action tools, replacing ~21 read getters; `eager` (default) unchanged. One `OmadaClient.readResource()` primitive backs the newly-exposed endpoints. `graph` is now a complete superset of `eager` reads, incl. the ADMIN-gated IDS/IPS log at `/security/threats` (required epoch `startTime`/`endTime`) — first node above QUERY. New `namespace.ts`/`graph.ts`, `getCallerPermissions()` extracted; +47 tests.
|
|
72
|
+
- Fix — `OMADA_SITE_ID` validated against the live controller at startup: an id not present on the controller (drift after migration, like `OMADA_OMADAC_ID`) now disables the Omada plugin with an error naming the bad value + valid sites, instead of silently scoping reads to a dead site (later "user does not have permissions to access this site"). HA/AI keep working; valid default still auto-resolves. New `checkConfiguredSite()` + 4 tests.
|
|
73
|
+
- Fix — graph reads that require query params now send them: `/events` + `/events/alerts` send `filters.timeStart`/`timeEnd` (epoch ms, default last 7d, `params.module`/`resolved` optional); `/dashboard/cpu` + `/memory` send `start`/`end` (epoch s, default last 24h); `/wifi/rogue`, `/wifi/wids` (Pro-only), `/devices/pending` marked paginated. Surfaces the controller's `errorCode`/`msg` in thrown HTTP errors (was a bare `400`). Window helpers `resolveLogWindowMs`/`resolveUsageWindowSec`; +10 tests.
|
|
187
74
|
|
|
188
75
|
### 1.3.1
|
|
189
|
-
|
|
190
|
-
permission change. `getUserPermissions` now resolves both the per-user `role` and the
|
|
191
|
-
`defaultRole` fall-back case-insensitively: a lowercase `"operator"` / `"admin"` in
|
|
192
|
-
`MCP_PERMISSIONS_CONFIG` (a common real-world spelling) maps to the correct mask instead
|
|
193
|
-
of silently collapsing to an empty (no-permission) mask. Unknown role names still fail
|
|
194
|
-
closed to `NONE`. Regression tests added under `tests/permissions/`.
|
|
76
|
+
- Patch — RBAC role-name case-insensitivity (follow-up to v1.3.0 fail-closed change): `getUserPermissions` resolves per-user `role` and `defaultRole` case-insensitively, so lowercase `"operator"`/`"admin"` in `MCP_PERMISSIONS_CONFIG` map correctly instead of collapsing to an empty mask; unknown roles still fail closed to `NONE`. Tests under `tests/permissions/`.
|
|
195
77
|
|
|
196
78
|
### 1.3.0
|
|
197
|
-
**Security hardening release
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
|
|
207
|
-
permissions return `403`.
|
|
208
|
-
- SSE `/subscribe_events` now requires the `QUERY` permission; the dead `?token=` query
|
|
209
|
-
param was removed and SSE CORS is constrained to the configured allowlist.
|
|
210
|
-
- **Authentication (SEC-AUTHN)**
|
|
211
|
-
- New optional `MCP_AUTH_REQUIRE_EXP` rejects tokens lacking an `exp` claim (defaults
|
|
212
|
-
**off** for backward compatibility; emits a one-time startup warning when a no-exp token
|
|
213
|
-
is accepted).
|
|
214
|
-
- Optional `MCP_AUTH_ISSUER` / `MCP_AUTH_AUDIENCE` validation plus `nbf` and clock-skew checks.
|
|
215
|
-
- The JWT signing secret must be ≥32 chars when `MCP_AUTH_METHOD=bearer` — startup fails fast otherwise.
|
|
216
|
-
- **Injection / SSRF (SEC-INJ / SEC-SSRF)**
|
|
217
|
-
- Every interpolated Home Assistant API path segment is now `encodeURIComponent`-encoded and
|
|
218
|
-
schema-validated (entity/domain/service patterns), closing path-traversal and
|
|
219
|
-
endpoint-redirection against the HA base URL.
|
|
220
|
-
- **Cryptographic & transport (SEC-CRYPTO)**
|
|
221
|
-
- Removed the process-global `NODE_TLS_REJECT_UNAUTHORIZED=0` race; self-signed trust is now
|
|
222
|
-
a per-client `undici` dispatcher used only when `strictSsl=false`. SSE client IDs use
|
|
223
|
-
`randomUUID()` instead of `Math.random()`.
|
|
224
|
-
- **Configuration (SEC-CONFIG)**
|
|
225
|
-
- `MCP_AUTH_METHOD=none` now throws at startup on a non-loopback bind (loopback dev still works);
|
|
226
|
-
loud warning whenever `none` is active.
|
|
227
|
-
- Opt-in DNS-rebinding Host validation via a new `MCP_HTTP_ALLOWED_HOSTS` env: leave it unset
|
|
228
|
-
(default) and Host validation stays off so the server works everywhere; set it to the exact
|
|
229
|
-
host(s) clients use to reach the server (its LAN IP:port and/or public domain) to enforce a
|
|
230
|
-
`403` on any other `Host` header. Origin/CORS handling is unchanged. Removed the
|
|
231
|
-
`ALLOWED_ORIGINS=*` wildcard from the shipped compose file. Container runs as non-root
|
|
232
|
-
(`USER node`). Standard security headers
|
|
233
|
-
(`X-Content-Type-Options`, `X-Frame-Options`, `Referrer-Policy`) on every response.
|
|
234
|
-
- **Resource consumption (SEC-DOS)**
|
|
235
|
-
- Rate-limit keying is spoof-proof: client forwarding headers (`CF-Connecting-IP` /
|
|
236
|
-
`X-Forwarded-For` / `X-Real-IP`) are honored only when the immediate peer is a configured
|
|
237
|
-
`MCP_RATE_LIMIT_TRUSTED_PROXIES` entry; otherwise the socket address is used, so forged
|
|
238
|
-
headers can neither evade the limit nor exhaust memory.
|
|
239
|
-
- Request bodies are capped at 1 MB (`413` on overflow, socket destroyed immediately) and the
|
|
240
|
-
HTTP server enforces `headersTimeout`/`requestTimeout`/`keepAliveTimeout` against slow-loris
|
|
241
|
-
(intake-only — long-lived SSE streams are unaffected).
|
|
242
|
-
- **Logging & disclosure (SEC-LOG)**
|
|
243
|
-
- Client-facing `500`/SSE errors return a generic message; full detail is logged server-side only.
|
|
244
|
-
- `/health` now returns `{ "status": "healthy" }` only — version, auth method, AI provider/URL,
|
|
245
|
-
and client counts are no longer disclosed to unauthenticated callers.
|
|
246
|
-
- **Insecure design (SEC-DESIGN)**
|
|
247
|
-
- Tool authorization fails **closed**: a missing permission mask denies (was `0xFF` allow-all).
|
|
248
|
-
stdio (Claude Desktop) opts into local full-trust explicitly; HTTP always carries an explicit mask.
|
|
249
|
-
- **Dependencies (SEC-DEPS)**
|
|
250
|
-
- Bumped `@modelcontextprotocol/sdk` → `^1.29.0` and `ws` → `^8.21.0`, clearing 8 production
|
|
251
|
-
advisories (5 high) in the transitive tree. A CI gate test asserts zero high/critical from
|
|
252
|
-
`npm audit --omit=dev`.
|
|
79
|
+
- **Security hardening release** — OWASP-aligned audit (API Top 10 2023 + Top 10 2021), every fix with regression tests under `tests/security/`; external behavior unchanged for correct configs. Suite → 908 tests; `npm audit --omit=dev` clean.
|
|
80
|
+
- Access control: REST `/api/*` gated by the same RBAC bits as their MCP twins (`403` on insufficient perms); SSE `/subscribe_events` requires `QUERY`, dead `?token=` removed, SSE CORS constrained to the allowlist.
|
|
81
|
+
- Authentication: opt-in `MCP_AUTH_REQUIRE_EXP` (reject no-`exp` tokens, default off + startup warning); optional `MCP_AUTH_ISSUER`/`AUDIENCE` + `nbf`/clock-skew; signing secret must be ≥32 chars for `bearer` (fail-fast).
|
|
82
|
+
- Injection/SSRF: every interpolated HA path segment `encodeURIComponent`-encoded and schema-validated.
|
|
83
|
+
- Crypto/transport: removed process-global `NODE_TLS_REJECT_UNAUTHORIZED=0` (per-client `undici` dispatcher only when `strictSsl=false`); SSE IDs via `randomUUID()`.
|
|
84
|
+
- Configuration: `MCP_AUTH_METHOD=none` throws on non-loopback bind; opt-in DNS-rebinding Host validation via `MCP_HTTP_ALLOWED_HOSTS` (unset = off); removed `ALLOWED_ORIGINS=*` from compose; container runs non-root (`USER node`); static security headers on every response.
|
|
85
|
+
- Resource limits: rate-limit keying trusts forwarding headers only from `MCP_RATE_LIMIT_TRUSTED_PROXIES` peers (else socket addr); 1 MB body cap (`413` + socket destroy); slow-loris headers/request/keep-alive timeouts.
|
|
86
|
+
- Logging: client-facing `500`/SSE errors generic (detail server-side only); `/health` returns only `{"status":"healthy"}`.
|
|
87
|
+
- Design: tool authz fails **closed** (missing mask denies, was `0xFF`); stdio opts into local full-trust explicitly.
|
|
88
|
+
- Dependencies: bumped `@modelcontextprotocol/sdk`→`^1.29.0`, `ws`→`^8.21.0` (cleared 8 prod advisories, 5 high); CI gate asserts zero high/critical.
|
|
253
89
|
|
|
254
90
|
### 1.2.0
|
|
255
91
|
- **Omada Client Block/Unblock**: Block or unblock a network client by MAC address
|
package/openapi.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Home Assistant MCP Wrapper",
|
|
5
|
-
"version": "1.7.
|
|
6
|
-
"description": "REST endpoints that wrap MCP tools for Home Assistant integration.
|
|
5
|
+
"version": "1.7.4",
|
|
6
|
+
"description": "REST endpoints that wrap MCP tools for Home Assistant integration."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{ "url": "http://mcpserver.10.0.0.18.nip.io:3000", "description": "MCP Server" },
|
|
@@ -1245,24 +1245,6 @@
|
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
1248
|
-
},
|
|
1249
|
-
|
|
1250
|
-
"/": {
|
|
1251
|
-
"post": {
|
|
1252
|
-
"operationId": "mcp_tools_call_raw",
|
|
1253
|
-
"summary": "Raw JSON-RPC passthrough (for n8n compatibility)",
|
|
1254
|
-
"tags": ["Raw"],
|
|
1255
|
-
"requestBody": {
|
|
1256
|
-
"required": true,
|
|
1257
|
-
"content": { "application/json": { "schema": { "type": "object" } } }
|
|
1258
|
-
},
|
|
1259
|
-
"responses": {
|
|
1260
|
-
"200": {
|
|
1261
|
-
"description": "JSON-RPC response",
|
|
1262
|
-
"content": { "application/json": { "schema": { "type": "object" } } }
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
1248
|
}
|
|
1267
1249
|
},
|
|
1268
1250
|
"tags": [
|
|
@@ -1272,7 +1254,6 @@
|
|
|
1272
1254
|
{ "name": "Device Control", "description": "Specialized device control tools" },
|
|
1273
1255
|
{ "name": "Automation", "description": "Automation management tools" },
|
|
1274
1256
|
{ "name": "AI", "description": "AI-powered analysis tools" },
|
|
1275
|
-
{ "name": "Calendar", "description": "Calendar and event tools" }
|
|
1276
|
-
{ "name": "Raw", "description": "Raw JSON-RPC passthrough" }
|
|
1257
|
+
{ "name": "Calendar", "description": "Calendar and event tools" }
|
|
1277
1258
|
]
|
|
1278
1259
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coffeerunhobby/mcp-ha-connect",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "Smart home MCP server for Home Assistant plus Local AI integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"@types/ws": "^8.18.1",
|
|
51
51
|
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
52
52
|
"@typescript-eslint/parser": "^8.19.1",
|
|
53
|
-
"@vitest/coverage-v8": "^4.
|
|
53
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
54
54
|
"esbuild": "^0.27.2",
|
|
55
55
|
"eslint": "^9.18.0",
|
|
56
56
|
"tsx": "^4.19.2",
|
|
57
57
|
"typescript": "^5.9.3",
|
|
58
58
|
"typescript-eslint": "^8.52.0",
|
|
59
|
-
"vitest": "^4.
|
|
59
|
+
"vitest": "^4.1.11"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=20.0.0"
|
package/src/permissions/index.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Permission System - Role-based access control with binary masks
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { logger } from '../utils/logger.js';
|
|
6
|
+
|
|
5
7
|
/** Permission flags (powers of 2 for bitwise operations, sorted by criticality) */
|
|
6
8
|
export const Permission = {
|
|
7
9
|
ADMIN: 1, // System operations (restart, updates) - highest criticality
|
|
@@ -112,7 +114,12 @@ export function parsePermissionsConfig(json: string | undefined): PermissionsCon
|
|
|
112
114
|
users: Array.isArray(parsed.users) ? parsed.users : [],
|
|
113
115
|
defaultRole: parsed.defaultRole ?? 'NONE',
|
|
114
116
|
};
|
|
115
|
-
} catch {
|
|
117
|
+
} catch (error) {
|
|
118
|
+
// Fail closed (empty config → every caller resolves to NONE), but make the
|
|
119
|
+
// misconfiguration loud: a silent all-NONE is otherwise very hard to diagnose.
|
|
120
|
+
logger.warn('MCP_PERMISSIONS_CONFIG is not valid JSON — ignoring it; all callers resolve to NONE (fail-closed)', {
|
|
121
|
+
error: error instanceof Error ? error.message : String(error),
|
|
122
|
+
});
|
|
116
123
|
return { users: [], defaultRole: 'NONE' };
|
|
117
124
|
}
|
|
118
125
|
}
|
package/src/server/http.ts
CHANGED
|
@@ -230,6 +230,20 @@ export async function handleRestApi(
|
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Stateless mode has no server→client push stream: every request gets a fresh
|
|
235
|
+
* transport, so the SDK's standalone SSE GET would open a stream that never
|
|
236
|
+
* emits a byte and never ends. That eternal silent response pins the
|
|
237
|
+
* (Cloudflare→origin) keep-alive socket, and HTTP/1.1 serial semantics then
|
|
238
|
+
* stall every later request queued on that socket — mcp-remote's own probe
|
|
239
|
+
* GET poisoned the connection its initialize POST was later queued on,
|
|
240
|
+
* surfacing as "Request timed out". Per the MCP spec, a server that does not
|
|
241
|
+
* offer a GET event stream MUST return 405 Method Not Allowed.
|
|
242
|
+
*/
|
|
243
|
+
export function isStatelessMcpGet(stateful: boolean, method: string | undefined): boolean {
|
|
244
|
+
return !stateful && method === 'GET';
|
|
245
|
+
}
|
|
246
|
+
|
|
233
247
|
/**
|
|
234
248
|
* Resolve the public URL scheme, honoring `X-Forwarded-Proto` (set by Cloudflare /
|
|
235
249
|
* reverse proxies that TLS-terminate upstream). The header is validated against an
|
|
@@ -453,6 +467,17 @@ export async function startHttpServer(options: HttpServerOptions): Promise<void>
|
|
|
453
467
|
|
|
454
468
|
// Streamable HTTP Transport (MCP endpoint)
|
|
455
469
|
if (urlPath === mcpPath) {
|
|
470
|
+
// See isStatelessMcpGet: an SSE GET in stateless mode would hang forever
|
|
471
|
+
// and poison the keep-alive socket for every request queued behind it.
|
|
472
|
+
if (isStatelessMcpGet(config.stateful, req.method)) {
|
|
473
|
+
res.setHeader('Allow', 'POST, DELETE');
|
|
474
|
+
sendJson(res, 405, {
|
|
475
|
+
error: 'Method Not Allowed',
|
|
476
|
+
message: 'This server runs in stateless mode: no standalone SSE stream. Send JSON-RPC via POST.',
|
|
477
|
+
});
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
|
|
456
481
|
const sessionId = req.headers['mcp-session-id'] as string | undefined;
|
|
457
482
|
const existingState = sessionId ? sessions.get(sessionId) : undefined;
|
|
458
483
|
|
package/src/tools/common.ts
CHANGED
|
@@ -346,15 +346,6 @@ export const stackIdSchema = siteInputSchema.extend({
|
|
|
346
346
|
stackId: z.string().min(1, 'stackId is required').describe('Switch stack identifier'),
|
|
347
347
|
});
|
|
348
348
|
|
|
349
|
-
// Custom request schema for advanced API calls
|
|
350
|
-
export const customRequestSchema = z.object({
|
|
351
|
-
method: z.string().default('GET').describe('HTTP method'),
|
|
352
|
-
url: z.string().min(1, 'A controller API path is required').describe('API endpoint path'),
|
|
353
|
-
params: z.record(z.string(), z.unknown()).optional().describe('Query parameters'),
|
|
354
|
-
data: z.unknown().optional().describe('Request body data'),
|
|
355
|
-
siteId: z.string().min(1).optional().describe('Site ID'),
|
|
356
|
-
});
|
|
357
|
-
|
|
358
349
|
// =============================================================================
|
|
359
350
|
// Home Assistant pagination schemas
|
|
360
351
|
// =============================================================================
|
package/src/version.ts
CHANGED