Commit c04f198
Add sessions doc and prefer stateless mode in docs, samples, and error messages
Recommend stateless mode as the default for HTTP-based MCP servers
across documentation, samples, and error messages.
Docs:
- Add comprehensive sessions conceptual doc covering stateless
(recommended), stateful, and stdio session behaviors
- Update getting-started, transports, filters, and other conceptual
docs to use stateless mode in examples
- Add Sampling to docs table of contents
- Clarify ConfigureSessionOptions runs per-request in stateless mode
Samples:
- Convert ProtectedMcpServer to stateless mode
- Add comments to AspNetCoreMcpServer and EverythingServer explaining
why they require sessions
Error messages:
- Improve missing Mcp-Session-Id errors to suggest stateless mode and
link to session documentation
Tests:
- Add tests for progress notifications and ConfigureSessionOptions in
stateless mode
- Verify error messages reference stateless mode guidance
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 51a4fde commit c04f198
17 files changed
Lines changed: 515 additions & 11 deletions
File tree
- docs/concepts
- elicitation
- httpcontext/samples
- logging
- progress/samples/server
- sessions
- transports
- samples
- AspNetCoreMcpServer
- EverythingServer
- ProtectedMcpServer
- src/ModelContextProtocol.AspNetCore
- tests/ModelContextProtocol.AspNetCore.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
0 commit comments