Skip to content

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”)

MCP Server - Expose tools and capabilities via MCP protocol

Methods

fn new() -> Self

Create new MCP server

fn with_capabilities(self, capabilities: ServerCapabilities) -> Self

Configure server capabilities

fn with_auth_handler<H>(self, handler: H) -> Self

Configure authentication handler

fn with_tool_provider<P>(self, provider: P) -> Self

Configure tool provider

fn with_server_info(self, server_info: ServerInfo) -> Self

Configure server info

fn handle_request(&self, request: &UniversalRequest) -> Result<UniversalResponse, ProtocolError>

Handle incoming MCP request

MCP Server Builder - Convenient server configuration

Methods

fn new() -> Self

Create new server builder

fn with_capabilities(self, capabilities: ServerCapabilities) -> Self

Set server capabilities

fn with_auth_handler<H>(self, handler: H) -> Self

Set authentication handler

fn with_tool_provider<P>(self, provider: P) -> Self

Set tool provider

fn with_server_info(self, server_info: ServerInfo) -> Self

Set server info

fn build(self) -> McpServer

Build the MCP server