Skip to content

Streamable Stateless server should support streaming #539

@taobaorun

Description

@taobaorun

Expected Behavior

A server that is fully stateless and does not support long-lived connections can still take advantage of streaming in this design.
For example, to issue progress notifications during a tool call:
When the incoming POST request is a CallToolRequest, server indicates the response will be SSE
Server starts executing the tool
Server sends any number of ProgressNotifications over SSE while the tool is executing
When the tool execution completes, the server sends a CallToolResponse over SSE
Server closes the SSE stream

modelcontextprotocol/modelcontextprotocol#206

Current Behavior

The current implementation can only return json

return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(jsonrpcResponse);

Context

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