Tags: modelcontextprotocol/csharp-sdk
Tags
Improve testing for StreamableHttpHandler and IdleTrackingBackgroundS… …ervice (#345) * Add idle session pruning tests * Remove redundant CTS from StreamableHttpHandler * StreamableHttpServerTransport.HandlePostRequest already creates the equivelant CTS which DeleteRequest_CompletesSession_WhichCancelsLongRunningToolCalls verifies * Fix accept header validation for GET * Use InvalidOperationException for transport-not-connected errors in doc comments * Fix flaky Cancellation_ThrowsCancellationException test
Add server-side Streamable HTTP transport support (#330) - Changes IJsonRpcMessage to an abstract base class so RelatedTransport will always be available - Streamable HTTP supports multiple concurrent HTTP request with their own indpendent SSE response streams - RelatedTransport indicates the source or destination of the JsonRpcMessage - Changes the default RequestId to a JSON number for better compatibility with MCP servers in the wild
Separate ASP.NET Core tests into a distinct project and make the main… … test project netfx compatible. (#254) * Separate ASP.NET Core tests into a distinct project and make the main test project netfx compatible. * Fix merge conflicts. * Update tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj Co-authored-by: Stephen Halter <[email protected]> * Revert "Fix merge conflicts." This reverts commit 852169b. * Fix merge conflicts --------- Co-authored-by: Stephen Halter <[email protected]>
Move notification handler registrations to capabilities (#207) * Move notification handler registrations to capabilities Currently request handlers are set on the capability objects, but notification handlers are set after construction via an AddNotificationHandler method on the IMcpEndpoint interface. This moves handler specification to be at construction as well. This makes it more consistent with request handlers, simplifies the IMcpEndpoint interface to just be about message sending, and avoids a concurrency bug that could occur if someone tried to add a handler while the endpoint was processing notifications. * Address more feedback and further cleanup
[UnitTests] Add more UTs (#139) * + Tests for McpClientExtensions code * + code coverage for ClientOptions/Capabilities code --------- Co-authored-by: Esteban Solano <[email protected]> Co-authored-by: Stephen Toub <[email protected]>
PreviousNext