modelcontextprotocol / modelcontextprotocol/typescript-sdk

Request guidance/feature to stream streaming tool responses back

Open
#886 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs decision P3
Dominant language
TypeScript
Stars
13.4k
Forks
2.2k
Avg merge
3d 15h
Merged PRs (30d)
4

Description

Is your feature request related to a problem? Please describe.
Is it possible to stream streaming tool responses back?
If the tool sends back streaming chunks like

const res = await client.fetch(...)
for await (const chunk of res.body) {...}

is it possible to stream the chunks back immediately?

Describe the solution you'd like
Please provide a guidance on how to do this kind of streaming, or implement a new feature for that.

Describe alternatives you've considered
https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/progress provides a notification mechanism, but not all clients are using that.

Additional context

Contributor guide

Open the contributing guide

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

No repository file or test is named in the issue. Start by locating the TypeScript SDK's tool-response handling and the client.fetch streaming example, then compare the desired behavior with the MCP progress-notification specification; done means agreeing on guidance or a defined feature that returns chunks immediately to clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.