Add stateless doc, prefer stateless mode and disable legacy SSE by default (#1468)
This commit is contained in:
parent
49bf17077d
commit
8eb4023c20
1 changed files with 1440 additions and 73 deletions
|
|
@ -13,6 +13,10 @@ PopulateToolDictionary(toolDictionary);
|
|||
builder.Services.AddMcpServer()
|
||||
.WithHttpTransport(options =>
|
||||
{
|
||||
// This sample demonstrates per-session tool filtering, which requires stateful mode.
|
||||
// Set Stateless = false explicitly for forward compatibility in case the default changes.
|
||||
options.Stateless = false;
|
||||
|
||||
// Configure per-session options to filter tools based on route category
|
||||
options.ConfigureSessionOptions = async (httpContext, mcpOptions, cancellationToken) =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue