Add example for stateless server with JSON response (#704)
This commit is contained in:
parent
a00b20a427
commit
0a388b642f
1 changed files with 3 additions and 0 deletions
|
|
@ -402,6 +402,9 @@ mcp = FastMCP("StatefulServer")
|
||||||
# Stateless server (no session persistence)
|
# Stateless server (no session persistence)
|
||||||
mcp = FastMCP("StatelessServer", stateless_http=True)
|
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
|
# Run server with streamable_http transport
|
||||||
mcp.run(transport="streamable-http")
|
mcp.run(transport="streamable-http")
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue