Skip to content

SSLV3_ALERT_HANDSHAKE_FAILURE when using private gateway #1470

@OS-anasantos

Description

@OS-anasantos

Initial Checks

Description

I'm calling an MCP "https://mcp.deepwiki.com/mcp" through a private gateway. Because of that, the URL I'm calling is "https://secure-gateway:8081", so far so good, but unfortunately, I get _"ConnectError('[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (ssl.c:1000)')".

Unfortunately, in _handle_post_request, even if I send the headers "X-Forwarded-Host", they are ignored. It seems that "sni_hostname" is only retrieved by using extensions which are not present here.

Is this expected, or is this an issue?

Example Code

Python & MCP Python SDK

Python: 3.12
MCP Python: 1.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions