Auth and scope
Auth and scope
Section titled “Auth and scope”See Authentication and Request context for full examples.
auth: 'none'— no credentials requiredauth: 'bearer'(default) — 401 without valid Bearer tokenauthenticate(token, req)on the spec — your hook; callspec extracts Bearer and calls it with the Expressreq
Scope controls export surfaces (not HTTP mounting — all routes stay callable on the server):
scope: 'public'(default) — included incallspec.json, OpenAPI, docs UI, SDK codegen, and MCPtools/listscope: 'private'— server-only; omitted from those exports
OpenAPI Bearer security is auto-derived from route auth.