~bigbes/sr-ht-spec: 7cc652d5

fix(mcpsrv): gate read tools to owner+agents (spec-jjo)

The MCP read tools (spec_search/spec_read/spec_list) enforced no ACL:
anyone clearing the Host allowlist could read approved content. graph's
/query and the web UI gate reads to owner+agents; /mcp did not. Add the
same fail-closed gate to the whole MCP surface — initialize, tools/list
and tools/call — mounted inside the resolver middleware so it sees the
resolved principal. spec_propose was already fail-closed in service.Propose;
this makes the read tools match.

Pre-existing since Phase 2, cheap now that /mcp resolves a principal.

Closes spec-jjo

Eugene Blikh <bigbes@gmail.com> — 2026-07-24 16:45:25 UTC

Commit 7cc652d57e9b4fb8962318f36fdab737bb0b1be8view raw patch

Parent(s): 096d25aa

3 changed file(s)

FileStatus+
cmd/specsrht/main.go M +7 -1
mcpsrv/gate_test.go A +68
mcpsrv/mcpsrv.go M +28