remote_mcp_kernel/handlers/
mod.rs

1//! HTTP handlers for MCP OAuth server
2//!
3//! This module contains various HTTP handlers that provide different
4//! endpoints for the MCP OAuth server. Each handler follows microkernel
5//! design principles with clear separation of concerns.
6
7pub mod mcp_server;
8pub mod sse_handler;
9pub mod streamable_http;
10
11pub use mcp_server::McpServer;
12pub use sse_handler::{SseHandler, SseHandlerConfig};
13pub use streamable_http::StreamableHttpHandler;
14
15/// Trait for MCP server implementations that can be used with the microkernel
16///
17/// This trait provides the abstraction needed to support arbitrary MCP server
18/// implementations while leveraging the rmcp framework's capabilities.
19///
20/// Any type that implements rmcp::ServerHandler can be used as an MCP server
21/// in the microkernel architecture.
22pub trait McpServerHandler: rmcp::ServerHandler + Clone + Send + Sync + 'static {}
23
24/// Blanket implementation for any type that implements the required traits
25impl<T> McpServerHandler for T where T: rmcp::ServerHandler + Clone + Send + Sync + 'static {}