Skip to content

[Feature Request]: Allow multiple StreamableHTTP content #1188

@IgnasiBosch

Description

@IgnasiBosch

Some MCP tools return multiple result.content. It's actually a list for that purpose.
For some reason, StreamableHTTP transport explicitly returns [types.TextContent(type=result.content[0].type, text=result.content[0].text)]. Meaning, only the first item is returned. [source]

What about returning [types.TextContent(type=content.type, text=content.text) for content in result.content] instead?

I'm not sure whether this behavior is intended. But it's a relatively short one.

Created PR: #1189

🧭 Type of Feature

Please select the most appropriate category:

  • Enhancement to existing functionality
  • New feature or capability
  • New MCP-compliant server
  • New component or integration
  • Developer tooling or test improvement
  • Packaging, automation and deployment (ex: pypi, docker, quay.io, kubernetes, terraform)
  • Other (please describe below)

🧭 Epic

Title: StreamableHTTP multiple content
Goal: Be compliant with some MCP servers
Why now: Some responses from MCP servers are being truncated


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageIssues / Features awaiting triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions