Package dev.relism.flash.ext.mcp
Class McpConfig.Builder
java.lang.Object
dev.relism.flash.ext.mcp.McpConfig.Builder
- Enclosing class:
McpConfig
-
Method Summary
Modifier and TypeMethodDescriptionallowedOrigins(String... origins) Origins allowed to call the MCP endpoint (DNS-rebinding protection, per the Streamable HTTP transport spec).build()instructions(String instructions) Free-text instructions surfaced to the client atinitializetime.mechanisms(dev.relism.flash.ext.security.AuthenticationMechanism... mechanisms) The only mechanisms that authenticate the endpoint, and the only issuers its RFC 9728 metadata names: any other credential, the session cookie included, is none here.middleware(dev.relism.flash.routing.Middleware... middleware) Runs on the MCP route after the transport guards and authentication — rate limiting, auditing, tracing.requireTokenAudience(boolean require) Whether a bearer token must name this endpoint in itsaud(RFC 8707), as the MCP authorization spec requires.HTTP path for the Streamable HTTP endpoint.scopesSupported(String... scopes) Published asscopes_supportedin the RFC 9728 metadata, so OAuth clients request them.security(McpSecurity security) DefaultMcpSecurity.REQUIRED.toolsPackage(String toolsPackage) Server version reported ininitialize'sserverInfo.
-
Method Details
-
version
Server version reported ininitialize'sserverInfo. Default"1.0.0". -
instructions
Free-text instructions surfaced to the client atinitializetime. -
rootPath
HTTP path for the Streamable HTTP endpoint. Default"/mcp". -
toolsPackage
-
security
DefaultMcpSecurity.REQUIRED. -
requireTokenAudience
Whether a bearer token must name this endpoint in itsaud(RFC 8707), as the MCP authorization spec requires. Defaulttrue. Turn it off for an authorization server that cannot mint a resource audience — every token a registered issuer signs is then accepted on the endpoint, and a warning is logged at boot. -
allowedOrigins
Origins allowed to call the MCP endpoint (DNS-rebinding protection, per the Streamable HTTP transport spec). If never set,Originvalidation is skipped and a warning is logged at boot. -
scopesSupported
Published asscopes_supportedin the RFC 9728 metadata, so OAuth clients request them. -
mechanisms
public McpConfig.Builder mechanisms(dev.relism.flash.ext.security.AuthenticationMechanism... mechanisms) The only mechanisms that authenticate the endpoint, and the only issuers its RFC 9728 metadata names: any other credential, the session cookie included, is none here. Default: the whole chain. -
middleware
Runs on the MCP route after the transport guards and authentication — rate limiting, auditing, tracing. -
build
-