You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp): make the MCP tool surface usable — ABAC/OPA, tool classification, multi-session
Analyzed + fixed three defects that made every MCP tools/call fail.
- fs-extra ESM interop: `await import('fs-extra')` exposes members only on
`.default` under nodenext, so `fs.stat` was undefined → "OPA Engine Error:
fs.stat is not a function" denied nearly every tool. abac-evaluator now uses
node:fs/promises; mcp-server.service uses `(mod.default ?? mod)` for fs-extra +
yaml. No other unsafe dynamic CJS imports remain.
- ABAC classification completeness: the native evaluator used name-substring
heuristics, leaving evaluate/drift/topology-recommend/phase-artifacts-evaluate
(and others) unclassified → ABAC-03 "Unknown tool" → denied. Added an explicit
TOOL_CLASSIFICATION map for all 35 registered tools (read/write/deploy) with a
guard test asserting registration↔classification never drift.
- Per-session StreamableHTTP transport: a single startup transport rejected any
second initialize with 400 "Server already initialized". Now a
Map<sessionId,{transport,server}>: mint per initialize, route by mcp-session-id,
clean up on close; multiple concurrent clients work.
- Also fixed jest.config moduleNameMapper for @modelcontextprotocol/sdk (path one
level too shallow) which had silently broken 4 suites.
Build clean; 191/193 unit tests (2 pre-existing gate.tools env failures unrelated).
Verified live (http, dev): two concurrent initialize sessions; previously-denied
tools (topology-list, config-get, drift, topology-recommend) now pass ABAC.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments