Skip to content

Stateless MCP Servers #99

Closed
Closed

Description

@bigH

Is your feature request related to a problem? Please describe.
The Ruby SDK currently stores sessions in memory, which prevents it from supporting stateless backends. This is a scalability issue because session state cannot be shared across nodes. In contrast, the Python SDK supports a stateless configuration value.

Describe the solution you'd like
We'd like the Ruby SDK to support stateless session management, similar to the Python SDK.

Describe alternatives you've considered

  • using sticky sessions — this is not something we can pursue
  • forking the library — not ideal, but something we can do to unblock
  • switching to a different SDK — fast-mcp has no Streamable HTTP support, so this is a non-starter

Additional context
We use a minimum of 2 pods for all services to ensure availability. This feature is critical for us to use the Ruby SDK to build remote MCPs.

Activity

  1. sbshah97 commented on Oct 2, 2025

    @sbshah97

    Looks like this is part of the specification for the November release? Probably something to add during that time?

  2. collimarco commented on Oct 14, 2025

    @collimarco

    This gem is totally useless without this feature. No real Rails app can use this gem at the moment.

  3. paulRbr commented on Dec 4, 2025

    @paulRbr

    Thanks for adding the stateless attribute to the SSE transport layer. However, I have a question on how do you use this lib to be able to do streaming responses and actually keep sessions in a production-like environment (I.e. more than 2 workers)?

    Do you think the streamable http transport layer could be configurable to be able to receive any kind of “store” for the sessions (and associated streams) in place of the current memory hash? I'm not an expert in transport layers, so I'm not even sure we can do streamable http with distributed streams across web servers.

    If you folks have any pointers on that, I'd be happy to help and contribute a PR to the lib 🙏

    Thanks for the help!

  4. koic commented on Dec 18, 2025

    @koic
    Member

    The feature is included in the main branch, but not in the current release (v0.4.0). It will be available in the next release.

  5. added a commit that references this issue on Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions