feat: add ignore_ssl_errors to FetchUrlTool

This commit is contained in:
Riz Ashraf committed 2026-10-10 18:00:38 +01:00
1 parent 5583132cdc
commit 11f375017a
2 files changed
+7

No files matched your search

+5
View File
@@ -38,6 +38,11 @@ impl McpTool for FetchUrlHandler {
client_builder = client_builder.user_agent("mcp-memory-server/1.0");
}
// Allow bypassing SSL validation for self-signed certificates
if req.ignore_ssl_errors.unwrap_or(false) {
client_builder = client_builder.danger_accept_invalid_certs(true);
}
// Reqwest automatically uses HTTP_PROXY, HTTPS_PROXY, NO_PROXY
// environment variables by default, so we don't need to manually
// extract and apply them, the builder handles it.
+2
View File
@@ -1041,4 +1041,6 @@ pub struct FetchUrlTool {
pub url: String,
/// Optional custom user-agent string.
pub user_agent: Option<String>,
/// Bypass SSL certificate verification for self-signed or invalid certs. Use with caution.
pub ignore_ssl_errors: Option<bool>,
}