wso2 / wso2/api-platform

[Bug]: MCP proxy does not forward text/event-stream incrementally

Open
#2,962 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Aspect/AI Aspect/API Severity/Major Type/Bug
Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Please select the area the issue is related to

AI Workspace

Please select the aspect the issue is related to

Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI), Aspect/AI (AI/LLM integration, MCP, AI readiness)

Description
Summary

text/event-stream responses from an MCP server are buffered by the gateway and released only after the backend finishes. Clients get all SSE events in one burst instead of incrementally, so streaming tools give no live feedback.

Expected: events forwarded as the backend emits them.
Actual: nothing until the tool completes, then all events at once.

Steps to Reproduce
  1. Run an MCP server over Streamable HTTP with a tool that emits notifications/progress every 1 second before returning (e.g. count to 4).
  2. Create an MCP proxy pointing at that backend.
  3. Call the tool through the proxy URL and record when each SSE event arrives, all arrive together at ~4s.
  4. Repeat directly against the backend URL
Severity Level of the Issue

Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)

Environment Details (with versions)

wso2apip-ai-gateway 1.2.0-beta, ai-workspace 1.0.0-beta

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with an MCP server over Streamable HTTP that emits notifications/progress every second, then compare event timing through the proxy URL with the backend URL. Trace the proxy's response handling and verify that text/event-stream events arrive incrementally before the tool completes, rather than in one burst.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.