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, }