pub struct HttpMcpServerBuilder { /* private fields */ }
Expand description
Builder for HTTP MCP server with pluggable storage
Implementations§
Source§impl HttpMcpServerBuilder
impl HttpMcpServerBuilder
Sourcepub fn with_storage(session_storage: Arc<BoxedSessionStorage>) -> Self
pub fn with_storage(session_storage: Arc<BoxedSessionStorage>) -> Self
Create a new builder with specific session storage
Sourcepub fn bind_address(self, addr: SocketAddr) -> Self
pub fn bind_address(self, addr: SocketAddr) -> Self
Set the bind address
Sourcepub fn max_body_size(self, size: usize) -> Self
pub fn max_body_size(self, size: usize) -> Self
Set maximum request body size
Sourcepub fn stream_config(self, config: StreamConfig) -> Self
pub fn stream_config(self, config: StreamConfig) -> Self
Configure SSE streaming settings
Sourcepub fn register_handler<H>(self, methods: Vec<String>, handler: H) -> Selfwhere
H: JsonRpcHandler + 'static,
pub fn register_handler<H>(self, methods: Vec<String>, handler: H) -> Selfwhere
H: JsonRpcHandler + 'static,
Register a JSON-RPC handler for specific methods
Sourcepub fn default_handler<H>(self, handler: H) -> Selfwhere
H: JsonRpcHandler + 'static,
pub fn default_handler<H>(self, handler: H) -> Selfwhere
H: JsonRpcHandler + 'static,
Register a default handler for unhandled methods
Sourcepub fn build(self) -> HttpMcpServer
pub fn build(self) -> HttpMcpServer
Build the HTTP MCP server
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpMcpServerBuilder
impl !RefUnwindSafe for HttpMcpServerBuilder
impl Send for HttpMcpServerBuilder
impl Sync for HttpMcpServerBuilder
impl Unpin for HttpMcpServerBuilder
impl !UnwindSafe for HttpMcpServerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more