-
Notifications
You must be signed in to change notification settings - Fork 267
feat(client): add WebFluxStreamableClientTransport.java #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All just nitpicky comments.
...src/main/java/io/modelcontextprotocol/client/transport/WebFluxStreamableClientTransport.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/modelcontextprotocol/client/transport/WebFluxStreamableClientTransport.java
Show resolved
Hide resolved
import java.util.function.BiConsumer; | ||
import java.util.function.Function; | ||
|
||
public class WebFluxStreamableClientTransport implements McpClientTransport { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just from an outsider it is hard to understand what all this does without a test of some sort. Maybe at least some javaadoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all thank you for your guidance
This PR primarily aims to support streaming HTTP transport for the 2025-03-26 protocol version.
The main changes are as follows:
The client sends an initialization POST request to the /message endpoint, and the server may optionally generate and return a session ID to the client.
All messages are sent via HTTP POST requests to the /message endpoint. If a session ID exists, it MUST be included in the request.
The client handles responses from the server accordingly based on the protocol specifications.
I have verified the changes locally, and test cases or Javadoc will be added in subsequent updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add a UT for the code, demonstrating both how it works and it can work as expected.
add WebFluxStreamableClientTransport.java
Motivation and Context
Add client support for 2025-03-26 protocol version
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context