From 11f375017a89ccda37bb54361edcf1169304ba8c Mon Sep 17 00:00:00 2001 From: Riz Ashraf Date: Sat, 10 Oct 2026 18:00:38 +0100 Subject: [PATCH] feat: add ignore_ssl_errors to FetchUrlTool --- server/src/handlers/http.rs | 5 +++++ server/src/tools.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/server/src/handlers/http.rs b/server/src/handlers/http.rs index 0b854f5..657db5c 100644 --- a/server/src/handlers/http.rs +++ b/server/src/handlers/http.rs @@ -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. diff --git a/server/src/tools.rs b/server/src/tools.rs index 507eaf8..19311c5 100644 --- a/server/src/tools.rs +++ b/server/src/tools.rs @@ -1041,4 +1041,6 @@ pub struct FetchUrlTool { pub url: String, /// Optional custom user-agent string. pub user_agent: Option, + /// Bypass SSL certificate verification for self-signed or invalid certs. Use with caution. + pub ignore_ssl_errors: Option, }