Add example for stateless server with JSON response (#704)

This commit is contained in:
5enxia 2025-05-15 17:24:13 +09:00 • committed by GitHub
commit 0a388b642f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -402,6 +402,9 @@ mcp = FastMCP("StatefulServer")
# Stateless server (no session persistence)
mcp = FastMCP("StatelessServer", stateless_http=True)
# Stateless server (no session persistence, no sse stream with supported client)
mcp = FastMCP("StatelessServer", stateless_http=True, json_response=True)
# Run server with streamable_http transport
mcp.run(transport="streamable-http")
```