Skip to content

[Doc] Clarify that StreamableHTTPTransport requires a single-process server#290

Merged
koic merged 1 commit intomodelcontextprotocol:mainfrom
koic:thread_model_requirement
Apr 3, 2026
Merged

[Doc] Clarify that StreamableHTTPTransport requires a single-process server#290
koic merged 1 commit intomodelcontextprotocol:mainfrom
koic:thread_model_requirement

Conversation

@koic
Copy link
Copy Markdown
Member

@koic koic commented Apr 3, 2026

Motivation and Context

StreamableHTTPTransport stores session and SSE stream state in memory using instance variables (@sessions, @mutex). This design requires all HTTP requests to be handled within the same process to share state.

Process-based servers like Unicorn fork separate worker processes that do not share memory, which breaks session management and SSE connections. This requirement is not obvious from the current documentation.

How Has This Been Tested?

Documentation-only change.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

…s server

## Motivation and Context

`StreamableHTTPTransport` stores session and SSE stream state in memory using
instance variables (`@sessions`, `@mutex`). This design requires all HTTP requests
to be handled within the same process to share state.

Process-based servers like Unicorn fork separate worker processes that do not share memory,
which breaks session management and SSE connections.
This requirement is not obvious from the current documentation.

## How Has This Been Tested?

Documentation-only change.

## Breaking Changes

None.
@atesgoral
Copy link
Copy Markdown
Contributor

We could probably introduce a session store adapter later

@koic koic merged commit 6f94d64 into modelcontextprotocol:main Apr 3, 2026
11 checks passed
@koic koic deleted the thread_model_requirement branch April 3, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants