Skip to content

Conversation

@jsudano
Copy link

@jsudano jsudano commented Nov 18, 2025

📌 Summary

I noticed while trying to configure a Streamable HTTP MCP server using HyperServerOptions that custom_streamable_http_endpoint doesn't seem to work. While digging through the code I noticed HyperServerOptions impl's pub fn streamable_http_endpoint instead returns self.custom_messages_endpoint

🔍 Related Issues

✨ Changes Made

  • Changes HyperServerOptions::streamable_http_endpoint() to consume the proper custom_streamable_http_endpoint config value.

🛠️ Testing Steps

I didn't add unit tests for this because I couldn't find any related tests. Happy to add some unit tests here, not sure if there's a preference on exactly where they should live.

@hashemix hashemix changed the title Issue #116: Fix custom_streamable_http_endpoint fix: issue 116 - custom_streamable_http_endpoint Nov 18, 2025
@hashemix
Copy link
Member

Hey @jsudano , thanks for pointing out the issue and suggesting a fix , I really appreciate it!

As you mentioned, we don't have unit tests for the HyperServerOptions. It would be great if you could add a test ( a test module at the end of the same file) to cover this fix.

@jsudano
Copy link
Author

jsudano commented Nov 19, 2025

@hashemix thanks for the quick response, and apologies for the delay! I've pushed a couple commits with tests; the first includes a handful of basic tests, and the second adds a dev dependency in order to properly test SSL validation. I broke it into two commits in case you'd prefer not to add any dependencies, in which case I'll remove the second.

Comment on lines +607 to +614
NamedTempFile::with_suffix(".pem").expect("Expected to create test cert file");
let ssl_cert_path = cert_file
.path()
.to_str()
.expect("Expected to get cert path")
.to_string();
let key_file =
NamedTempFile::with_suffix(".pem").expect("Expected to create test key file");
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a note, these files should be dropped when they go out of scope

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.

HyperServerOptions::custom_streamable_http_endpoint is not properly used

2 participants