namespace ModelContextProtocol.Server; /// /// Delegate type for handling incoming JSON-RPC messages. /// /// The message context containing the JSON-RPC message and other metadata. /// A cancellation token to cancel the operation. /// A task representing the asynchronous operation. /// /// /// This delegate can handle any type of JSON-RPC message, including requests, notifications, responses, and errors. /// Use this for implementing cross-cutting concerns that need to intercept all message types, /// such as logging, authentication, rate limiting, or request tracing. /// /// /// For request-specific handling, use instead. /// /// public delegate Task McpMessageHandler( MessageContext context, CancellationToken cancellationToken);