Skip to content

Can the sdk support transmission without SSE? #335

Open
@shootercheng

Description

@shootercheng

Expected Behavior

View my example project. I have covered the McpSeverSession in the sdk, making it unnecessary to maintain the state and to maintain the SSE connection

https://github.com/shootercheng/streamable-mcp/blob/dev/src/main/java/io/modelcontextprotocol/spec/McpServerSession.java

https://github.com/shootercheng/streamable-mcp/blob/dev/README.md

Current Behavior

I want to customize the McpServerSession class so that it does not need to maintain state, but I found that too much needs to be changed by reading the source code

  1. McpServerSession
  2. McpAsyncServer
    Image
  3. Add a transport layer that removes SSE connections

Context

Each SSE connection maintains an open HTTP thread (in JavaWeb), potentially straining server resources under high load.

I have tried to remove SSE, but I found that just adding a WebMvcNoSseServerTransportProvider class is not enough. I also need to change the McpServerSession to remove state maintenance. I also tried to add a subclass similar to McpServerSession, and found that it does not support extension, so I need to change McpAsyncServer. If I don't change the McpAsyncServer and add a new one similar to the McpAsyncServer, the automatic loading of SpringBoot is implemented through the McpAsyncServer, so I will change more class contents

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