Skip to main content

validate_server_config

Function validate_server_config 

Source
pub fn validate_server_config(server: &ServerConfig) -> Result<()>
Expand description

Validate the generic server config fields.

§Scope

This is a pre-flight for TOML files, not a substitute for the authoritative check: serve() runs McpServerConfig::check, which is the only validator that sees the fully bridged configuration - runtime-only state (session_store, event_store, …) has no TOML representation and cannot be checked here. Every rule expressible on both types is enforced by both: the shared rules call the same helpers, and a source-derived parity guard (every_shared_config_field_is_validated_by_both) fails when a config field is validated on one side only.

§Errors

Returns RmcpServerKitError::Config on invalid values.