docs: clarify Streamable HTTP stateless mode semantics and usage#1697
docs: clarify Streamable HTTP stateless mode semantics and usage#1697dgenio wants to merge 3 commits intomodelcontextprotocol:mainfrom
Conversation
|
This PR is still relevant — the README still has the blanket recommendation to use The diff should apply cleanly or nearly so since the relevant README section hasn't changed. A couple of questions for maintainers:
I can rebase on latest |
ae4b1ca to
e7f7723
Compare
Resolves markdownlint MD036 errors for deployment pattern sections.
README.md is frozen at v1 per CI checks. Move the Understanding Stateless Mode section and the refined note to README.v2.md instead. Update code examples to use MCPServer (formerly FastMCP).
1941154 to
8dd9431
Compare
|
Just rebased on latest This PR has been open for 4+ months and remains relevant. Since it was opened, several new issues have confirmed that the missing documentation around stateless mode is causing real user confusion:
All of these trace back to the same gap: users don't know what stateless mode actually does, what it doesn't support, and when to use it. The blanket recommendation in @felixweinberger — would appreciate a look when you have a moment. Happy to move the content to |
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