docs: clarify Streamable HTTP stateless mode semantics and usage #1697
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the documentation for Streamable HTTP
stateless_httpmode in the Python SDK by clarifying what "stateless" means in the MCP context, which features are impacted, and when this mode is appropriate to use.Motivation
Several production deployments rely on Streamable HTTP transport, and stateless mode is particularly attractive for serverless and load-balanced environments. However, the current documentation doesn't fully explain:
This directly addresses the concerns raised in issue #1696 about unclear semantics, limitations, and naming.
Changes
Added: Comprehensive "Understanding Stateless Mode" Section
Located after the Streamable HTTP transport examples, this new documentation includes:
1. Clear Definition
2. Feature Compatibility Table
Shows which MCP features work in each mode:
With helpful footnotes explaining the limitations.
3. Usage Guidance
Stateless mode is ideal for:
Stateful mode is needed for:
4. Three Deployment Patterns
Each with code examples.
5. Technical Details
6. Updated Introduction
Changed the blanket recommendation for stateless mode to a more nuanced statement that directs users to the new section for guidance.
Type of Change
Testing
Notes
examples/servers/simple-streamablehttp-stateless/Checklist
Closes #1696