From d002b51858950d83b6e35dda1a08a9b304490baa Mon Sep 17 00:00:00 2001 From: 5enxia Date: Tue, 13 May 2025 21:36:20 +0900 Subject: [PATCH 1/2] Add example for stateless server with JSON response --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 034b8d4b5..df1b03c0c 100644 --- a/README.md +++ b/README.md @@ -400,6 +400,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") ``` From 952d2f95b9de3ad0da91c0c93d06a4261665ac0b Mon Sep 17 00:00:00 2001 From: 5enxia Date: Thu, 15 May 2025 02:05:11 +0900 Subject: [PATCH 2/2] Fix formatting of stateless server example in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df1b03c0c..1650f7645 100644 --- a/README.md +++ b/README.md @@ -400,7 +400,7 @@ 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) +# 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