You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Update examples to use stateless HTTP with JSON responses
Update README and example code to consistently recommend and demonstrate
stateless HTTP with JSON responses (stateless_http=True, json_response=True)
as the recommended pattern for production deployments.
Changes:
- Update quickstart example to use stateless HTTP + JSON and make it executable
- Update all streamable HTTP mounting examples with recommended config
- Update OAuth server example with recommended config
- Reorder streamable_config.py to show recommended option first
- Change quickstart integration instructions to use Claude Code with HTTP
- Clarify that stateless HTTP + JSON is optimal for scalability
This encourages users away from stdio/SSE/stateful HTTP patterns that have
extra complexity and makes servers less reliable for most use cases.
You can install this server in [Claude Desktop](https://claude.ai/download) and interact with it right away by running:
180
+
You can install this server in [Claude Code](https://docs.claude.com/en/docs/claude-code/mcp) and interact with it right away by running:
176
181
177
182
```bash
178
-
uv run mcp install server.py
183
+
claude mcp add --transport http my-server http://localhost:8000/mcp
179
184
```
180
185
181
186
Alternatively, you can test it with the MCP Inspector:
@@ -888,6 +893,8 @@ class SimpleTokenVerifier(TokenVerifier):
888
893
# Create FastMCP instance as a Resource Server
889
894
mcp = FastMCP(
890
895
"Weather Service",
896
+
stateless_http=True,
897
+
json_response=True,
891
898
# Token verifier for authentication
892
899
token_verifier=SimpleTokenVerifier(),
893
900
# Auth settings for RFC 9728 Protected Resource Metadata
@@ -1103,7 +1110,7 @@ Note that `uv run mcp run` or `uv run mcp dev` only supports server using FastMC
1103
1110
1104
1111
### Streamable HTTP Transport
1105
1112
1106
-
> **Note**: Streamable HTTP transport is superseding SSE transport for production deployments.
1113
+
> **Note**: Streamable HTTP transport is the recommended transport for production deployments. Use `stateless_http=True` and `json_response=True` for optimal scalability.
0 commit comments