Description
Is your feature request related to a problem? Please describe.
When connecting to an MCP server over HTTPS with self-signed or internal certificates, the FastMCP Client fails with SSL certificate verification errors. Currently, there's no straightforward way to disable SSL verification or provide custom certificates when using the Client class.
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)
Describe the solution you'd like
Please add one or more of the following options to the FastMCP Client:
A verify parameter to disable SSL verification or to provide a custom certificate:
client = Client(MCP_URL, verify=False)
client = Client(MCP_URL, verify="/path/to/certificate.pem")
This is needed when working with internal or development environments that use self-signed certificates or private certificate authorities.
Describe alternatives you've considered
Users need to resort to insecure workarounds like patching Python's SSL module.
Additional context
The issue appears to be in how the transport is inferred and created from the URL string. When a URL is provided, the infer_transport function creates a StreamableHttpTransport for HTTPS URLs, but there's no way to configure the SSL verification options for this transport.
According to FastMCP requirements, streamable-http transport is required for web deployments, and the client needs to connect to the /mcp path. The current implementation doesn't provide a way to handle SSL verification for these connections.
This would align with how other HTTP client libraries (like requests) handle SSL verification, making the API more intuitive and flexible for enterprise environments.