Function create_server

Source
pub fn create_server(
    server_details: InitializeResult,
    handler: impl ServerHandler,
    server_options: HyperServerOptions,
) -> HyperServer
Expand description

Creates a new HyperServer instance with the provided handler and options The handler must implement ServerHandler.

§Arguments

  • server_details - Initialization result from the MCP schema
  • handler - Implementation of the ServerHandlerCore trait
  • server_options - Configuration options for the HyperServer

§Returns

  • HyperServer - A configured HyperServer instance ready to start