csharp-sdk/tests/ModelContextProtocol.AspNetCore.Tests/StatelessServerIntegrationTests.cs
Stephen Halter ce9f73f43f
Add stateless Streamable HTTP support (#392)
- It allows a single MCP session spanning multiple requests
  to be handled by different servers without sharing state
- It does require the servers share data protection keys, but this
  is standard for ASP.NET Core cookies and antiforgery as well
- It immediately throws for unsupported operations like sampling
2025-05-14 04:51:03 -07:00

16 lines
554 B
C#

using ModelContextProtocol.Protocol.Transport;
using System.Text;
namespace ModelContextProtocol.AspNetCore.Tests;
public class StatelessServerIntegrationTests(SseServerIntegrationTestFixture fixture, ITestOutputHelper testOutputHelper)
: StreamableHttpServerIntegrationTests(fixture, testOutputHelper)
{
protected override SseClientTransportOptions ClientTransportOptions => new()
{
Endpoint = new Uri("http://localhost/stateless"),
Name = "In-memory Streamable HTTP Client",
UseStreamableHttp = true,
};
}