mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 06:54:18 +01:00
Add example for stateless server with JSON response (#704)
This commit is contained in:
@@ -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")
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user