Skip to content

Commit 6f94d64

Browse files
authored
Merge pull request #290 from koic/thread_model_requirement
[Doc] Clarify that `StreamableHTTPTransport` requires a single-process server
2 parents 5285277 + 9ebb42a commit 6f94d64

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,13 @@ transport = MCP::Server::Transports::StreamableHTTPTransport.new(server, session
350350

351351
### Usage
352352

353+
> [!IMPORTANT]
354+
> `MCP::Server::Transports::StreamableHTTPTransport` stores session and SSE stream state in memory,
355+
> so it must run in a single process. Use a single-process server (e.g., Puma with `workers 0`).
356+
> Multi-process configurations (Unicorn, or Puma with `workers > 0`) fork separate processes that
357+
> do not share memory, which breaks session management and SSE connections.
358+
> Stateless mode (`stateless: true`) does not use sessions and works with any server configuration.
359+
353360
#### Rails Controller
354361

355362
When added to a Rails controller on a route that handles POST requests, your server will be compliant with non-streaming

0 commit comments

Comments
 (0)