Skip to content

Session ID agnostic MCP server example #428

@reda2000-cyber

Description

@reda2000-cyber

Expected Behavior
A simple, stateless MCP server that can be deployed on a serverless platform (e.g., in the cloud).

Current Behavior
I’m currently using StreamableHttpServerTransportProvider, which extends HttpServlet. However, after deployment, I encounter a "session not found" error—likely due to the application running across multiple nodes without shared session state.

Context
In the TypeScript implementation, it's straightforward to make the server stateless by setting the sessionIdGenerator to undefined, effectively disabling session management. Is there an equivalent or similarly simple approach to disable session handling in the Java implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions