Class McpProtectionConfig
java.lang.Object
com.soklet.McpProtectionConfig
Immutable server-wide limits and provider selection for framework-protected
MCP request state.
No configuration is required until an operation declares framework-protected
request state. Development-ephemeral mode is explicit and is not portable
across restarts or server instances. A production keyring is an immutable
initial value; building a server copies it into independent live state and
exposes subsequent mutation only through McpProtectionKeyringManager.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSingle-threaded builder for immutable request-state protection settings. -
Method Summary
Modifier and TypeMethodDescriptionReturns the immutable initial ring configuration, not a server's live ring.Vends an explicit development-ephemeral configuration builder.withKeyring(@NonNull McpProtectionKeyring keyring) Vends a production configuration builder.withRequestStateProtector(@NonNull McpRequestStateProtector requestStateProtector) Vends a custom-protector configuration builder.
-
Method Details
-
withKeyring
public static @NonNull McpProtectionConfig.Builder withKeyring(@NonNull McpProtectionKeyring keyring) Vends a production configuration builder.- Parameters:
keyring- immutable initial production ring- Returns:
- protection configuration builder
-
withRequestStateProtector
public static @NonNull McpProtectionConfig.Builder withRequestStateProtector(@NonNull McpRequestStateProtector requestStateProtector) Vends a custom-protector configuration builder.- Parameters:
requestStateProtector- application-owned protector- Returns:
- protection configuration builder
-
withDevelopmentEphemeralProtection
Vends an explicit development-ephemeral configuration builder.- Returns:
- protection configuration builder
-
getProtectionMode
- Returns:
- configured protection mode
-
getInitialKeyring
Returns the immutable initial ring configuration, not a server's live ring.- Returns:
- initial keyring, if production protection is configured
-
getRequestStateProtector
- Returns:
- custom application protector, when configured
-
getMaximumEncodedRequestStateSizeInBytes
- Returns:
- positive maximum encoded request-state size in bytes
-
getMaximumDecodedRequestStateSizeInBytes
- Returns:
- positive maximum decoded request-state size in bytes
-
getMaximumRequestStateLifetime
- Returns:
- positive finite maximum request-state lifetime
-
getMaximumRequestStateRounds
- Returns:
- positive maximum request-state round count
-