Skip to content

Conversation

OS-anasantos
Copy link

@OS-anasantos OS-anasantos commented Oct 14, 2025

Motivation and Context

At the moment when using a private gateway, streamablehttp_client will return error ConnectError('[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1000)'). This is because it needs sni_hostname. According to this httpx documentation, not only "headers" must have the hostname value, but custom extensions must be sent (extensions = {"sni_hostname": "www.encode.io"})

Unfortunately, streamable_http client does not allow sending custom extensions.

How Has This Been Tested?

  • Added unit tests
  • Added a small client example, tested it with MCP_SERVER_HOSTNAME = mcp.deepwiki.com (to setup the private gateway I used chisel)
image

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@OS-anasantos OS-anasantos marked this pull request as ready for review October 14, 2025 16:23
@felixweinberger felixweinberger added enhancement New feature or request needs more eyes Needs alignment among maintainers whether this is something we want to add labels Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs more eyes Needs alignment among maintainers whether this is something we want to add

2 participants