server
MCP Server
Section titled “MCP Server”MCP server implementation for exposing tools and memory operations
- HTTP Server: Standard HTTP/JSON-RPC (default)
- SSE Server: Direct SSE connections (feature: “sse-server”)
Structs
Section titled “Structs”McpServer
Section titled “McpServer”MCP Server - Expose tools and capabilities via MCP protocol
Methods
fn new() -> SelfCreate new MCP server
with_capabilities
Section titled “with_capabilities”fn with_capabilities(self, capabilities: ServerCapabilities) -> SelfConfigure server capabilities
with_auth_handler
Section titled “with_auth_handler”fn with_auth_handler<H>(self, handler: H) -> SelfConfigure authentication handler
with_tool_provider
Section titled “with_tool_provider”fn with_tool_provider<P>(self, provider: P) -> SelfConfigure tool provider
with_server_info
Section titled “with_server_info”fn with_server_info(self, server_info: ServerInfo) -> SelfConfigure server info
handle_request
Section titled “handle_request”fn handle_request(&self, request: &UniversalRequest) -> Result<UniversalResponse, ProtocolError>Handle incoming MCP request
McpServerBuilder
Section titled “McpServerBuilder”MCP Server Builder - Convenient server configuration
Methods
fn new() -> SelfCreate new server builder
with_capabilities
Section titled “with_capabilities”fn with_capabilities(self, capabilities: ServerCapabilities) -> SelfSet server capabilities
with_auth_handler
Section titled “with_auth_handler”fn with_auth_handler<H>(self, handler: H) -> SelfSet authentication handler
with_tool_provider
Section titled “with_tool_provider”fn with_tool_provider<P>(self, provider: P) -> SelfSet tool provider
with_server_info
Section titled “with_server_info”fn with_server_info(self, server_info: ServerInfo) -> SelfSet server info
fn build(self) -> McpServerBuild the MCP server