Add stateless doc, prefer stateless mode and disable legacy SSE by default (#1468)

This commit is contained in:
Stephen Halter 2026-03-27 13:56:16 -07:00 • committed by GitHub
commit 8eb4023c20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,7 +63,7 @@ Register prompt types when building the server:
```csharp
builder.Services.AddMcpServer()
.WithHttpTransport()
.WithHttpTransport(o => o.Stateless = true)
.WithPrompts<MyPrompts>()
.WithPrompts<CodePrompts>();
```
@ -197,7 +197,7 @@ foreach (var message in result.Messages)
### Prompt list change notifications
Servers can dynamically add, remove, or modify prompts at runtime and notify connected clients.
Servers can dynamically add, remove, or modify prompts at runtime and notify connected clients. These are unsolicited notifications, so they require [stateful mode or stdio](xref:stateless) — [stateless](xref:stateless#stateless-mode-recommended) servers cannot send unsolicited notifications.
#### Sending notifications from the server