The v4 document — a value, or a per-request function (e.g. return projectDocument(doc, roleOf(c))).
OptionalbaseOptionalnameAdvertised server identity.
OptionalversionOptionalinstructionsFree-text guidance surfaced to the model on initialize.
OptionalauthorizeGate the whole endpoint — return true to allow. Default: open (read-only catalog browsing).
OptionalexecOverride how a tool call is executed (default: same-origin fetch via originExec).
OptionalcorsSend permissive CORS so browser-based MCP clients can reach a public read-only server (default: true).
OptionalresidentTIER-TRIM serving (C027): the names of the RESIDENT tools (a value or a per-request resolver). When provided,
tools/list serves only these + a discover_tools meta-tool, withholding the cold-tail from the default surface
(revealed on demand) — the real, lossless context reduction the agent layer promises. Derive these from an
agent's route tiers, e.g. @suluk/agents residentToolNames(doc, agentName). Absent ⇒ the full surface is served.
Optionalinclude"read" (default) exposes only GET/HEAD operations; "all" also exposes mutations.
OptionalhideOperation names to omit.
OptionalonlyIf set, expose ONLY these operation names (after hide).
OptionalincludeInclude deprecated operations (default: skip them).
@suluk/mcp— project ONE OpenAPI v4 document into a Model Context Protocol server. The same contract that drives the API, SDK, docs, admin, and panel now drives an agent-callable surface: every operation becomes an MCP tool (read-only by default; mutations opt-in viainclude:"all"), served over the Streamable-HTTP JSON-RPC transport as a Hono-mountable app. No hand-written tool schemas, no config drift — the contract is the single source. Pure projection (toolsFrom) + pure protocol (handleRpc) are independently testable;mcpAppwires transport. CANDIDATE tooling — NOT official OAS.