feat: add native-tls as an optional TLS backend#631
feat: add native-tls as an optional TLS backend#631alexhancock merged 1 commit intomodelcontextprotocol:mainfrom
Conversation
Add reqwest-native-tls feature flag to allow users to choose between rustls (default) and native-tls for HTTP transports. native-tls uses platform-native TLS implementations: - OpenSSL on Linux - Secure Transport on macOS - SChannel on Windows This is particularly useful for Linux distribution packagers who need to link against system TLS libraries (e.g., OpenSSL) rather than bundling a separate TLS implementation. Linking against system libs ensures security updates are applied system-wide and satisfies distribution packaging policies. Updated documentation to explain the available TLS backend options.
There was a problem hiding this comment.
Pull request overview
Adds an opt-in reqwest-native-tls feature to let consumers choose platform-native TLS (vs rustls) for reqwest-based HTTP usage, primarily to support distro packaging requirements.
Changes:
- Adds a new Cargo feature (
reqwest-native-tls) that enablesreqwest’snative-tlsbackend. - Updates the crate README feature-flag documentation to describe available TLS backend options.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/rmcp/Cargo.toml | Introduces reqwest-native-tls feature flag wiring to reqwest?/native-tls. |
| crates/rmcp/README.md | Documents TLS backend feature options for HTTP transports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
|
|
There was a problem hiding this comment.
This section lists the TLS backend flags, but it doesn’t clarify (a) that they’re intended to be mutually exclusive and (b) that transport-streamable-http-client-reqwest / auth only enable the reqwest dependency (__reqwest) and still require exactly one of these TLS backend features to support https. Adding a short note about the required feature combinations would prevent misconfiguration and surprising runtime errors.
| These TLS backend features are intended to be mutually exclusive: enable at most one of them at a time. When using | |
| `transport-streamable-http-client-reqwest` or `auth`, those features only enable the `reqwest` dependency (`__reqwest`) | |
| and do not select a TLS backend for you; to support HTTPS, you must also enable exactly one of the TLS backend features | |
| listed above. |
Add reqwest-native-tls feature flag to allow users to choose between rustls (default) and native-tls for HTTP transports.
native-tls uses platform-native TLS implementations:
Motivation and Context
This is particularly useful for Linux distribution packagers who need to link against system TLS libraries (e.g., OpenSSL) rather than bundling a separate TLS implementation. Linking against system libs ensures security updates are applied system-wide and satisfies distribution packaging policies.
How Has This Been Tested?
Ran
cargo testlocally, but it seems that even the default upstream tests are failing right now.Breaking Changes
Types of changes
Checklist
Additional context