~bigbes/sr-ht-ecore: 3aa1fcfd

mcphttp: the MCP endpoint plumbing both services already share

hostAllowed is byte-identical in cov and bench, and neither should own it.
PrivateCache is cov's alone today, which is why bench's /mcp currently sets
no Cache-Control and no Vary at all. StreamableOptions carries the pair both
pass and the reason for it.

HostGuard takes cov's fail-closed stance: an origin with no host to guard
with is a construction error, not a warning. bench serves unguarded in that
case and has a test pinning it; reconciling that is bench's to do.

Deliberately not a shared MCP framework. Once the go-sdk and the per-service
tools are subtracted, this is the whole overlap.

Eugene Blikh <bigbes@gmail.com> — 2026-08-15 22:53:10 UTC

Commit 3aa1fcfd9a55d3a42f0e8e3f5ca52725f9a2b2a6view raw patch

Parent(s): 514838a7

8 changed file(s)

FileStatus+
go.mod M +8 -1
go.sum M +14
mcphttp/cache.go A +93
mcphttp/cache_test.go A +146
mcphttp/hostguard.go A +95
mcphttp/hostguard_test.go A +148
mcphttp/mcphttp.go A +99
mcphttp/options_test.go A +42