Skip to content

Commit d002b51

Browse files
committed
Add example for stateless server with JSON response
1 parent 173e0ee commit d002b51

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ mcp = FastMCP("StatefulServer")
400400
# Stateless server (no session persistence)
401401
mcp = FastMCP("StatelessServer", stateless_http=True)
402402

403+
# Stateless server (no session persistence, no sse stream with supported client)
404+
mcp = FastMCP("StatelessServer", stateless_http=True, json_response=True)
405+
403406
# Run server with streamable_http transport
404407
mcp.run(transport="streamable-http")
405408
```

0 commit comments

Comments
 (0)