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
parent a00b20a427
commit 0a388b642f

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")
```