-
Notifications
You must be signed in to change notification settings - Fork 521
Description
Currently, most of the server capabilities DTOs have [JsonIgnore]'d handlers on them. I know @jozkee is looking into reorganizing McpServerOptions and moving the handlers out of the capabilities objects, so that might be taken care of soon.
There's also the RelatedTransport, ExecutionContext and ClaimsPrincipal that get [JsonIgnore]'d on JsonRpcMessage (via the JsonRpcMessageContext starting in #733). For this we'll probably want to change the ITransport
interface to not return the JsonRpcMessage directly, but instead some wrapper type. We no have a similar issue with the IMcpServerPrimitives returned by various server side handlers as pointed out on #733 (comment). This will probably require changing the signature of the handlers to return a wrapper around the DTO that gets serialized to the wire.
Given the similarity of these issues, particularly the additional context needed by JsonRpcMessage and the TResult
s in McpRequestHandler<TParams, TResult>
, I think we should address these together.