Skip to content

Add stream, putAll and putAllMap to McpTransportContext - #1285

Open
Kehrlann wants to merge 1 commit into
mainfrom
dgarnier/merge-mcp-transport-contexts
Open

Kehrlann wants to merge 1 commit into
mainfrom
dgarnier/merge-mcp-transport-contexts

Conversation

@Kehrlann

Copy link
Copy Markdown
Contributor
  • Transports need to list a context's entries and combine contexts, for instance to add the decoded Mcp-Param-* headers to a context built by a user-provided extractor.
  • This introduces a way to merge McpTransportContext. To do so, it introduces a way to read entries from the contexts, by key-value.
  • This change is non-breaking but custom implementations of McpTransportContext used in the modern server MUST implement stream().

The implementation is inspired from Reactor's Context.

@Kehrlann
Kehrlann requested a review from chemicL October 26, 2026 17:15
- Transports need to list a context's entries and combine contexts, for
  instance to add the decoded Mcp-Param-* headers to a context built by
  a user-provided extractor.
- This introduces a way to merge McpTransportContext. To do so, it
  introduces a way to read entries from the contexts, by key-value.
- This change is non-breaking but custom implementations of
  McpTransportContext used in the modern server MUST implement stream().

The implementation is inspired from Reactor's Context.

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
@Kehrlann
Kehrlann force-pushed the dgarnier/merge-mcp-transport-contexts branch from f862bd8 to 7a6a9df Compare October 26, 2026 17:21
@Kehrlann
Kehrlann added this pull request to stack #1287 October 26, 2026 17:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant