Skip to content

Commit 0a388b6

Browse files
authored
Add example for stateless server with JSON response (#704)
1 parent a00b20a commit 0a388b6

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
@@ -402,6 +402,9 @@ mcp = FastMCP("StatefulServer")
402402
# Stateless server (no session persistence)
403403
mcp = FastMCP("StatelessServer", stateless_http=True)
404404

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

0 commit comments

Comments
 (0)