Skip to content

Stateless Async MCP Server with streamable-http returns only the first element from tools with a Flux return #4542

@sorin-florea

Description

@sorin-florea

Bug description
It only returns the first value from the Flux.

Expected behavior
Return all values.

Minimal Complete Reproducible example

spring:
  ai:
    mcp:
      server:
        type: async
        protocol: stateless
        streamable-http:
          mcp-endpoint: /mcp
public Flux<Object>> getSomething ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    MCPbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions