pub struct McpServer { /* private fields */ }Expand description
MCP Streamable HTTP server state shared by route handlers.
Implementations§
Source§impl McpServer
impl McpServer
Sourcepub fn new(
service: RelayKnowledgeService,
network: NetworkRuntime,
agent: AgentRuntimeConfig,
) -> Self
pub fn new( service: RelayKnowledgeService, network: NetworkRuntime, agent: AgentRuntimeConfig, ) -> Self
Creates MCP server state from validated runtime boundaries.
Sourcepub async fn serve_until_shutdown(
self,
shutdown: impl Future<Output = ()> + Send + 'static,
) -> Result<(), McpServeError>
pub async fn serve_until_shutdown( self, shutdown: impl Future<Output = ()> + Send + 'static, ) -> Result<(), McpServeError>
Starts the MCP HTTP listener through net::http.
Sourcepub fn checked_router(self) -> Result<Router, McpServeError>
pub fn checked_router(self) -> Result<Router, McpServeError>
Builds the Streamable HTTP router after validating listener policy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpServer
impl !RefUnwindSafe for McpServer
impl Send for McpServer
impl Sync for McpServer
impl Unpin for McpServer
impl UnsafeUnpin for McpServer
impl !UnwindSafe for McpServer
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